BIG-IP DNS (GTM) and GSLB

This section contains declarations for Global Server Load Balancing (GSLB) which requires the BIG-IP DNS (formerly GTM) module to be licensed and provisioned.

Use the index on the right to locate specific examples.

Important

Most of the example declarations have been updated in the documentation for BIG-IP AS3 3.20 to remove any template that was specified, and rename any virtual services that used the name serviceMain to service. In BIG-IP AS3 3.20, the generic template is the default, which allows services to use any name.

This also means that many of these declarations on a version prior to 3.20 they will fail unless you add a template. See this FAQ entry and this Troubleshooting entry for more information.

Using BIG-IP DNS features in a declaration

This example shows how you can use some BIG-IP DNS features (DNS profiles, TSIG keys, DNS Zones, Nameservers) in a BIG-IP AS3 declaration. The DNS features we use in this declaration are well-documented in the BIG-IP DNS Services: Implementations guide, so for specific information, see this documentation. Also see the Schema Reference for usage options for using these features in your BIG-IP AS3 declarations.

New in AS3 3.41
AS3 3.41 introduced the ability to create a DNS Logging profile, using the new DNS_Logging_Profile class. The DNS logging profile enables query or response logging, and defines the format of messages themselves. See DNS_Logging_Profile for available properties, descriptions, and AS3 usage.

This declaration creates the following objects on the BIG-IP:

NOTE: If you attempt to use this declaration on a version prior to 3.41, it will fail. On previous versions, remove the DNS_Logging_Profile lines, highlighted in yellow.

  • Partition (tenant) named Sample_non_http_03.
  • A virtual server named service.
  • A DNS Zone that uses DNS Express.
  • A DNS Nameserver Zone.
  • A DNS TSIG Key using the hmacmd5 algorithm.
  • A DNS Logging profile named profileDnsLogging.
{
    "class": "ADC",
    "updateMode": "selective",
    "schemaVersion": "3.0.0",
    "id": "DNS",
    "Sample_non_http_03": {
        "class": "Tenant",
        "TEST_DNS_Zone": {
            "class": "Application",
            "dnsZone": {
                "class": "DNS_Zone",
                "label": "dnsZone",
                "remark": "DNS Zone test",
                "dnsExpress": {
                    "enabled": true,
                    "nameserver": {
                        "use": "dnsNameserverZone"
                    },
                    "notifyAction": "consume",
                    "allowNotifyFrom": [
                        "10.1.1.1"
                    ],
                    "verifyNotifyTsig": false
                },
                "responsePolicyEnabled": true,
                "serverTsigKey": {
                    "use": "tsigKeyZone"
                },
                "transferClients": [
                    {
                        "use": "dnsNameserverZone"
                    }
                ]
            },
            "dnsNameserverZone": {
                "class": "DNS_Nameserver",
                "label": "dnsNameserverZone",
                "address": "10.1.1.2",
                "port": 53,
                "routeDomain": {
                    "bigip": "/Common/0"
                },
                "tsigKey": {
                    "use": "tsigKeyZone"
                }
            },
            "tsigKeyZone": {
                "class": "DNS_TSIG_Key",
                "label": "tsigKeyZone",
                "remark": "TSIG Key test",
                "algorithm": "hmacmd5",
                "secret": {
                    "ciphertext": "ZjVmNQ==",
                    "miniJWE": true,
                    "protected": "eyJhbGciOiJkaXIiLCJlbmMiOiJub25lIn0",
                    "ignoreChanges": true,
                    "allowReuse": false
                }
            }
        }
    },
    "DNS_PROFILE_1": {
        "class": "Tenant",
        "DNS_PROFILE_1": {
            "class": "Application",
            "service": {
                "class": "Service_UDP",
                "virtualPort": 80,
                "virtualAddresses": [
                    "198.19.192.210"
                ],
                "profileUDP": {
                    "use": "profileUdp"
                },

                "profileDNS": {
                    "use": "profileDnsHW"
                }
            },
            "profileDnsLogging": {
                "class": "DNS_Logging_Profile",
                "remark": "DNS Logging Profile test",
                "includeCompleteAnswer": true,
                "includeQueryId": false,
                "includeSource": true,
                "includeTimestamp": true,
                "includeView": true,
                "logPublisher": {
                    "bigip": "/Common/local-db-publisher"
                },
                "logQueriesEnabled": true,
                "logResponsesEnabled": false
            },
            "profileDnsHW": {
                "class": "DNS_Profile",
                "label": "profileDnsHW",
                "remark": "DNS Profile test",
                "parentProfile": {
                    "bigip": "/Common/dns"
                },
                "rapidResponseEnabled": false,
                "rapidResponseLastAction": "allow",
                "hardwareQueryValidationEnabled": true,
                "hardwareResponseCacheEnabled": true,
                "dnssecEnabled": false,
                "globalServerLoadBalancingEnabled": false,
                "dnsExpressEnabled": false,
                "cacheEnabled": false,
                "dns64Mode": "secondary",
                "dns64Prefix": "0:0:0:0:0:0:0:0",
                "dns64AdditionalSectionRewrite": "any",
                "unhandledQueryAction": "drop",
                "localBindServerEnabled": false,
                "zoneTransferEnabled": true,
                "recursionDesiredEnabled": false,
                "securityEnabled": false,
                "loggingEnabled": true,
                "loggingProfile": {
                    "use": "profileDnsLogging"
                },
                "statisticsSampleRate": 20
            },
            "profileUdp": {
                "class": "UDP_Profile",
                "datagramLoadBalancing": true
            }

        }
    }
}

Back to top


Using GSLB features in a declaration

This example shows how you use F5s Global Server Load Balancing (GSLB) features in a declaration. You must have BIG-IP DNS (formerly GTM) provisioned to use these features. See the Schema Reference for usage options and additional features for GSLB.

Warning

When using GSLB features, you must be aware of the items pointed out in Warnings, notably BIG-IP AS3 completely overwrites non-AS3 topologies when a declaration is submitted.

Note

GSLB Pool members reference GSLB virtual servers by name. GSLB virtual servers are given a name based on their order in the list of GSLB virtual servers. The first GSLB virtual server is named 0, the second is 1, and the third is 2. Starting BIG-IP AS3 3.21, GSLB virtual servers can be given a user defined name that overrides the default name.

New in BIG-IP AS3
The following list describes changes to this example since it was published:

BIG-IP AS3 Version Property Description
3.49 loadBalancingDecisionLogVerbosity Added the ability to enable each log decision individually via BIG-IP AS3 declaration using Load-Balancing Decision Log parameters in GSLB_Domain class.
3.46   Added members to the Prober pool in the example declaration. This did not change the functionality of the example. Prober pools are created in /Common.
3.37 ratio Adds the ability to set a ratio for the pool when using the ratio load balancing method. This ratio allows you to distribute requests among several resources based on a priority level or weight assigned to each resource. For example, you could use ratio to send twice as many connections to a fast, new server, and half as many connections to an older, slower server. See GSLB_Domain_Pools.
  GSLB_iRule This property specifies or configures an iRule for use in GSLB domains. For additional information and BIG-IP AS3 usage, see GSLB_iRule in the Schema Reference.

This declaration creates the following objects on the BIG-IP (NOTE If you attempt to use this declaration on a version prior to 3.37, it will fail. On previous versions, remove the ratio lines from the pools and the GSLB iRule, highlighted in yellow):

  • Partition (tenant) named Sample_non_http_05.
    • A GSLB wide IP (domain) named example.edu with an alias of another.example, and references two pools with different ratios.
    • Two GSLB pools named testPool and testPool2 with various properties. Also references a GSLB iRule.
    • A GSLB iRule named testGSLB_iRule that includes a base64 encoded iRule.
  • A reference to the Common partition using the shared template.
    • A GSLB data center named testDataCenter.
    • A GSLB server named testServer with a device and two virtual servers. Important: A GSLB_Server must always be in /Common/Shared as shown in the example.
{
    "class": "ADC",
    "schemaVersion": "3.49.0",
    "id": "GSLB_Sample",
    "Sample_non_http_05": {
        "class": "Tenant",
        "Application": {
            "class": "Application",
            "testDomain": {
                "class": "GSLB_Domain",
                "domainName": "example.edu",
                "aliases": [
                    "another.example*" ],
                "resourceRecordType": "A",
                "loadBalancingDecisionLogVerbosity": [
                    "pool-selection",
                    "pool-traversal",
                    "pool-member-selection",
                    "pool-member-traversal"
                  ],
                "poolLbMode": "ratio",
                "pools": [
                    {
                        "ratio": 2,
                        "use": "testPool"
                    },
                    {
                        "ratio": 3,
                        "use": "testPool2"
                    }
                ],
                "iRules": [
                    "testGSLB_iRule"
                ]
            },
            "testPool": {
               "class": "GSLB_Pool",
                "enabled": false,
                "lbModeAlternate": "ratio",
                "lbModeFallback": "ratio",
                "manualResumeEnabled": true,
                "verifyMemberEnabled": false,
                "qosHitRatio": 10,
                "qosHops": 11,
                "qosKbps": 8,
                "qosLinkCapacity": 35,
                "qosPacketRate": 5,
                "qosRoundTripTime": 75,
                "qosTopology": 3,
                "qosVirtualServerCapacity": 2,
                "qosVirtualServerScore": 1,
                "members": [
                    {
                        "ratio": 10,
                        "server": {
                            "use": "/Common/Shared/testServer"
                        },
                        "virtualServer": "0"
                    }
                ],
                "bpsLimit": 5,
                "bpsLimitEnabled": true,
                "ppsLimit": 4,
                "ppsLimitEnabled": true,
                "connectionsLimit": 3,
                "connectionsLimitEnabled": true,
                "maxAnswersReturned": 10,
                "monitors": [
                    {
                        "bigip": "/Common/http"
                    },
                    {
                        "bigip": "/Common/https"
                    }
                ],
                "resourceRecordType": "A",
                "fallbackIP": "1.1.1.1"
            },
            "testPool2": {
                "class": "GSLB_Pool",
                "resourceRecordType": "A"
            },
            "testGSLB_iRule": {
                "class": "GSLB_iRule",
                "iRule": {
                    "base64": "d2hlbiBETlNfUkVRVUVTVCB7CiAgICBsb2cgbG9jYWwyLiAiR1RNIGlydWxlOiBBIEROUyByZXF1ZXN0IHdhcyBzZWVuIGZvciBbRE5TOjpxdWVzdGlvbiBuYW1lXSBzZWVuIGZyb20gW0lQOjpjbGllbnRfYWRkcl0iCn0="
                }
            }
        }
    },
    "Common": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "testDataCenter": {
                "class": "GSLB_Data_Center"
            },
            "testProberPool": {
                "class": "GSLB_Prober_Pool",
                "enabled": true,
                "lbMode": "round-robin",
                "members": [
                    {
                        "server": {
                            "use": "testServer"
                        },
                        "memberOrder": 0
                    }
                ]
            },
            "testServer": {
                "class": "GSLB_Server",
                "dataCenter": {
                    "use": "testDataCenter"
                },
                "devices": [
                    {
                        "address": "1.2.3.7"
                    }
                ],
                "proberPreferred": "pool",
                "proberPool": {
                    "use": "testProberPool"
                },
                "virtualServers": [
                    {
                        "address": "1.2.3.8",
                        "port": 5050
                    },
                    {
                        "address": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
                        "port": 5051
                    }
                ]
            }

        }
    }
}

Back to top


Creating a DNS cache in a declaration

This example shows how can create a DNS cache in a declaration (in versions prior to 3.13 you could reference a cache, but not create one). A DNS Cache allows the system to more quickly respond to repeated DNS queries. See the Configuring DNS Caching chapter of the BIG-IP DNS Implementation guide for detailed information.

You must have BIG-IP DNS (formerly GTM) provisioned to use these features.

See DNS_Cache in the Schema Reference for usage options and additional features for DNS Cache.

This declaration creates the following objects on the BIG-IP:

  • Partition (tenant) named Example_DNS_Cache.
  • A DNS Cache object named DNSCache_example that contains a number of options. See DNS_Cache for details.
{
    "class": "ADC",
    "schemaVersion": "3.13.0",
    "id": "DNS_Cache",
    "Example_DNS_Cache": {
        "class": "Tenant",
        "Application": {
            "class": "Application",
            "DNSCache_example": {
                "class": "DNS_Cache",
                "remark": "DNS Cache",
                "answerDefaultZones": true,
                "messageCacheSize": 0,
                "recordCacheSize": 1,
                "recordRotationMethod": "query-id",
                "localZones": {
                    "norecords.com": {
                        "type": "transparent",
                        "records": []
                    },
                    "onerecord.com": {
                        "type": "transparent",
                        "records": [
                            "wiki.onerecord.com 300 IN A 10.10.10.124"
                        ]
                    },
                    "tworecords.com": {
                        "type": "transparent",
                        "records": [
                            "wiki.tworecords.com 300 IN A 10.10.10.125",
                            "wiki.tworecords.com 300 IN A 10.10.10.126"
                        ]
                    }
                },
                "type": "transparent"
            }
        }
    }
}

Back to top


Service Discovery for virtual servers in GSLB Servers

This simple example shows how you can use Service Discovery to automatically discover virtual servers in GSLB Servers. You must have BIG-IP DNS (formerly GTM) provisioned to use these features. See GSLB Server in the Schema Reference for usage options and additional features for GSLB. Important: A GSLB_Server must always be in /Common/Shared as shown in the example.

Warning

When using GSLB features, you must be aware of the items pointed out in Warnings, notably BIG-IP AS3 completely overwrites non-AS3 topologies when a declaration is submitted.

Important

In BIG-IP AS3 3.25 and later, you can no longer rename GLSB_Server objects that reside in /Common. If you need to rename a GSLB_Server, you must first delete the GSLB_Server, and then submit a new declaration with the new name.

This declaration creates the following objects on the BIG-IP (this declaration does not create a tenant, but uses the Common tenant as required for some GSLB features):

  • A GSLB data center named testDataCenter.
  • A GSLB server named testServer with one device, virtualServerDiscoveryMode set to enabled-no-delete (which only allows Service Discovery to add or modify, but not delete), and exposeRouteDomainsEnabled set to true (which allows virtual servers from all route domains to be auto-discovered).
{
    "class": "ADC",
    "schemaVersion": "3.11.0",
    "id": "GSLB_VS_Discovery",
    "Common": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "testDataCenter": {
            	"class": "GSLB_Data_Center"
            },
            "testServer": {
                "class": "GSLB_Server",
                "dataCenter": {
                    "use": "testDataCenter"
                },
                "devices": [{ "address": "10.10.10.10"}],
                "virtualServerDiscoveryMode": "enabled-no-delete",
                "exposeRouteDomainsEnabled": true
            }
        }
    }
}

Back to top


Specifying a GSLB virtual server name in a declaration

In this example, we show how you can specify a GSLB virtual server name in a declaration. In versions prior to 3.21, you were able to reference the GSLB virtual name, but the name defaulted to the index when created by AS3. In BIG-IP AS3 3.21, the name field is available field as optional, which allows you to override the name defaulting to the index.

For additional details and BIG-IP AS3 usage, see GSLB_Virtual_Server in the Schema Reference. Important: A GSLB_Server must always be in /Common/Shared as shown in the example.

In BIG-IP AS3 3.25 and later, you can no longer rename GLSB_Server objects that reside in /Common. If you need to rename a GSLB_Server, you must first delete the GSLB_Server, and then submit a new declaration with the new name.

New in AS3 3.41
AS3 3.41 adds the ability to include persistence options to a GSLB_Domain. The persistence options were not available in previous versions.

This declaration creates the following objects on the BIG-IP (NOTE If you attempt to use this declaration on a version prior to 3.41, it will fail. On previous versions, remove the persistence properties from the GSLB Domain, highlighted in yellow):

  • Partition (tenant) named Example_Tenant.
  • A GSLB Domain named testDomain that defines domain properties, including persistence options, and references a Pool.
  • A GSLB pool named testPool which references a virtual server later in the declaration.
  • A reference to the Common partition, which includes an Application named shared and uses the shared template
  • A GSLB Data Center named testDataCenter.
  • A GSLB server named testServer that references the data center, and includes a device, and a virtual server named virtualAddress1 (which is also referenced from the testPool)
{
    "class": "AS3",
    "persist": false,
    "declaration": {
        "class": "ADC",
        "schemaVersion": "3.41.0",
        "id": "GSLB_Sample",
        "Example_Tenant": {
            "class": "Tenant",
            "Application": {
                "class": "Application",
                "testDomain": {
                    "class": "GSLB_Domain",
                    "domainName": "example.edu",
                    "aliases": [
                        "another.example*"
                    ],
                    "resourceRecordType": "A",
                    "poolLbMode": "ratio",
                    "pools": [
                        {
                            "use": "testPool"
                        }
                    ],
                    "persistCidrIpv4": 24,
                    "persistenceEnabled": true,
                    "ttlPersistence": 3600
                },
                "testPool": {
                    "class": "GSLB_Pool",
                    "members": [
                        {
                            "ratio": 10,
                            "server": {
                                "use": "/Common/Shared/testServer"
                            },
                            "virtualServer": "virtualAddress1"
                        },
                        {
                            "ratio": 10,
                            "server": {
                                "use": "/Common/Shared/testServer"
                            },
                            "virtualServer": "1"
                        }
                    ],
                    "resourceRecordType": "A"
                }
            }
        },
        "Common": {
            "class": "Tenant",
            "Shared": {
                "class": "Application",
                "template": "shared",
                "testDataCenter": {
                    "class": "GSLB_Data_Center"
                },
                "testServer": {
                    "class": "GSLB_Server",
                    "dataCenter": {
                        "use": "testDataCenter"
                    },
                    "devices": [
                        {
                            "address": "1.2.3.7"
                        }
                    ],
                    "virtualServers": [
                        {
                            "address": "1.2.3.8",
                            "port": 5050,
                            "name": "virtualAddress1"
                        },
                        {
                            "address": "1.2.3.9",
                            "port": 5051
                        }
                    ]
                }
            }
        }
    }
}

Back to top


Creating a GSLB pool

In this example, we show how to create GSLB pools in a declaration. This example shows the minium values creating each of the available GSLB pool types (A, AAAA, CNAME, and MX), as well as the other GSLB objects to create a complete configuration.

See the TMSH reference for additional information on GSLB pools. Also see BIG-IP DNS Documentation for your specific version.

For BIG-IP AS3 usage, see GSLB_Pool in the Schema Reference.

New in BIG-IP AS3 3.25
BIG-IP AS3 3.25 and later introduced the enabled property on GSLB Pool members (previously you could enable the pool itself, not individual members). This allows you to specify whether the pool member and its resources are available for load balancing. The default is true. For more information and BIG-IP AS3 usage, see the GSLB Pool Member tables in the Schema Reference, for example GSLB_Pool_Member_A.

Important

In BIG-IP AS3 3.25 and later, you can no longer rename GLSB_Server objects that reside in /Common. If you need to rename a GSLB_Server, you must first delete the GSLB_Server, and then submit a new declaration with the new name.


This declaration creates the following objects on the BIG-IP:

  • Partition (tenant) named ExampleTenant.
  • A GSLB Domain named testDomainAAAA that defines domain properties and references the AAAA pool.
  • A GSLB pool named testPoolAAAA which references a GSLB server.
  • A GSLB Domain named testDomainA that defines domain properties and references the A pool.
  • A GSLB pool named testPoolA which references the same GSLB server.
  • A GSLB Domain named testDomainCNAME with a resource record type of CNAME that references the CNAME pool.
  • A GSLB pool named testPoolCNAME with a resource record type of CNAME.
  • A GSLB Domain named testDomainMX with a resource record type of MX that references the MX pool.
  • A GSLB pool named testPoolMX with a resource record type of MX.
  • A reference to the Common partition, which includes an Application named shared and uses the shared template.
  • A GSLB Data Center named testDataCenter.
  • A GSLB server named testServer that references the data center, and includes a device, and virtual servers.
  • A GSLB Domain named testDomain with a domain name and a resource record type of A.

Important

This example has been updated with the enabled property for pool members in BIG-IP AS3 3.25 and later. If you attempt to use this declaration in an earlier version, it will fail. To use this declaration on a version prior to 3.25, remove the enabled property lines in the GSLB_Pools (highlighted in yellow).

{
    "class": "ADC",
    "schemaVersion": "3.25.0",
    "id": "GSLB_Sample",
    "Common": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "testDataCenter": {
                "class": "GSLB_Data_Center"
            },
            "testServer": {
                "class": "GSLB_Server",
                "dataCenter": {
                    "use": "testDataCenter"
                },
                "devices": [
                    {
                        "address": "1.2.3.7"
                    }
                ],
                "virtualServers": [
                    {
                        "address": "1.2.3.8",
                        "port": 5050
                    },
                    {
                        "address": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
                        "port": 5051
                    },
                    {
                        "address": "1.2.3.9",
                        "port": 5050
                    }
                ]
            },
            "testDomain": {
                "class": "GSLB_Domain",
                "domainName": "OTHER.edu",
                "resourceRecordType": "A"
            }
        }
    },
    "ExampleTenant": {
        "class": "Tenant",
        "Application": {
            "class": "Application",
            "testDomainAAAA": {
                "class": "GSLB_Domain",
                "domainName": "example.edu",
                "resourceRecordType": "AAAA",
                "poolLbMode": "ratio",
                "pools": [
                    {
                        "use": "testPoolAAAA"
                    }
                ]
            },
            "testPoolAAAA": {
                "class": "GSLB_Pool",
                "resourceRecordType": "AAAA",
                "members": [
                    {
                        "server": {
                            "use": "/Common/Shared/testServer"
                        },
                        "virtualServer": "1",
                        "enabled": true
                    }
                ]
            },
            "testDomainA": {
                "class": "GSLB_Domain",
                "domainName": "example.edu",
                "resourceRecordType": "A",
                "poolLbMode": "ratio",
                "pools": [
                    {
                        "use": "testPoolA"
                    }
                ]
            },
            "testPoolA": {
                "class": "GSLB_Pool",
                "resourceRecordType": "A",
                "members": [
                    {
                        "server": {
                            "use": "/Common/Shared/testServer"
                        },
                        "virtualServer": "0",
                        "enabled": false
                    }
                ]
            },
            "testDomainCNAME": {
                "class": "GSLB_Domain",
                "domainName": "example.edu",
                "resourceRecordType": "CNAME",
                "poolLbMode": "ratio",
                "pools": [
                    {
                        "use": "testPoolCNAME"
                    }
                ]
            },
            "testPoolCNAME": {
                "class": "GSLB_Pool",
                "resourceRecordType": "CNAME",
                "members": [
                    {
                        "domainName": "OTHER.edu",
                        "enabled": false
                    }
                ]
            },
            "testDomainMX": {
                "class": "GSLB_Domain",
                "domainName": "example.edu",
                "resourceRecordType": "MX",
                "poolLbMode": "ratio",
                "pools": [
                    {
                        "use": "testPoolMX"
                    }
                ]
            },
            "testPoolMX": {
                "class": "GSLB_Pool",
                "resourceRecordType": "MX",
                "members": [
                    {
                        "domainName": {
                            "use": "/Common/Shared/testDomain"
                        },
                        "enabled": true
                    }
                ]
            }
        }
    }
}

Back to top


Using the depends-on property in GSLB pools

In this example, we show how you can use the depends-on property in your GSLB pool declaration. This property allows you to specify the name of the virtual server on which this pool member depends.

When using depends-on to refer to the GSLB server and the associated virtual server, you must use the following syntax (including /Common/Shared/):

/Common/Shared/<NAME_OF_GSLB_SERVER>:<GSLB_SERVER_VIRTUAL>

Note

The system displays an error if you do not use this syntax.

See the TMSH reference for additional information on GSLB pools.

For BIG-IP AS3 usage, see GSLB_Pool_Member_A and GSLB_Pool_Member_AAAA in the Schema Reference.

Important

In BIG-IP AS3 3.25 and later, you can no longer rename GLSB_Server objects that reside in /Common. If you need to rename a GSLB_Server, you must first delete the GSLB_Server, and then submit a new declaration with the new name.

This declaration creates the following objects on the BIG-IP:

  • Partition (tenant) named ExampleTenant.
  • A GSLB Domain named testDomainA that defines domain properties and references the pool for A records.
  • A GSLB pool named testPoolA with a resource type of A and two server members, both referencing the same GSLB server. The first does not reference a virtual server and uses depends-on set to none, the second references the first two virtual servers in the GSLB Server (defined later in the declaration) and uses the depends-on property to specify two virtual servers.
  • A GSLB Domain named testDomainAAAA that defines domain properties and references the AAAA pool.
  • A GSLB pool named testPoolAAAA with a resource type of AAAA and two server members, both referencing the same GSLB server. The first references a virtual server and uses the depends-on property to specify one virtual server (the second) in the GSLB Server (defined later in the declaration), the second server references on virtual server (the fourth) in the GSLB Server and uses depends-on set to none
  • A reference to the Common partition, which includes an Application named Shared and uses the Shared template.
  • A GSLB Data Center named testDataCenter.
  • A GSLB server named testServer that references the data center, and includes a device, and four virtual servers referenced from the pools.
{
    "class": "ADC",
    "schemaVersion": "3.24.0",
    "id": "GSLB_Sample",
    "Common": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "testDataCenter": {
                "class": "GSLB_Data_Center"
            },
            "testServer": {
                "class": "GSLB_Server",
                "dataCenter": {
                    "use": "testDataCenter"
                },
                "devices": [
                    {
                        "address": "1.2.3.7"
                    }
                ],
                "virtualServers": [
                    {
                        "address": "1.2.3.8",
                        "port": 5050
                    },
                    {
                        "address": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
                        "port": 5051
                    },
                    {
                        "address": "1.2.3.9",
                        "port": 5050
                    },
                    {
                        "address": "2001:0db8:85a3:0000:0000:8a2e:0370:1337",
                        "port": 5052
                    }
                ]
            }
        }
    },
    "exampleTenant": {
        "class": "Tenant",
        "Application": {
            "class": "Application",
            "testDomainA": {
                "class": "GSLB_Domain",
                "domainName": "example.edu",
                "resourceRecordType": "A",
                "poolLbMode": "ratio",
                "pools": [
                    {
                        "use": "testPoolA"
                    }
                ]
            },
            "testPoolA": {
                "class": "GSLB_Pool",
                "resourceRecordType": "A",
                "members": [
                    {
                        "server": {
                            "use": "/Common/Shared/testServer"
                        },
                        "virtualServer": "0",
                        "dependsOn": "none"
                    },
                    {
                        "server": {
                            "use": "/Common/Shared/testServer"
                        },
                        "virtualServer": "2",
                        "dependsOn": [
                            "/Common/Shared/testServer:0",
                            "/Common/Shared/testServer:1"
                        ]
                    }
                ]
            },
            "testDomainAAAA": {
                "class": "GSLB_Domain",
                "domainName": "example.edu",
                "resourceRecordType": "AAAA",
                "poolLbMode": "ratio",
                "pools": [
                    {
                        "use": "testPoolAAAA"
                    }
                ]
            },
            "testPoolAAAA": {
                "class": "GSLB_Pool",
                "resourceRecordType": "AAAA",
                "members": [
                    {
                        "server": {
                            "use": "/Common/Shared/testServer"
                        },
                        "virtualServer": "1",
                        "dependsOn": [
                            "/Common/Shared/testServer:3"
                        ]
                    },
                   {
                        "server": {
                            "use": "/Common/Shared/testServer"
                        },
                        "virtualServer": "3",
                        "dependsOn": "none"
                    }
                ]
            }
        }
    }
}

Back to top


Service Discovery for virtual servers in GSLB Servers

This simple example shows how you can use Service Discovery to automatically discover virtual servers in GSLB Servers. You must have BIG-IP DNS (formerly GTM) provisioned to use these features. See GSLB Server in the Schema Reference for usage options and additional features for GSLB.

Warning

When using GSLB features, you must be aware of the items pointed out in Warnings, notably BIG-IP AS3 completely overwrites non-AS3 topologies when a declaration is submitted.
BIG-IP DNS must be licensed and provisioned to use this declaration.

Important

In BIG-IP AS3 3.25 and later, you can no longer rename GLSB_Server objects that reside in /Common. If you need to rename a GSLB_Server, you must first delete the GSLB_Server, and then submit a new declaration with the new name.

This declaration creates the following objects on the BIG-IP (this declaration does not create a tenant, but uses the Common tenant as required for some GSLB features):

  • A GSLB data center named testDataCenter.
  • A GSLB server named testServer with one device, virtualServerDiscoveryMode set to enabled-no-delete (which only allows Service Discovery to add or modify, but not delete), and exposeRouteDomainsEnabled set to true (which allows virtual servers from all route domains to be auto-discovered).
{
    "class": "ADC",
    "schemaVersion": "3.11.0",
    "id": "GSLB_VS_Discovery",
    "Common": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "testDataCenter": {
            	"class": "GSLB_Data_Center"
            },
            "testServer": {
                "class": "GSLB_Server",
                "dataCenter": {
                    "use": "testDataCenter"
                },
                "devices": [{ "address": "10.10.10.10"}],
                "virtualServerDiscoveryMode": "enabled-no-delete",
                "exposeRouteDomainsEnabled": true
            }
        }
    }
}

Back to top


Referencing a virtual server in a GSLB pool with a use pointer

This example shows how you can reference a virtual server in a GSLB pool with a use pointer to a virtual server defined in the declaration. In previous versions, you would have to include the full path to the virtual server on the BIG-IP. See GSLB_Pool and Pointer_GSLB_Pool in the Schema Reference for usage options and additional features for GSLB.

Note

When using GSLB features, you must be aware of the items pointed out in Warnings, notably BIG-IP AS3 completely overwrites non-AS3 topologies when a declaration is submitted.

This declaration creates the following objects on the BIG-IP:

  • A GSLB data center named testDataCenter.
  • A GSLB server named testServer with one device and a reference to the data center.
  • A tenant named TEST_GSLB_Pool.
  • An Application named application.
  • A GSLB pool named gslbPool with use pointers to the GSLB server and the virtual server defined below it.
  • A virtual server named virtualServer referred to in the GSLB pool.
{
    "class": "ADC",
    "schemaVersion": "3.44.0",
    "id": "GSLB_Pool",
    "Common": {
        "class": "Tenant",
        "Shared": {
            "class": "Application",
            "template": "shared",
            "testDataCenter": {
            	"class": "GSLB_Data_Center"
            },
            "testServer": {
                "class": "GSLB_Server",
                "dataCenter": {
                    "use": "testDataCenter"
                },
                "devices": [
                    {
                        "address": "10.10.10.10"
                    }
                ],
                "virtualServerDiscoveryMode": "enabled-no-delete"
            }
        }
    },
    "TEST_GSLB_Pool": {
        "class": "Tenant",
        "Application": {
            "class": "Application",
            "gslbPool": {
                "class": "GSLB_Pool",
                "resourceRecordType": "A",
                "members": [
                    {
                        "server": {
                            "use": "/Common/Shared/testServer"
                        },
                        "virtualServer": {
                            "use": "virtualServer"
                        }
                    }
                ]
            },
            "virtualServer": {
                "class": "Service_HTTP",
                "virtualAddresses": [
                    "10.10.1.1"
                ]
            }
        }
    }
}

Back to top