Fortinet black logo

Handbook

How to set up the load balance method DNS-Query-Origin

How to set up the load balance method DNS-Query-Origin

Perform the following steps to setup the load balance method DNS-Query-Origin.

  1. Create FQDN in GSLB Services and choose DNS-Query-Origin as the Virtual Server Pool Selection Method.
  2. Create multiple FQDN members.
    1. Click Create Member in FQDN and choose Virtual Server Pool.
    2. Click Create Location List and add location(s) to list (if needed).
    3. Click Create Address Group and then add the IP/Netmasks or IP ranges as address members (if needed).
  3. Create second Virtual Server Pool with other location(s) using the steps above.

  4. Add the virtual servers into Virtual Server Pool. The FQDN will respond to the DNS query according to the Virtual Server Pool’s listed location(s) and DNS query’s source IP.

Note: If you want to use DNS-Query-Origin for matching Virtual Server Pool, all query source IP locations should be added to the location list or all corresponding IP/Netmasks or IP ranges should be added to the address group. Otherwise it uses Weight Round Robin method.

Example 1: Use only Location list
  • Define one Location: United_States
  • Assign Location United_States to virtual server pool: Virtual_Server_Pool_US
  • Define second Location: Germany
  • Assign Location Germany to virtual server pool: Virtual_Server_Pool_Germany

Result:

Queries from the United States will get replied from Virtual_Server_Pool_US, queries from Germany will get replied from Virtual_Server_Pool_Germany, queries other than these two countries will use Weight Round Robin between those two virtual server pools.

Example 2: Use Location list together with Address Group

Following the scenario set in Example 1, after having run the configuration for a while, you are finding that some particular source IP from the United States (here we are using 8.8.8.8 and 8.8.4.4 as an example) is not always getting replies from the Virtual_Server_Pool_US.

  • Define an Address Group: United_States_IPs and add AddressNet 8.8.8.8/32 and AddressRange 8.8.4.4-8.8.4.4 as the members
  • Assign Address Group United_States_IPs to virtual server pool Virtual_Server_Pool_US

Result:

Queries from 8.8.8.8 and 8.8.4.4 will also get replied from Virtual_Server_Pool_US.

Example 3: Use only Address Group
  • Define one Address Group: Google_Resolvers
  • Add AddressNet 8.8.8.8/32 and AddressRange 8.8.4.4-8.8.4.4 as the members
  • Assign Address Group Google_Resolvers to virtual server pool Pool_for_Google
  • Define another Address Group: any_IP
  • Add AddressNet 0.0.0.0/0 as the member
  • Assign Address Group any_IP to virtual server pool Pool_General

Result:

Queries from 8.8.8.8 and 8.8.4.4 will get replied from virtual server pool Pool_for_Google. Queries from other IP addresses will get replied from virtual server pool Pool_General.

Note: Although 8.8.8.8 and 8.8.4.4 are also included in the Address Group any_IP, the GSLB service is matching the virtual server pool by the sequence they are in the FQDN configuration. They will match the Address Group Google_Resolvers first, and get replied from Pool_for_Google.

Example 4: Use city-level location list
  • Define one Location: CA_Sunnyvale
  • Assign Location CA_Sunnyvale to virtual server pool Virtual_Server_Pool_CA_Sunnyvale
  • Define second Location: CA_ Sacramento
  • Assign Location CA_ Sacramento to virtual server pool Virtual_Server_Pool_CA_Sacramento

Result:

Queries from Sunnyvale will get replied from Virtual_Server_Pool_CA_Sunnvayle, queries from Sacramento will get replied from Virtual_Server_Pool_CA_Sacramento.

How to set up the load balance method DNS-Query-Origin

Perform the following steps to setup the load balance method DNS-Query-Origin.

  1. Create FQDN in GSLB Services and choose DNS-Query-Origin as the Virtual Server Pool Selection Method.
  2. Create multiple FQDN members.
    1. Click Create Member in FQDN and choose Virtual Server Pool.
    2. Click Create Location List and add location(s) to list (if needed).
    3. Click Create Address Group and then add the IP/Netmasks or IP ranges as address members (if needed).
  3. Create second Virtual Server Pool with other location(s) using the steps above.

  4. Add the virtual servers into Virtual Server Pool. The FQDN will respond to the DNS query according to the Virtual Server Pool’s listed location(s) and DNS query’s source IP.

Note: If you want to use DNS-Query-Origin for matching Virtual Server Pool, all query source IP locations should be added to the location list or all corresponding IP/Netmasks or IP ranges should be added to the address group. Otherwise it uses Weight Round Robin method.

Example 1: Use only Location list
  • Define one Location: United_States
  • Assign Location United_States to virtual server pool: Virtual_Server_Pool_US
  • Define second Location: Germany
  • Assign Location Germany to virtual server pool: Virtual_Server_Pool_Germany

Result:

Queries from the United States will get replied from Virtual_Server_Pool_US, queries from Germany will get replied from Virtual_Server_Pool_Germany, queries other than these two countries will use Weight Round Robin between those two virtual server pools.

Example 2: Use Location list together with Address Group

Following the scenario set in Example 1, after having run the configuration for a while, you are finding that some particular source IP from the United States (here we are using 8.8.8.8 and 8.8.4.4 as an example) is not always getting replies from the Virtual_Server_Pool_US.

  • Define an Address Group: United_States_IPs and add AddressNet 8.8.8.8/32 and AddressRange 8.8.4.4-8.8.4.4 as the members
  • Assign Address Group United_States_IPs to virtual server pool Virtual_Server_Pool_US

Result:

Queries from 8.8.8.8 and 8.8.4.4 will also get replied from Virtual_Server_Pool_US.

Example 3: Use only Address Group
  • Define one Address Group: Google_Resolvers
  • Add AddressNet 8.8.8.8/32 and AddressRange 8.8.4.4-8.8.4.4 as the members
  • Assign Address Group Google_Resolvers to virtual server pool Pool_for_Google
  • Define another Address Group: any_IP
  • Add AddressNet 0.0.0.0/0 as the member
  • Assign Address Group any_IP to virtual server pool Pool_General

Result:

Queries from 8.8.8.8 and 8.8.4.4 will get replied from virtual server pool Pool_for_Google. Queries from other IP addresses will get replied from virtual server pool Pool_General.

Note: Although 8.8.8.8 and 8.8.4.4 are also included in the Address Group any_IP, the GSLB service is matching the virtual server pool by the sequence they are in the FQDN configuration. They will match the Address Group Google_Resolvers first, and get replied from Pool_for_Google.

Example 4: Use city-level location list
  • Define one Location: CA_Sunnyvale
  • Assign Location CA_Sunnyvale to virtual server pool Virtual_Server_Pool_CA_Sunnyvale
  • Define second Location: CA_ Sacramento
  • Assign Location CA_ Sacramento to virtual server pool Virtual_Server_Pool_CA_Sacramento

Result:

Queries from Sunnyvale will get replied from Virtual_Server_Pool_CA_Sunnvayle, queries from Sacramento will get replied from Virtual_Server_Pool_CA_Sacramento.