R3303-HP HSR6800 Routers Layer 3 - IP Services Configuration Guide

108
Figure 51 Network diagram
Configuration procedure
# Configure the IP addresses for the interfaces. (Details not shown.)
# Enter the view of interface GigabitEthernet 3/1/2.
<Router> system-view
[Router] interface gigabitethernet 3/1/2
# Configure the internal Web server.
[Router-GigabitEthernet3/1/2] nat server protocol tcp global 202.38.1.2 inside
10.110.10.1 www
# Configure the internal FTP server.
[Router-GigabitEthernet3/1/2] nat server protocol tcp global 202.38.1.2 inside
10.110.10.2 ftp
[Router-GigabitEthernet3/1/2] quit
# Configure two DNS mapping entries: map the domain name www.server.com of the Web server to
202.38.1.2, and ftp.server.com of the FTP server to 202.38.1.2.
[Router] nat dns-map domain www.server.com protocol tcp ip 202.38.1.2 port www
[Router] nat dns-map domain ftp.server.com protocol tcp ip 202.38.1.2 port ftp
[Router] quit
Verifying the configuration
# After completing the configurations, display the DNS mapping configuration information.
<Router> display nat dns-map
NAT DNS mapping information:
There are currently 2 NAT DNS mapping(s)
Domain-name: www.server.com
Global-IP : 202.38.1.2
Global-port: 80(www)
Protocol : 6(TCP)
Domain-name: ftp.server.com
Global-IP : 202.38.1.2
Global-port: 21(ftp)
Protocol : 6(TCP)
Host A and Host B can use the domain name www.server.com to access the Web server, and use
ftp.server.com to access the FTP server.
FTP server
10.110.10.2/16
Host A
10.110.10.3/16
Internet
GE3/1/1
10.110.10.10/16
GE3/1/2
202.38.1.1/24
Router
Web server
10.110.10.1/16
DNS server
202.38.1.4/24
Host B
202.38.1.10/24