NAT Status

TNSR offers several ways to view the active NAT configuration, rules, and sessions. These start with nat show, and are all available in config and basic mode.

View NAT Configuration

To view the current NAT configuration parameters (not rules), use show nat config:

tnsr# show nat config

NAT Configuration Parameters
----------------------------
endpoint-dependent true
translation hash buckets 16384
translation hash memory 12189696
user hash buckets 1024
user hash memory 761856
max translations per user 10240
max translations per thread 10240
max users per thread 1024
outside Route Table default
inside Route Table default
dynamic mapping enabled
forwarding is enabled
out2in-dpo is disabled
UDP timeout 300s
TCP established connections timeout 7440s
TCP transitory connections timeout 240s
ICMP timeout 60s

View Static Mappings

To view currently configured static NAT mappings, use show nat static-mappings:

tnsr# show nat static-mappings

Static Mappings

Proto Local IP   Port External IP Port Interface Twice NAT Out to In Route Table
----- ---------- ---- ----------- ---- --------- --------- --------- -----------
  tcp 10.2.0.5     22 203.0.113.2  222                                   default

View Dynamic Configuration

To view the IP addresses or interfaces currently assigned for use by NAT, use show nat dynamic addresses or show nat dynamic interfaces, depending on the TNSR NAT configuration:

tnsr# show nat dynamic addresses

Pool Addresses  Route Table     Twice NAT
--------------  -----------     ---------
203.0.113.2

View Interfaces

To view the interfaces which are currently marked as inside and outside for NAT purposes, use show nat interface-sides:

tnsr# show nat interface-sides

Interfaces              Side
---------------------   -------
GigabitEthernet0/14/0   outside
GigabitEthernet3/0/0    inside

View NAT Sessions

To view a summary of outgoing NAT sessions by source address, use show nat sessions:

tnsr# show nat sessions

NAT sessions
------------

IP address      Static Dynamic Route Table
-------------- ------- ------- -----------
10.2.0.1             0       4     default
203.0.113.2          0       1     default

Note

In endpoint-dependent NAT mode this command only outputs data for active NAT sessions. In endpoint-independent mode this command outputs data for both active and expired sessions.

To see more detail for each specific session, add verbose to the previous command, which becomes show nat sessions verbose:

tnsr# show nat sessions verbose

NAT sessions detail
-------------------

Proto Inside/Outside/Ext    Type    Route Table Last used Bytes/pkts
----- --------------------- ------- ----------- --------- ----------
  udp 10.2.0.1:123          dynamic     default       143        498
      203.0.113.2:16253                                            6
      52.6.160.3:123
  udp 10.2.0.1:123          dynamic     default       143        498
      203.0.113.2:18995                                            6
      184.105.182.7:123
  udp 10.2.0.1:123          dynamic     default       145        498
      203.0.113.2:53893                                            6
      69.36.182.57:123
  udp 10.2.0.1:123          dynamic     default       207        498
      203.0.113.2:44109                                            6
      198.50.238.163:123