R2511-HP MSR Router Series Layer 3 - IP Services Command Reference(V5)

165
Default
No log is generated when a session is established.
Views
System view
Default command level
2: System level
Examples
# Enable logging of NAT session establishment events.
<Sysname> system-view
[Sysname] nat log flow-begin
nat mapping-behavior
Use nat mapping-behavior to configure the mapping behavior mode for NAPT.
Use undo nat mapping-behavior to restore the default.
Syntax
nat mapping-behavior endpoint-independent [ acl acl-number ]
undo nat mapping-behavior endpoint-independent [ acl acl-number ]
Default
NAT mapping behavior mode is Address and Port-Dependent Mapping.
Views
System view
Default command level
2: System level
Parameters
endpoint-independent: Specifies the endpoint-independent mapping behavior mode. In this mode, the
peer IP address and peer port are not considered in address translation.
acl acl-number: Specifies the ACL for matching a specific NAT mapping behavior mode. The acl-number
argument represents the ACL number in the range of 2000 to 3999.
Usage guidelines
For packets with the same source address and port number, the same NAPT mapping applies so that the
source IP address and port number are mapped to the same external address and port number,
regardless of the destination addresses of the packets. The NAT gateway also allows external hosts to
access the internal network by using the translated external addresses and port numbers. This mode
facilitates communication among hosts that connect to different NAT gateways.
For packets with the same source address and source port number but different destination addresses
and destination port numbers, different NAPT mappings apply so that the source address and port
number are mapped to the same external IP address but different port numbers. The NAT gateway allows
the hosts only on the corresponding external networks where these destination addresses reside to
access the internal network. This mode is secure but inconvenient for communication among hosts that
connect to different NAT gateway.