This section describes GSLB sites configuration using NSX Advanced Load Balancer CLI.

Designating GSLB Leader and Creating Global Configuration

Create a GSLB global configuration with the following specifications.

  • Two Controller Clusters (10.10.25.10 and 10.160.0.25)

  • 10.10.25.10 is the designated GSLB leader. Create the configuration on the GSLB leader.

  • Find the cluster UUIDs of both Controller Clusters.

On 10.10.25.10, run the following commands to set up the synchronization.

: > show cluster

+---------------+----------------------------------------------+
| Field         | Value                                        |
+---------------+----------------------------------------------+
| uuid          | cluster-42301dd3-0529-ada4-ec02-69a2c593df6d |
: > configure gslb glb
: gslb> dns_configs
New object being created

: gslb:dns_configs> domain_name avi.com
: gslb:dns_configs>
: gslb> site_controller_clusters
New object being created

: gslb:site_controller_clusters> ip_addresses 10.10.25.10
: gslb:site_controller_clusters> cluster_uuid cluster-42301dd3-0529-ada4-ec02-69a2c593df6d
: gslb:site_controller_clusters> username admin
: gslb:site_controller_clusters> password admin
: gslb:site_controller_clusters> name SantaClara
: gslb:site_controller_cluster> save
: gslb> site_controller_clusters
New object being created

: gslb:site_controller_clusters> ip_addresses 10.160.0.20
: gslb:site_controller_clusters> cluster_uuid cluster-42215c91-6280-6016-31f6-7416a1f4c4ad
: gslb:site_controller_clusters> username admin
: gslb:site_controller_clusters> password admin
: gslb:site_controller_clusters> name Boston
: gslb:site_controller_clusters> save
: gslb> save
+------------------------------+-----------------------------------------------+
| Field                        | Value                                         |
+------------------------------+-----------------------------------------------+
| uuid                         | gslb-cafe8f98-c411-47cd-96d2-1a6d4e3bad74 |
| name                         | glb                                           |
| dns_configs[1]               |                                               |
|   domain_name                | avi.com                                       |
| site_controller_clusters[1]  |                                               |
|   cluster_ref                | cluster-42301dd3-0529-ada4-ec02-69a2c593df6d  |
|   name                       | SantaClara                                    |
|   ip_addresses[1]            | 10.10.25.10                                   |
|   port                       | 443                                           |
|   username                   | admin                                         |
| site_controller_clusters[2]  |                                               |
|   cluster_ref                | cluster-42215c91-6280-6016-31f6-7416a1f4c4ad  |
|   name                       | Boston                                        |
|   ip_addresses[1]            | 10.160.0.20                                   |
|   port                       | 443                                           |
|   username                   | admin                                         |
| owner_controller_cluster_ref | cluster-42301dd3-0529-ada4-ec02-69a2c593df6d  |
| tenant_ref                   | admin                                         |
+------------------------------+-----------------------------------------------+
: >

To verify the configuration,

Go to the secondary site, and run the show command. The GSLB leader and follower UUIDs will match.

: > show gslb
+------+-----------------------------------------------+
| Name | UUID                                          |
+------+-----------------------------------------------+
| glb  | gslb-cafe8f98-c411-47cd-96d2-1a6d4e3bad74     |
+------+-----------------------------------------------+

Configuring local DNS Virtual Service

  • Configure a new SE group g-dns SE group to host the DNS virtual service, on both the Controller Clusters.

  • Configure a DNS virtual service on all the clusters where the DNS service is hosted and bound to the g-dns SE group.

    • Optionally configure domain names hosted by the DNS virtual service.

  • From the CLI, create an application profile that selects the domain names hosted by this virtual service on all Controller Clusters.

: > configure applicationprofile dns
: applicationprofile> type application_profile_type_dns
: applicationprofile> dns_service_profile
: applicationprofile:dns_service_profile> domain_names avi.com
: applicationprofile:dns_service_profile> save
: applicationprofile> save

From the UI or CLI, create an application profile that selects the domain names hosted by this virtual service.

Configuring Local Application Virtual Services

Create application virtual services in the UI. For example, create an HTTP virtual service vs-1 in Controller cluster 1, and virtual service vs-2 in Controller cluster 2.

For more information, see Virtual Services in the VMware NSX Advanced Load Balancer Configuration Guide.

Configuring Routes for DNS Virtual Service Accessibility to Local Virtual Services

The DNS SE monitors the health of the GSLB service members. Add static routes or default gateway to ensure that the members are reachable.

For example, on Santa Clara site with address 10.10.25.10, run the following commands.

> configure vrfcontext global
Updating an existing object. Currently, the object is:

+----------------+-------------------------------------------------+
| Field          | Value                                           |
+----------------+-------------------------------------------------+
| uuid           | vrfcontext-fde3b826-b19c-449c-8dec-ddeb119f2498 |
| name           | global                                          |
| system_default | True                                            |
| tenant_ref     | admin                                           |
| cloud_ref      | Default-Cloud                                   |
+----------------+-------------------------------------------------+
: vrfcontext> static_routes
: vrfcontext:static_routes> prefix 10.0.0.0/8 next_hop 10.90.12.1
: vrfcontext:static_routes> save
: vrfcontext> save

+------------------+-------------------------------------------------+
| Field            | Value                                           |
+------------------+-------------------------------------------------+
| uuid             | vrfcontext-fde3b826-b19c-449c-8dec-ddeb119f2498 |
| name             | global                                          |
| static_routes[1] |                                                 |
|   prefix         | 10.0.0.0/8                                      |
|   next_hop       | 10.90.12.1                                      |
|   route_id       | 1                                               |
| system_default   | True                                            |
| tenant_ref       | admin                                           |
| cloud_ref        | Default-Cloud                                   |
+------------------+-------------------------------------------------+
: >