138
Step Command Remarks
2. Enter interface view.
interface
interface-type
interface-number
N/A
3. Enable NAT hairpin.
nat hairpin enable
By default, NAT hairpin is disabled.
Configuring NAT with ALG
Configure NAT with ALG for a protocol to translate the IP addresses and port numbers in the
payloads for application layer packets.
To configure NAT with ALG:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Configure NAT with ALG for
a protocol or all protocols.
nat alg
{
all
|
dns
|
ftp
|
h323
|
icmp-error
|
ils
|
mgcp
|
nbt
|
pptp
|
rsh
|
rtsp
|
sccp
|
sip
|
sqlnet
|
tftp
|
xdmcp
}
By default, NAT with ALG is enabled.
Configuring NAT session logging
NAT session logging records NAT session information, including translation information and access
information.
A NAT device generates NAT session logs for the following events:
• NAT session establishment.
• NAT session removal. This event occurs when you add a configuration with a higher priority,
remove a configuration, change ACLs, when a NAT session ages out, or when you manually
delete a NAT session.
• Active NAT session logging.
To enable NAT session logging:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Enable NAT logging.
nat log enable
[
acl
acl-number ]
By default, NAT logging is
disabled.
3. Enable NAT session
logging.
• For NAT session establishment
events:
nat log flow-begin
• For NAT session removal events:
nat log flow-end
• For active NAT flows:
nat log flow-active time-value
By default, NAT session
logging is disabled.
Displaying and maintaining NAT
Execute display commands in any view and reset commands in user view.