R0106-HP MSR Router Series Layer 3 - IP Services Command Reference(V7)
159
server. NAT Server maps the public IP and port to the private IP and port of the internal server. This allows
an internal host to access an internal server on the same private network by using the domain name of
the internal server when the DNS server is on the public network.
You can configure multiple NAT with DNS mappings.
Examples
# Configure a NAT with DNS mapping between the domain name www.server.com, the public IP
address 202.112.0.1, and the public port number 12345. Specify the protocol type as TCP.
<Sysname> system-view
[Sysname] nat dns-map domain www.server.com protocol tcp ip 202.112.0.1 port 12345
Related commands
• display nat all
• display nat dns-map
• nat server
nat hairpin enable
Use nat hairpin enable to enable NAT hairpin.
Use undo nat hairpin enable to disable NAT hairpin.
Syntax
nat hairpin enable
undo nat hairpin enable
Default
NAT hairpin is disabled.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
NAT hairpin allows internal hosts behind the same NAT device to access each other only after they use
the NAT addresses. NAT hairpin functions on the interface that connects the internal network and
translates the source and destination IP addresses of a packet on the interface.
NAT hairpin typically operates with NAT Server, outbound dynamic NAT, or outbound static NAT.
Examples
# Enable NAT hairpin on interface GigabitEthernet 2/1/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 2/1/1
[Sysname-GigabitEthernet2/1/1] nat hairpin enable
Related commands
display nat all