nat static enable
Use nat static enable to enable static NAT on an interface.
Use undo nat static enable to disable static NAT on an interface.
Syntax
nat static enable
undo nat static enable
Default
Static NAT is disabled.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
Static NAT mappings take effect on an interface only after static NAT is enabled on the interface.
Examples
# Configure an outbound static NAT mapping between private IP address 192.168.1.1 and public IP
address 2.2.2.2, and enable static NAT on interface GigabitEthernet 2/0/1.
<Sysname> system-view
[Sysname] nat static outbound 192.168.1.1 2.2.2.2
[Sysname] interface gigabitethernet 2/0/1
[Sysname-GigabitEthernet2/0/1] nat static enable
Related commands
•
display nat all
display nat static
•
•
nat static
nat static net-to-net
•
nat static inbound
Use nat static inbound to configure a one-to-one mapping for inbound static NAT.
Use undo nat static inbound to remove a one-to-one mapping for inbound static NAT.
Syntax
nat static inbound global-ip [ vpn-instance global-name ] local-ip [ vpn-instance local-name ] [ acl
{ acl-number | name acl-name } [ reversible ] ]
undo nat static inbound global-ip [ vpn-instance global-name ]
Default
No NAT mapping exists.
228