< Home

Web: Example for Configuring Round Robin-Based Multi-Server Smart DNS

This section provides an example for configuring round robin-based multi-server smart DNS.

Networking Requirements

As shown in Figure 1, an enterprise deploys two web servers to provide services for external users, and the domain name is www.example.com. The private IP addresses of the servers are respectively 10.1.1.10 and 10.1.1.11, and two public IP addresses 1.1.1.9 and 1.1.1.10 are provided for ISP1 users to access the servers. The DNS server has the mappings between the domain name www.example.com and the public addresses 1.1.1.9 and 1.1.1.10.

Multiple ISP1 users may access the Web server using the same link, causing link congestion. To ensure that different DNS reply addresses are allocated to ISP1 users, configure round robin so that traffic arrives the web server over different links, implementing load balancing. The enterprise requires that when ISP1 users access www.example.com, the domain name be resolved to either public IP address 1.1.1.9 or 1.1.1.10 of the ISP1 server, then the access traffic be transmitted over the ISP1 network to the FW, and the FW use the NAT Server function to map the public IP address to private IP address 10.1.1.10 or 10.1.1.11 of the ISP1 server.

Figure 1 Networking diagram for configuring round robin-based multi-server smart DNS

Configuration Roadmap

As shown in Figure 1, in normal cases, ISP users can obtain two server IP addresses, which are 1.1.1.9 and 1.1.1.10. You can configure round robin-based smart DNS to enable the FW to allocate addresses to users based on weights. The FW changes the destination addresses of user access requests to divert traffic to web servers over various links, implementing load balancing. The configuration roadmap is as follows:

  1. Enable smart DNS.

  2. Configure ISP egress-based multi-server smart DNS because the enterprise deploys two web servers. The multi-server smart DNS function maps ISP egresses with the public IP addresses of the ISP servers. For example, ISP1 egress GE0/0/1 can be mapped to ISP1 server addresses 1.1.1.9 and 1.1.1.10.

  3. Configure the NAT Server function.
    • Configure a NAT Server mapping for the FW to translate ISP1 public IP address 1.1.1.9 to the private IP address 10.1.1.10 of the ISP1 server, so that ISP1 users can access the ISP1 server using the public IP address.

    • Configure a NAT Server mapping for the FW to translate ISP1 public IP address 1.1.1.10 to the private IP address 10.1.1.11 of the ISP1 server, so that ISP1 users can access the ISP1 server using the public IP address.

  4. Configure sticky load balancing.

Procedure

  1. Configure smart DNS.

    Choose Network > DNS > Smart DNS.

    Enable Smart DNS and click Apply.

    In Smart DNS List, click Add, configure the parameters of multi-server smart DNS as follows, and set the IP addresses returned to ISP1 users to ISP1 server addresses 1.1.1.9 and 1.1.1.10.

    Scenario

    Multi-server

    Traffic Distribution Mode

    Round Robin

    ISP WAN Interface

    GigabitEthernet 0/0/1

    ISP Server Public Address

    1.1.1.9

    1.1.1.10

  2. Configure NAT Server mappings.

    Choose Policy > NAT Policy > Server Mapping. In Server Mapping List, click Add, configure server mapping parameters as follows, and map the public IP address 1.1.1.10 of ISP1 server to private IP address 10.1.1.10.

    Name

    isp_server_nat_1

    isp_server_nat_2

    Public IP Address

    1.1.1.9

    1.1.1.10

    Private IP Address

    10.1.1.10

    10.1.1.11

  3. Set network parameters for interface GigabitEthernet 0/0/1 and enable sticky load balancing.

    Choose Network > Interface, click of GigabitEthernet 0/0/1, select Multi-egress options, and configure the parameters of sticky load balancing as follows. In the example, basic interface settings (such as interface IP addresses and default gateway addresses) have been completed.

    The sticky load balancing function can be configured only after the IP address and gateway address are set on the interface.

Configuration Verification

  1. Ping www.example.com from the PC of an ISP1 user. The returned server address is 1.1.1.9 or 1.1.1.10.

Configuration Scripts

#
nat server isp_server_nat_1 global 1.1.1.9 inside 10.1.1.10 no-reverse
nat server isp_server_nat_2 global 1.1.1.10 inside 10.1.1.11 no-reverse
#
dns-smart enable
#
dns-smart group 1 type multi
  metric roundrobin
  weight-rule roundrobin 1.1.1.9 1.1.1.10
  out-interface GigabitEthernet 0/0/1 map weight-rule
#
interface GigabitEthernet 0/0/1
 ip address 1.1.1.2 255.255.255.0
 redirect-reverse next-hop 1.1.1.1
 gateway 1.1.1.1
#
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >