You can selectively assign a GSLB Service to DNS virtual services using Avi Load Balancer CLI.
Prerequisites
The active user must have administrative privileges.
Procedure
- Login to the Avi Load Balancer shell of the Controller for the GSLB leader.
- Run the configure gslb command, specifying the name of the configuration.
For example,
configure gslb Default
- In the gslb prompt, enter two tabs to reveal the sub-commands available to you.
[admin:topo1-controller]: gslb> cancel Exit the current submode without saving clear_on_max_retries Max retries after which the remote site is treated as a fresh start. In fresh start all the configs are downloaded. client_ip_addr_group (submode) description Help string not found for argument dns_configs (submode) do Execute a show command is_federated This field indicates that this object is replicated across GSLB federation. leader_cluster_uuid Mark this Site as leader of GSLB configuration. This site is the one among the Avi sites. maintenance_mode This field disables the configuration operations on the leader for all federated objects. CUD operations on Gslb, GslbService, GslbGeoDbProfile and other federated objects will be rejected. The rest-api disabling helps in upgrade scenarios where we don't want configuration sync operations to the Gslb member when the member is being u... name Name for the GSLB object. new (Editor Mode) Create new object in editor mode no Remove field save Save and exit the current submode send_interval Frequency with which group members communicate. show_schema show object schema sites (submode) tenant_ref Help string not found for argument third_party_sites (submode) view_id The view-id is used in change-leader mode to differentiate partitioned groups while they have the same GSLB namespace. Each partitioned group will be able to operate independently by using the view-id. watch Watch a given show command where Display the in-progress object
- The sites sub-command gets invoked three times, once per DNS to be assigned.
Assigning DNS vs-1 to subdomain com
si[admin:ctrl]: gslb> sites index 1 [admin:ctrl]: gslb:sites> dns_vses index 1 [admin:ctrl]: gslb:sites:dns_vses> domain_names com [admin:ctrl]: gslb:sites:dns_vses> save
Assigning DNS vs-2 to subdomain edu
[admin:ctrl]: gslb:sites> dns_vses index 2 [admin:ctrl]: gslb:sites:dns_vses> domain_names edu [admin:ctrl]: gslb:sites:dns_vses> save [admin:ctrl]: gslb:sites> save [admin:ctrl]: gslb> save
Assigning DNS vs-3 to subdomain net
[admin:ctrl]: gslb:sites> dns_vses index 3 [admin:ctrl]: gslb:sites:dns_vses> domain_names net [admin:ctrl]: gslb:sites:dns_vses> save [admin:ctrl]: gslb:sites> save [admin:ctrl]: gslb> save
- Save the configuration.
Save the site.
+--------------------------+-----------------------------------------------------+ | Field | Value | +--------------------------+-----------------------------------------------------+ | uuid | gslb-10c15641-2cc9-4fc3-b8ae-30651d3a31d9 | | name | Default | | dns_configs[1] | | | domain_name | avi.com | | dns_configs[2] | | | domain_name | vmware.com | | sites[1] | | | cluster_uuid | cluster-37cabcaa-c2c8-4a9e-9bcc-2849cf29ad81 | | name | glb-12 | | ip_addresses[1] | 10.102.64.51 | | port | 443 | | username | admin | | password | <sensitive> | | member_type | GSLB_ACTIVE_MEMBER | | enabled | True | | dns_vses[1] | | | dns_vs_uuid | virtualservice-3ff9baea-556a-46e5-a086-090fd681b6e6 | | domain_names[1] | avi.com | | dns_vses[2] | | | dns_vs_uuid | virtualservice-7ef9efc8-4b95-43f4-b670-62979bb1f0e0 | | domain_names[1] | vmware.com | | hm_shard_enabled | False | | suspend_mode | False | | leader_cluster_uuid | cluster-37cabcaa-c2c8-4a9e-9bcc-2849cf29ad81 | | send_interval | 15 sec | | clear_on_max_retries | 20 | | view_id | 0 | | async_interval | 0 sec | | error_resync_interval | 300 sec | | replication_policy | | | replication_mode | REPLICATION_MODE_CONTINUOUS | | maintenance_mode | False | | is_federated | True | | tenant_ref | admin | | tenant_scoped | True | | enable_config_by_members | False | +--------------------------+-----------------------------------------------------+ [admin:ctrl]: >