This section provides an example for configuring single-server smart DNS in ISP egress mode.
As shown in Figure 1, an enterprise deploys ISP1 server to provide the web service whose domain name is www.example.com. The private IP address of ISP1 server is 10.1.1.10, and the public IP address after server mapping is 1.1.1.10. The DNS server on the enterprise intranet has the mapping between domain name www.example.com and ISP1 server address 1.1.1.10.
An ISP1 user who accesses www.example.com obtains ISP1 server address 1.1.1.10 and accesses ISP1 server through ISP1 network.
The enterprise also requests a public IP address 2.2.2.10 from ISP2. The enterprise expects that an ISP2 user accessing www.example.com can obtain the ISP2 address and access ISP1 server through ISP2 network.
To enable ISP2 users to obtain ISP2 address 2.2.2.10, configure smart DNS in ISP egress mode to change IP address 1.1.1.10 after DNS resolution to 2.2.2.10.
Because only one web server is deployed on the intranet, you need to configure single-server smart DNS in ISP egress mode. Single-server smart DNS must work with the NAT server function. The configuration roadmap is as follows:
<FW> system-view [FW] dns-smart enable
[FW] interface GigabitEthernet0/0/1 [FW-GigabitEthernet0/0/1] ip address 1.1.1.2 24 [FW-GigabitEthernet0/0/1] gateway 1.1.1.1 [FW-GigabitEthernet0/0/1] redirect-reverse next-hop 1.1.1.1 [FW-GigabitEthernet0/0/1] quit [FW] interface GigabitEthernet0/0/2 [FW-GigabitEthernet0/0/2] ip address 2.2.2.2 24 [FW-GigabitEthernet0/0/2] gateway 2.2.2.1 [FW-GigabitEthernet0/0/2] redirect-reverse next-hop 2.2.2.1 [FW-GigabitEthernet0/0/2] quit
# nat server for_isp1 global 1.1.1.10 inside 10.1.1.10 no-reverse nat server for_isp2 global 2.2.2.10 inside 10.1.1.10 no-reverse # dns-smart enable # interface GigabitEthernet0/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 # interface GigabitEthernet0/0/2 ip address 2.2.2.2 255.255.255.0 redirect-reverse next-hop 2.2.2.1 gateway 2.2.2.1 # dns-smart group 1 type single real-server-ip 1.1.1.10 out-interface GigabitEthernet0/0/2 map 2.2.2.10 # return