In general, an NSX Advanced Load Balancer GSLB service has only one FQDN configured. When multiple FQDNs represent the same GSLB service, the wildcard for these domains is configured on NSX Advanced Load Balancer.

Use Case

A wildcard match for FQDNs is configured to fulfill the following requirements:

  • foo.com is the subdomain delegated to NSX Advanced Load Balancer

  • t1.test.finance.foo.com, t2.test.finance.foo.com, m1.test.finance.foo.com, and so on, point to the same application or front end of the same application

To achieve the above requirements, add a GSLB service for test.finance.foo.com and enable the wildcard option to indicate that any FQDN matching *.test.finance.foo.com go to the same set of applications.

Configuring Wildcard Match using NSX Advanced Load Balancer CLI

Login to the NSX Advanced Load Balancer CLI and use configure gslbservice <gslb service name> command to activate the wildcard_match flag.

[admin:10-10-25-10]:configure gslbservice gsvc-5
[admin:10-10-25-10]: > TAB
wildcard_match Enable wildcard match of FQDN: If an exact match is not found in the DNS table, the longest match is chosen by wildcarding the FQDN in the DNS request. Default is false.
[admin:10-10-25-10]: gslbservice> wildcard_match
Overwriting the previously entered value for wildcard_match
[admin:10-10-25-10]: gslbservice> save

The above is supported only using the CLI.

Similarly, static DNS records may be identified by wildcard as well.

[admin:10-10-25-10]: virtualservice:static_dns_records>
wildcard_match Enable wild-card match of FQDN: If an exact match is not found in the DNS table, the longest match is chosen by wildcarding the FQDN in the DNS request. Default is false.
[admin:10-10-25-10]: virtualservice:static_dns_records> save

Scenario 1

  • Subdomain name is foo.com

  • The app domain name is demo.foo.com

The wildcard option to meet the above requirement is to use *.demo.foo.com as the wildcard option as shown below:

[admin:testcontroller-2]: > configure gslbservice gs1
[admin:testcontroller-2]: gslbservice> domain_names demo.foo.com 
[admin:testcontroller-2]: gslbservice> wildcard_match 
Overwriting the previously entered value for wildcard_match
[admin:testcontroller-2]: gslbservice> save
Note:
  • domain_names: demo.avi.com: This app domain name can be configured from GUI too

  • gslbservice> wildcard_match: Flag for enabling wildcard

Scenario 2: Wildcard for the Subdomain Itself

If it is required to have a wildcard for the subdomain itself, that is, *.foo.com, configure the app domain name from the NSX Advanced Load Balancer CLI and enable wildcard match on the same as shown below:

[admin:testcontroller-2]: > configure gslbservice gs1
[admin:testcontroller-2]: gslbservice> domain_names foo.com 
[admin:testcontroller-2]: gslbservice> wildcard_match
Overwriting the previously entered value for wildcard_match
[admin:testcontroller-2]: gslbservice> save
Note:
  • App domain name: foo.com

  • A domain name like this can not be configured using the NSX Advanced Load Balancer UI.

Configuring DNS Static Records

Static records can also be configured through the NSX Advanced Load Balancer UI. Navigate to Applications > Virtual Services and click Static DNS Records.