R3204P16-HP Load Balancing Module Network Management Command Reference-6PW101

91
CAUTION:
W
hen the protocol type is not
udp (with a protocol number of 17) or tcp (with a protocol number of 6), you
can configure one-to-one NAT between an internal IP address and an external IP address only, but canno
t
specify port numbers.
Examples
# Allow external hosts to ping the host with an IP address of 10.110.10.12 in VPN vrf10 by using the ping
202.110.10.11 command.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/1
[Sysname-GigabitEthernet 0/1] nat server protocol icmp global 202.110.10.11 inside
10.110.10.12 vpn-instance vrf10
# Allow external hosts to access the Telnet services of internal servers 10.110.10.1 to 10.110.10.100 in
private network through the public address of 202.110.10.10 and port numbers from 1001 to 1100. As a
result, a user can telnet to 202.110.10.10:1001 to access 10.110.10.1, telnet to 202.110.10.10:1002 to
access 10.110.10.2, and so on.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/1
[Sysname- GigabitEthernet0/1] nat server protocol tcp global 202.110.10.10 1001 1100
inside 10.110.10.1 10.110.10.100 telnet vpn-instance vrf10
nat static
Syntax
nat static local-ip global-ip
undo nat static local-ip global-ip
View
System view
Default level
2: System level
Parameters
local-ip: Internal IP address.
global-ip: External IP address.
Description
Use the nat static command to configure a one-to-one static NAT mapping.
Use the undo nat static command to remove a one-to-one static NAT mapping.
Related commands: display nat static.
Examples
# Configure static NAT mapping between internal IP address 192.168.1.1 and external IP address
2.2.2.2.
<Sysname> system-view
[Sysname] nat static 192.168.1.1 2.2.2.2