R2511-HP MSR Router Series Layer 3 - IP Services Command Reference(V5)
173
nat static net-to-net
Use nat static net-to-net to configure a net-to-net static NAT mapping.
Use undo nat static net-to-net to remove a net-to-net static NAT mapping.
Syntax
nat static [ acl-number ] net-to-net local-start-address local-end-address global global-network
{ netmask-length | netmask }
undo nat static [ acl-number ] net-to-net local-start-address local-end-address global global-network
{ netmask-length | netmask }
Views
System view
Default command level
2: System level
Parameters
acl-number: Specifies an ACL number in the range of 2000 to 3999. You can use an ACL to specify the
destination addresses that internal hosts can access.
local-start-address local-end-address: Specifies the internal network address range, which contains at
most 255 IP addresses.
netmask-length: Specifies the length of the network mask.
netmask: Specifies the network mask.
Usage guidelines
The IP addresses of the internal network must be on the same network segment according to the mask
length of the external network address.
Examples
# Configure a bidirectional static NAT mapping between internal network address 192.168.1.0/24 and
external network address 2.2.2.0/24.
<Sysname> system-view
[Sysname] nat static net-to-net 192.168.1.1 192.168.1.255 global 2.2.2.0 24
# Configure static NAT to allow internal hosts in 192.168.1.0/24 to access only the external network
3.3.3.0/24 by using an external IP address in 2.2.2.0/24.
<Sysname> system-view
[Sysname] acl number 3001
[Sysname-acl-adv-3001] rule permit ip destination 3.3.3.0 0.0.0.255
[Sysname-acl-adv-3001] quit
[Sysname] nat static 3001 net-to-net 192.168.1.1 192.168.1.255 global 2.2.2.0 24
Related commands
display nat static
port-range
Use port-range to configure the port range for a NAT address group.
Use undo port-range to restore the default.










