Skip to content

Dynamic vs Static RestName

Adam Rudell edited this page Jan 19, 2024 · 10 revisions

During deployment, you can specify if using RestName or RestIPAddress which will determine how the NC Northbound API endpoint will be registered into your DNS for name resolution. To determine what you have configured, leverage Get-NetworkController on your Network Controller.

image

Dynamic

If within Get-NetworkController you have the RestName populated, you are going to leverage Dynamic DNS. When deploying and leveraging Dynamic DNS, you need to ensure that the instructions in Plan to deploy Network Controller - Azure Stack HCI | Microsoft Learn have been followed.

When the ApiService primary replica moves between Network Controller nodes, it will perform a DNS Query for the FQDN of the RestName. If the IP address returned from DNS does not match the IP address of the interfaces of the NC primary replica, it will proceed with:

  • Send DNS UPDATE to DELETE the current record.
  • Send DNS UPDATE to CREATE a new record with the IP Address

In the decoded SdnDiagnostics.#######.etl file(s) taken from the NC node where ApiService is primary, you would see the following operations:

DnsUtilities: Refreshing records for {RESTNAME}
DnsUtilities: Deleted address {IP ADDRESS}    <-- This may not be logged if record does not already exist
DnsUtilities: Refreshed address {IP ADDRESS}

Static

If within Get-NetworkController you have the RestIPAddress populated, you are going to leverage a Static IP address. This is beneficial depending on DNS configuration or if not leveraging Windows AD-Integrated DNS. In this scenario when the ApiService primary replica moves to a new Network Controller, it will program a secondary IP address on the interface.

In the decoded SdnDiagnostics.#######.etl file(s) taken from the NC node where ApiService is primary, you would see the following operations:

[Microsoft-Windows-NetworkController-SDNAPIEvents]0,PRI,FloatingIP.cs#205 [PlumbIP] called ...
[Microsoft-Windows-NetworkController-SDNAPIEvents]0,PRI,FloatingIPUtil.cs#28 PlumbIpAddressOnInterface called ...
[Microsoft-Windows-NetworkController-SDNAPIEvents]0,PRI,FloatingIPUtil.cs#30 PlumbIpAddressOnInterface successful and exiting ...
[Microsoft-Windows-NetworkController-SDNAPIEvents]0,PRI,FloatingIP.cs#240 SetPrimaryIP called ...
[Microsoft-Windows-NetworkController-SDNAPIEvents]0,PRI,FloatingIPUtil.cs#89 Entering CheckForDuplicateAddress
[Microsoft-Windows-NetworkController-SDNAPIEvents]0,PRI,FloatingIP.cs#229 [PlumbIP] SetPrimaryIP thread started and exiting method...
[Microsoft-Windows-NetworkController-SDNAPIEvents]0,PRI,FloatingIPUtil.cs#98 CheckForDuplicateAddress: IP is good to use
[Microsoft-Windows-NetworkController-Framework]This instance of API service has added the virtual IP address 10.184.108.12 because of change in role to primary
[Microsoft-Windows-NetworkController-SDNAPIEvents]0,PRI,FloatingIPUtil.cs#89 Entering CheckForDuplicateAddress
[Microsoft-Windows-NetworkController-SDNAPIEvents]0,PRI,FloatingIPUtil.cs#98 CheckForDuplicateAddress: IP is good to use
[Microsoft-Windows-NetworkController-SDNAPIEvents]0,PRI,FloatingIP.cs#293 SetPrimaryIP restarting timer and exiting ...

Define Dynamic or Static at Deployment using SdnExpress

When leveraging SdnExpress to deploy a new SDN environment, you can specify within the configuration .psd1 file what you want to leverage.

NOTE: Ensure that you are using the most recent version of SdnExpress as older versions only supported RestName.

Deploy by IP Address

RestName = "10.127.131.13"
RestIpAddress = "10.127.131.13/25"

Deploy by Static DNS

RestName = "NC.FQDN"
RestIPAddress = "10.127.131.13/25"

NOTE: You must ensure that the static DNS entry is registered prior to deployment or the deployment will fail.

Deploy by Dynamic DNS

RestName = "NC.FQDN"

Changing between Dynamic and Static post deployment

Within SdnDiagnostics, there is a new cmdlet implemented called Set-SdnNetworkController that allows you to specify the -RestName or -RestIPAddress which will handle the operation to configure Network Controller with the appropriate settings. More information regarding the function can be found here.

Change from RestName to RestIPAddress

Before performing the update, ensure that you have created the Static IP address within DNS for what you want the NB API FQDN to resolve to. The IP address must be within the same subnet as the existing network controller node(s) and must not be already in use. If the network controller node(s) are using an IP address of xx.xx.xx.24/27, xx.xx.xx.25/27 and xx.xx.xx.26/27, then you would want to use xx.xx.xx.27/27 if available.

Set-SdnNetworkController -RestIPAddress 10.127.131.13/25

NOTE: Operation will take 15 to 20 minutes to complete.

Set-SdnNetworkController_Demo.mp4

After you have configured the RestIPAddress, you can then confirm the configuration settings.

  1. Leverage Get-SdnServiceFabricReplica -ServiceTypeName 'ApiService' -Primary to locate the primary replica. This is important when running a multi-node NC cluster.
  2. Check the IP configuration details to confirm a secondary IP address has been configured that matches the IP Address and Subnet you specified.
Check_StaticIPConfig_Demo.mp4

Change from RestIPAddress to RestName

If for any reason you want to switch from static IP address to Dynamic DNS, then you can leverage the following command that will revert from using a static IP address and instead will configure the RestName property. This is just a switch parameter, as it will automatically set the RestName to the FQDN of the network controller encryption certificate subject.

Set-SdnNetworkController -RestName

After the operation, you may need to delete the static IP address and ensure that you have performed the steps in https://learn.microsoft.com/en-us/azure-stack/hci/concepts/network-controller#dynamic-dns-updates to ensure that your environment will allow dynamic DNS registration.

Documentation

How To Guides:

Troubleshooting Guides

Learning

Functions

Clone this wiki locally