This section explains the steps to add servers to a pool based on the 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

You can add servers by domain name as follows:

  • Configure valid DNS servers on the Avi Load Balancer Controller.

  • In the web interface, navigate to Administration > System Settings > Edit > 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, 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, the list will be shown below though it is potentially truncated.

    • Click the Add Server to add the servers 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.

Verifying and Refreshing Periodic Address

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

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, Avi Load Balancer will seek to resolve the hostname in the next resolution interval.

Assigning or Updating VIP Using DNS

During configuration, the virtual IP (VIP) address of a virtual service can be specified by IP address or by DNS domain name.

To be able to assign VIPs using DNS, the Controller must be configured to use a valid DNS server:

  1. Navigate to Administration > System Settings > Edit > DNS / NTP.

  2. Enter the domain name in the DNS Search Domain field.

    • If DNS cannot resolve the name, the entered value changes to red.

    • If DNS resolves the name to an IP address, the address is listed.

    • If DNS resolves to multiple IP addresses, the list below the VIP field will include a drop-down menu, requiring the selection of the IP address to use.

The Controller will periodically recheck with DNS to see whether the name resolution has changed. If the resolution comes back with a different address, the Controller will update or change the VIP address.

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

DNS Resolution of IPv6 Addresses on Pool Servers

A pool server’s FQDN can be resolved to an IPv6 address if there is an AAAA record available in the DNS server. The AAAA record, which maps an FQDN to an IPv6 address, must be present in the DNS zone file on the DNS server. This is analogous to an A record, which maps a domain name to an IPv4 address.

To ensure proper DNS resolution:

  • Verify that an AAAA record is present in the DNS server, allowing the domain name to be resolved to an IPv6 address.

  • Ensure that the external DNS server has both A and AAAA DNS records enabled.

To allow Avi controllers to query an AAAA record in the DNS server, enable the resolve_fqdn_to_ipv6 parameter in the Cloud object. This field allows a pool server's FQDN to be resolved to an IPv6 address.

Follow these steps to configureresolve_fqdn_to_ipv6 parameter in the Cloud object:

  1. Log in to as an Cloud admin user and run [admin]: > configure <cloud name>.

  2. Enable IPv6 resolution, [admin]: cloud> resolve_fqdn_to_ipv6.

  3. Save the configuration, [admin]: cloud> save.

Once the resolve_fqdn_to_ipv6 field is set to True, the Avi controller will query the DNS server for an AAAA record. Any query from the Avi controller for a pool server with IPv6 enabled will resolve to an IPv6 address.