GSLB Wildcard FQDNs

Overview

In general, an Avi GSLB service has only one FQDN configured. When multiple FQDNs represent the same GSLB service, wildcard for these domains is configured on Avi Vantage. These FQDNs are associated with the same set of virtual services by turning on the wildcard option. For example, www.foo.com, www.foo.us, and www.foo.biz refer to the same global application. It is possible to configure an Avi GSLB service by specifying such a list of dissimilar domains.

Use Case

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

  • foo.com is the subdomain delegated to Avi.
  • t1.test.finance.foo.com, t2.test.finance.foo.com, m1.test.finance.foo.com, etc. point to the same application or front end 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 maching *.test.finance.foo.com go to the same set of applications.

Configuring Wildcard Match using Avi CLI

Login to the Avi CLI and use confgire gslbservice <gslb service name> command to enable 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 via 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 and
  • App domain name is demo.foo.com.

The wildcard option to meet the above requirement is to use *.demo.foo.com as the wild card 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

Notes:

  • domain_names : demo.avi.com: This app domain name can be configured from GUI as well

  • gslbservice> wildcard_match: Flag for enabling wildcard

Scenario 2: Wildcard for the subdomain itself

If it is required to have wildcard for the subdomain itself i.e. *.foo.com, configure the app domain name from the Avi 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

Notes:

  • App domain name: foo.com
  • A domain name like this can not be configured using the Avi UI.

Configuring DNS Static Records

Static records can be configured from the Avi UI as well. Navigate to Application > virtual service and click on the Static DNS Records.

UI screen showing wildcard option

  • GSLB Feature on Avi Vantage