Add Servers to Pool by DNS

This article covers adding servers to a pool based on DNS domain name.

Servers can be added to a pool in the following ways:

  • By IP address or IP address ranges
  • By a list retrieved from the cloud orchestrator (select by Network)
  • IP group
  • DNS domain name

To add servers by domain name, follow the below:

  • Configure valid DNS servers on the Avi Controller. In the web interface, navigate to Administration > Settings > DNS / NTP.
  • Create or edit an existing pool, or create a new virtual service in basic mode. From the Servers tab, select servers using the IP address, IP address range, or DNS name option. In the Server IP address field, enter a valid domain name.
    • If DNS cannot resolve the name then, it is displayed in red. If DNS resolves the name to an IP address, it will be listed below the field.
    • If DNS resolves to multiple IP addresses then, the list will be shown below though it is potentially truncated.
    • Click the Add Server button in green, to add the server(s) to the pool.

DNS Overrides Manual IP Changes

For servers added by domain name, manual changes to the resolved server’s IP addresses are overwritten automatically.

Periodic Address Verification and Refresh

In case the IP address has changed (single name may return multiple IP addresses) then, the Avi Controller will refresh the server IP information by rechecking with DNS periodically.

If the DNS server returns the IP address which is already assigned to the server then, there is no change. However, the pool is updated in the following cases:

  • If DNS resolution of a server hostname results in a different set of IP addresses than the set received previously, the pool members corresponding to this hostname are updated with the new set of IP addresses, and the older IP addresses are removed.
  • In case of either the DNS resolution results in a timeout or if there is a failure due to a temporary outage of the DNS server, then the old set of IP addresses is preserved.
  • If DNS resolution results in an error (for example, non-existent domain or no answer from the server) then, the hostname is mapped to IP address “0.0.0.0.”

In case a timeout or an error occurs then, Vantage will seek to resolve the hostname in the next resolution interval.

Changing the DNS Refresh Interval

The default DNS refresh time is 60 minutes. This can be changed using the CLI:

: > configure controller properties dns_refresh_period 50
: > save