The display nat session table command displays information about NAT session entries.
This command is supported only on the NetEngine 8000 F1A.
display nat session table [ pat | no-pat ] [ verbose | source { inside inside-address | global global-address | ipv6 ipv6-address } | destination { inside inside-address | global global-address | ipv6 ipv6-address } | slot slot-id | source-vpn-instance vpn-instance-name | destination-vpn-instance vpn-instance-name | protocol { protocol-number | tcp | udp | icmp | esp | gre | sctp | udplite } | destination-port port-number | source-port-global source-port-global-number | cpe cpe-address [ prefix-length prefix-length ] | { nat-instance instance-name | nat64-instance instance-name } | alg { all | ftp | pptp | rtsp | sip | dns | http } | long-link ] *
Parameter | Description | Value |
---|---|---|
pat |
Displays PAT session entries. |
- |
no-pat |
Displays NO-PAT session entries. |
- |
verbose |
Displays detailed information about NAT session entries. |
- |
source |
Source IP address. |
- |
inside inside-address |
Displays NAT session entry information with a specified private IP address. |
The value is in dotted decimal notation. |
global global-address |
Displays NAT session entry information with a specified public IP address. |
The value is in dotted decimal notation. |
ipv6 ipv6-address |
Displays NAT session entry information with a specified source IPv6 address. |
The value is a 32-bit hexadecimal number in the format of X:X::X:X. |
destination |
Destination IP address. |
- |
slot slot-id |
Specifies the slot ID of a service board. |
The value is a string of 1 to 15 case-sensitive characters, spaces not supported. |
source-vpn-instance vpn-instance-name |
Displays NAT session entry information with a specified source VPN instance name. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
destination-vpn-instance vpn-instance-name |
Displays NAT session entry information with a specified destination VPN instance name. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
protocol |
Displays NAT session entry information with a specified protocol. |
- |
protocol-number |
Displays NAT session entry information with a specified protocol number. |
The value is an integer ranging from 0 to 255. |
tcp |
Displays NAT session entries of TCP. |
- |
udp |
Displays NAT session entries of UDP. |
- |
icmp |
Displays NAT session entries of ICMP. |
- |
esp |
Displays NAT session entries of ESP. |
- |
gre |
Displays NAT session entries of GRE. |
- |
sctp |
Displays NAT session entries of SCTP. |
- |
udplite |
Displays NAT session entries of UDPLITE. |
- |
destination-port port-number |
Displays NAT session entry information with a specified destination port number. |
The value is an integer ranging from 0 to 65535. |
source-port-global source-port-global-number |
Displays NAT session entry information with a specified source public port number. |
The value is an integer ranging from 0 to 65535. |
cpe cpe-address |
Displays session entry information based on the IPv6 address of a home gateway. |
The value is a 32-bit hexadecimal number in the format of X:X::X:X. |
prefix-length prefix-length |
Displays session entry information based on the prefix length of the IPv6 address of a home gateway. |
The value is an integer ranging from 1 to 128. |
nat-instance instance-name |
Displays NAT session entry information with a specified NAT instance name. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
alg |
Application Layer Gateway. |
- |
all |
NAT ALG for all protocols. |
- |
ftp |
Enables NAT ALG for FTP. |
- |
pptp |
Enables NAT ALG for PPTP. |
- |
rtsp |
Enables NAT ALG for RTSP. |
- |
sip |
Enables NAT ALG for SIP. |
- |
nat64-instance instance-name |
Displays NAT64 session entry information with a specified NAT64 instance name. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
dns |
Enables NAT ALG for DNS. |
- |
http |
Enables NAT ALG for HTTP. |
- |
long-link |
Specifies a long-connection session entry. This parameter applies only to NAT instances. |
- |
Usage Scenario
To view information about NAT session entries based on a specified IP address, port number, and protocol type, run the display nat session table command. The command output contains information about established NAT sessions.
Precautions
When the device executes the display nat session table command, the device queries each flow table and counts the total number of flow tables. The total number is displayed in the following output Current total sessions. The device then displays the latest flow table information. During this process, if flow tables are created or deleted after aging, the total number of displayed flow tables in the following output differs that that in the preceding output Current total sessions.
The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display nat session table long-link verbose This operation will take a few minutes. Press 'Ctrl+C' to break ... Slot: 1 Current total sessions: 1. tcp: 10.1.1.5:1120[10.2.2.1:1033]-->172.17.2.2:0 172.17.2.2:0-->10.2.2.1:1033[10.1.1.5:1120] NAT Instance: nat1 VPN:vpn1-->-vpn2 Tag:0x2,FixedTag:0x1, Status:hit, NPFlag:0x6, Create:2016-8-2 15:59:00,TTL:24000:00:00 ,Left:24000:00:00, Master AppProID: 0x0, FwdType:NATPT(NO-PAT)
<HUAWEI> display nat session table verbose This operation will take a few minutes. Press 'Ctrl+C' to break ... Slot: 1 Current total sessions: 2. udp: 10.1.1.5:1120[10.2.2.1:1033]-->172.17.2.2:0 172.17.2.2:0-->10.2.2.1:1033[10.1.1.5:1120] NAT Instance:huawei VPN:vpn1-->-vpn2 Tag:0x2,FixedTag:0x1, Status:hit, NPFlag:0x6, Create:2014-7-10 17:21:46,TTL:00:02:00 ,Left:00:01:59 , Master AppProID: 0x0, CPEIP:10.1.1.5, FwdType:NATPT gre: 1.1.1.1[2.2.2.2]-->3.3.3.3:49183 3.3.3.3:49183-->2.2.2.2:0[1.1.1.1:0] NAT Instance: 10 VPN:--->- Tag:0x0,FixedTag:0x1, Status:no-hit, NPFlag:0x6, Create:2018-2-27 11:28:28,TTL:00:04:00 ,Left:00:04:00 , Master AppProID: 0x0, CPEIP:1.1.1.1, FwdType:NATPT
<HUAWEI> display nat session table verbose This operation will take a few minutes. Press 'Ctrl+C' to break ... Slot: 1 Current total sessions: 1. udp: 10.1.1.5:1120[10.2.2.1:1033]-->172.17.2.2:0 172.17.2.2:0-->10.2.2.1:1033[10.1.1.5:1120] NAT Instance:huawei VPN:vpn1-->-vpn2 Tag:0x2,FixedTag:0x1, Status:hit, NPFlag:0x6, Create:2014-7-10 17:21:46,TTL:00:02:00 ,Left:00:01:59 , Master AppProID: 0x0, CPEIP:10.1.1.5, FwdType:NATPT
<HUAWEI> display nat session table This operation will take a few minutes. Press 'Ctrl+C' to break ... Slot: 1 Current total sessions: 1. udp: 10.1.1.5:1120[10.2.2.1:1033]-->172.17.2.2:0
<HUAWEI> display nat session table nat-instance nat1 alg ftp verbose This operation will take a few minutes. Press 'Ctrl+C' to break ... Slot: 1 Current total sessions: 1. tcp: 2.2.2.2:5000-->3.3.3.1:21[1.1.1.2:21] 1.1.1.2:21[3.3.3.1:21]-->2.2.2.2:5000 NAT Instance:nat1 VPN:--->- Tag:0x2, FixedTag:0x1, Status:hit, NPFlag:0x6, Create:2019-4-16 10:38:46, TTL:00:10:00, Left:00:10:00, Master AppProID: 0x2, CPEIP:1.1.1.2, FwdType:NATPT
<HUAWEI> display nat session table nat64-instance cpe1 alg ftp verbose slot 1 This operation will take a few minutes. Press 'Ctrl+C' to break ... Slot: 1 Current total sessions: 1. tcp: [2001:db8::2]:5000(11.11.11.1:1024)-->[2001:db8::BFBF:BF81]:21(1.1.1.129:21) (1.1.1.129:21)[2001:db8::BFBF:BF81]:21-->[11.11.11.1:1024](2001:db8::2):5000 NAT64 Instance: cpe1 VPN:--->- Tag:0x8000002,FixedTag:0x1, Status:hit, NPFlag:0x6, Create:2019-5-7 16:21:07,TTL:00:00:05 ,Left:00:00:05 , Master AppProID: 0x2, FwdType:NAT64
<HUAWEI> display nat session table This operation will take a few minutes. Press 'Ctrl+C' to break ... Slot: 1 Current total sessions: 1. icmp: 1.1.1.2:2[2.2.2.1:3149]--> *:* *:*-->2.2.2.1:3149[1.1.1.2:2] NAT Instance: 88 VPN:--->- Tag:0x0,FixedTag:0x1, Status:no-hit, NPFlag:0x6, Create:2018-3-20 14:47:49,TTL:00:00:20 ,Left:00:00:20 , Master AppProID: 0x0, CPEIP:1.1.1.2, FwdType:NATPT Dest-ip:11.1.1.2,Type-code:2048
Item | Description |
---|---|
Current total sessions | Total number of session entries. |
NAT Instance | NAT instance name. |
Master | Session entry status:
|
NAT64 Instance | NAT64 instance name. |
Slot | Slot ID of an existing service board. |
10.1.1.5:1120 | Private IP address and port number of user traffic. |
10.2.2.1:1033 | Public IP address and port number of user traffic after the NAT process. |
172.17.2.2:0 | Destination IP address and port number of user traffic,·3-tuple·NAT·contains·neither·the·destination·IP·address·nor·the·destination·port,·and·therefore·this·item·displayed·as·*:*·for·3-tuple·NAT. |
VPN | VPN instance names before and after NAT translation is performed, which are the access VPN instance configured on an interface and the VPN instance named obtained from a NAT address pool, respectively. |
Create | Date and time when a session entry was created. |
Left | Remaining time of a session entry, in hh:mm:ss format. |
udp | The protocol type of the session is UDP. |
Tag | Tag of the current session status:
|
FixedTag | Session entry status:
|
Status | TCP session status:
|
TTL | Time to live of a session entry, in hh:mm:ss format. To change the TTL, run the nat session aging-time command. |
AppProID | Application layer protocol ID of session entries:
|
FwdType | Address translation type:
|
gre | GRE flow table. Value 49183 stands for a call ID. |
Dest-ip | Destination IP address. |
Type-code | ICMP type code. |
CPEIP | CPE IP address of a user terminal. |
NPFlag | Fast forwarding flag.
|
tcp | The protocol type of the session is TCP. |
icmp | The protocol type of the session is ICMP. |