R0106-HP MSR Router Series Layer 3 - IP Services Configuration Guide(V7)
130
NAT configuration examples
One-to-one static NAT for internal-to-external access
Network requirements
Configure static NAT to allow the user at 10.110.10.8/24 to access the Internet.
Figure 54 Network diagram
Configuration procedure
# Specify IP addresses for the interfaces. (Details not shown.)
# Configure a one-to-one static NAT mapping between internal address 10.110.10.8 and the NAT
address 202.38.1.100.
<Router> system-view
[Router] nat static 10.110.10.8 202.38.1.100
# Enable static NAT on interface GigabitEthernet 2/1/2.
[Router] interface gigabitethernet 2/1/2
[Router-GigabitEthernet2/1/2] nat static enable
[Router-GigabitEthernet2/1/2] quit
Verifying the configuration
# Verify that the host at 10.110.10.8/24 can access the server on the Internet. (Details not shown.)
# Display static NAT configuration.
[Router] display nat static
Static NAT mappings:
There are 1 outbound static NAT mappings.
IP-to-IP:
Local IP : 10.110.10.8
Global IP : 202.38.1.100
Interfaces enabled with static NAT:
There are 1 interfaces enabled with static NAT.
Interface: GigabitEthernet2/1/2
# Use the display nat session verbose command to display NAT session information generated when the
host accesses an external server.
[Router] display nat session verbose
Initiator:
Source IP/port: 10.110.10.8/42496
Destination IP/port: 202.38.1.111/2048