Carrier Grade NAT Operational Commands

Carrier Grade NAT Show Commands

The CGNAT operational commands provide detailed information about the address translation operations.

NAT Pool Information

This command displays information about IPv4 address pool for a user.

Syntax:

show address-translation allocation <options>

Option Description

pool

Specify the pool name.

user

Specify the user name.

Example for NAT pool allocation.

supervisor@rtbrick: op> show address-translation allocation pool
Pool: PUBLIC_NAT_POOL
  Instance: default
  Allocated: 5/4032 (0.12%)

Example for allocation details for subscribers

supervisor@rtbrick: op> show address-translation allocation user
User                             Original Address     Translated Address   Port Range
ppp-0/1/23/72339069014638594     198.51.100.105       203.0.113.1           1024 - 1055
ppp-0/1/23/72339069014638595     198.51.100.103       203.0.113.2           1024 - 1055
ppp-0/1/23/72339069014638596     198.51.100.101       203.0.113.1           1088 - 1119
ppp-0/1/23/72339069014638597     198.51.100.102       203.0.113.2           1056 - 1087
ppp-0/1/23/72339069014638598     198.51.100.104       203.0.113.1           1056 - 1087

NAT Rule Details

Syntax:

show address-translation rule <options>

Option Description

-

Without any option, the command displays the information for all rules.

instance

Displays NAT rule information for the specified instance.

summary

Displays summary of the information for the NAT rule.

user

Displays user information for the NAT rule.

Example for address translation rule for an instance.

supervisor@rtbrick: op> show address-translation rule instance default
Instance: default
User                             Protocol   Original Address        Translated Address      Direction
ppp-0/1/23/72339069014638596     tcp        198.51.100.101, 60001   203.0.113.1, 1089       Both
ppp-0/1/23/72339069014638597     tcp        198.51.100.102, 60001   203.0.113.2, 1057       Both
ppp-0/1/23/72339069014638595     tcp        198.51.100.103, 60001   203.0.113.2, 1024       Both
ppp-0/1/23/72339069014638598     tcp        198.51.100.104, 60001   203.0.113.1, 1056       Both
ppp-0/1/23/72339069014638594     tcp        198.51.100.105, 60001   203.0.113.1, 1025       Both
ppp-0/1/23/72339069014638596     tcp        198.51.100.101, 60002   203.0.113.1, 1088       Both
ppp-0/1/23/72339069014638597     tcp        198.51.100.102, 60002   203.0.113.2, 1056       Both
ppp-0/1/23/72339069014638595     tcp        198.51.100.103, 60002   203.0.113.2, 1025       Both
ppp-0/1/23/72339069014638598     tcp        198.51.100.104, 60002   203.0.113.1, 1057       Both
ppp-0/1/23/72339069014638594     tcp        198.51.100.105, 60002   203.0.113.1, 1024       Both
ppp-0/1/23/72339069014638596     udp        198.51.100.101, 60001   203.0.113.1, 1089       Both
ppp-0/1/23/72339069014638597     udp        198.51.100.102, 60001   203.0.113.2, 1057       Both
ppp-0/1/23/72339069014638595     udp        198.51.100.103, 60001   203.0.113.2, 1025       Both
ppp-0/1/23/72339069014638598     udp        198.51.100.104, 60001   203.0.113.1, 1056       Both
ppp-0/1/23/72339069014638594     udp        198.51.100.105, 60001   203.0.113.1, 1025       Both
ppp-0/1/23/72339069014638596     udp        198.51.100.101, 60002   203.0.113.1, 1088       Both
ppp-0/1/23/72339069014638597     udp        198.51.100.102, 60002   203.0.113.2, 1056       Both
ppp-0/1/23/72339069014638595     udp        198.51.100.103, 60002   203.0.113.2, 1024       Both
ppp-0/1/23/72339069014638598     udp        198.51.100.104, 60002   203.0.113.1, 1057       Both
ppp-0/1/23/72339069014638594     udp        198.51.100.105, 60002   203.0.113.1, 1024       Both
ppp-0/1/23/72339069014638596     icmp       198.51.100.101, 256     203.0.113.1, 1088       Both
ppp-0/1/23/72339069014638597     icmp       198.51.100.102, 256     203.0.113.2, 1056       Both
ppp-0/1/23/72339069014638595     icmp       198.51.100.103, 256     203.0.113.2, 1024       Both
ppp-0/1/23/72339069014638598     icmp       198.51.100.104, 256     203.0.113.1, 1056       Both
ppp-0/1/23/72339069014638594     icmp       198.51.100.105, 256     203.0.113.1, 1024       Both

Example for address translation rule summary. The example summary shows the total number of NAT rules for TCP flows.

supervisor@rtbrick: op> show address-translation rule summary
Instance: default
  Source     Protocol      Rules
  Dynamic    tcp              10
  Dynamic    udp              10
  Dynamic    other             5
  Total Dynamic Rules         25

Example for address translation rules for subscribers.

supervisor@rtbrick: op> show address-translation rule
Instance: default
User                             Protocol   Original Address        Translated Address      Direction
ppp-0/1/23/72339069014638596     tcp        198.51.100.101, 60001   203.0.113.1, 1089       Both
ppp-0/1/23/72339069014638597     tcp        198.51.100.102, 60001   203.0.113.2, 1057       Both
ppp-0/1/23/72339069014638595     tcp        198.51.100.103, 60001   203.0.113.2, 1024       Both
ppp-0/1/23/72339069014638598     tcp        198.51.100.104, 60001   203.0.113.1, 1056       Both
ppp-0/1/23/72339069014638594     tcp        198.51.100.105, 60001   203.0.113.1, 1025       Both
ppp-0/1/23/72339069014638596     tcp        198.51.100.101, 60002   203.0.113.1, 1088       Both
ppp-0/1/23/72339069014638597     tcp        198.51.100.102, 60002   203.0.113.2, 1056       Both
ppp-0/1/23/72339069014638595     tcp        198.51.100.103, 60002   203.0.113.2, 1025       Both
ppp-0/1/23/72339069014638598     tcp        198.51.100.104, 60002   203.0.113.1, 1057       Both
ppp-0/1/23/72339069014638594     tcp        198.51.100.105, 60002   203.0.113.1, 1024       Both
ppp-0/1/23/72339069014638596     udp        198.51.100.101, 60001   203.0.113.1, 1089       Both
ppp-0/1/23/72339069014638597     udp        198.51.100.102, 60001   203.0.113.2, 1057       Both
ppp-0/1/23/72339069014638595     udp        198.51.100.103, 60001   203.0.113.2, 1025       Both
ppp-0/1/23/72339069014638598     udp        198.51.100.104, 60001   203.0.113.1, 1056       Both
ppp-0/1/23/72339069014638594     udp        198.51.100.105, 60001   203.0.113.1, 1025       Both
ppp-0/1/23/72339069014638596     udp        198.51.100.101, 60002   203.0.113.1, 1088       Both
ppp-0/1/23/72339069014638597     udp        198.51.100.102, 60002   203.0.113.2, 1056       Both
ppp-0/1/23/72339069014638595     udp        198.51.100.103, 60002   203.0.113.2, 1024       Both
ppp-0/1/23/72339069014638598     udp        198.51.100.104, 60002   203.0.113.1, 1057       Both
ppp-0/1/23/72339069014638594     udp        198.51.100.105, 60002   203.0.113.1, 1024       Both
ppp-0/1/23/72339069014638596     icmp       198.51.100.101, 256     203.0.113.1, 1088       Both
ppp-0/1/23/72339069014638597     icmp       198.51.100.102, 256     203.0.113.2, 1056       Both
ppp-0/1/23/72339069014638595     icmp       198.51.100.103, 256     203.0.113.2, 1024       Both
ppp-0/1/23/72339069014638598     icmp       198.51.100.104, 256     203.0.113.1, 1056       Both
ppp-0/1/23/72339069014638594     icmp       198.51.100.105, 256     203.0.113.1, 1024       Both

The example summary shows the total number of NAT rules for other protocol flows:

supervisor@rtbrick: op> show address-translation rule
Instance: default
User                             Protocol   Original Address        Translated Address      Direction
ppp-0/1/23/72339069014638596     tcp        198.51.100.101, 60001   203.0.113.1, 1089       Both
ppp-0/1/23/72339069014638597     tcp        198.51.100.102, 60001   203.0.113.2, 1057       Both
ppp-0/1/23/72339069014638595     tcp        198.51.100.103, 60001   203.0.113.2, 1024       Both
ppp-0/1/23/72339069014638598     tcp        198.51.100.104, 60001   203.0.113.1, 1056       Both
ppp-0/1/23/72339069014638594     tcp        198.51.100.105, 60001   203.0.113.1, 1025       Both
ppp-0/1/23/72339069014638596     tcp        198.51.100.101, 60002   203.0.113.1, 1088       Both
ppp-0/1/23/72339069014638597     tcp        198.51.100.102, 60002   203.0.113.2, 1056       Both
ppp-0/1/23/72339069014638595     tcp        198.51.100.103, 60002   203.0.113.2, 1025       Both
ppp-0/1/23/72339069014638598     tcp        198.51.100.104, 60002   203.0.113.1, 1057       Both
ppp-0/1/23/72339069014638594     tcp        198.51.100.105, 60002   203.0.113.1, 1024       Both
ppp-0/1/23/72339069014638596     udp        198.51.100.101, 60001   203.0.113.1, 1089       Both
ppp-0/1/23/72339069014638597     udp        198.51.100.102, 60001   203.0.113.2, 1057       Both
ppp-0/1/23/72339069014638595     udp        198.51.100.103, 60001   203.0.113.2, 1025       Both
ppp-0/1/23/72339069014638598     udp        198.51.100.104, 60001   203.0.113.1, 1056       Both
ppp-0/1/23/72339069014638594     udp        198.51.100.105, 60001   203.0.113.1, 1025       Both
ppp-0/1/23/72339069014638596     udp        198.51.100.101, 60002   203.0.113.1, 1088       Both
ppp-0/1/23/72339069014638597     udp        198.51.100.102, 60002   203.0.113.2, 1056       Both
ppp-0/1/23/72339069014638595     udp        198.51.100.103, 60002   203.0.113.2, 1024       Both
ppp-0/1/23/72339069014638598     udp        198.51.100.104, 60002   203.0.113.1, 1057       Both
ppp-0/1/23/72339069014638594     udp        198.51.100.105, 60002   203.0.113.1, 1024       Both
ppp-0/1/23/72339069014638596     icmp       198.51.100.101, 256     203.0.113.1, 1088       Both
ppp-0/1/23/72339069014638597     icmp       198.51.100.102, 256     203.0.113.2, 1056       Both
ppp-0/1/23/72339069014638595     icmp       198.51.100.103, 256     203.0.113.2, 1024       Both
ppp-0/1/23/72339069014638598     icmp       198.51.100.104, 256     203.0.113.1, 1056       Both
ppp-0/1/23/72339069014638594     icmp       198.51.100.105, 256     203.0.113.1, 1024       Both

NAT Trap Statistics

Syntax:

show address-translation trap statistics

This command displays the information of packets trapped in the NAT daemon.

Example for flow stats.

supervisor@rtbrick: op> show address-translation trap statistics
Protocol   Flags                     Status             Count
tcp        -|syn|-|-|-|-|-|-|-       Success               10
udp        -|-|-|-|-|-|-|-|-         Success               12
udp        -|-|-|-|-|-|-|-|-         Failure              441
udp_ctrl   -|-|-|-|-|-|-|-|-         Success               64
udp_ctrl   -|-|-|-|-|-|-|-|-         Failure                1
other      -|-|-|-|-|-|-|-|-         Success               86
Total Successful Traps:                                   172
Total Failed Traps:                                       442

NAT Error Details

This command displays NAT error information.

Syntax:

show address-translation error

Example for address translation error

supervisor@rtbrick: op> show address-translation error
TRAP_HNDL - Fib-Local Route
    Counter        : 494
    Current Update : Fri Jun 05 04:35:33 GMT +0000 2026
    Last Update    : Fri Jun 05 04:35:33 GMT +0000 2026
TRAP_HNDL - DNS Client Port Reused
    Counter        : 6
    Current Update : Fri Jun 05 04:35:26 GMT +0000 2026
    Last Update    : Fri Jun 05 04:35:25 GMT +0000 2026
TRAP_HNDL - Is Duplicate
    Counter        : 1
    Current Update : Fri Jun 05 04:35:23 GMT +0000 2026
    Last Update    : Fri Jun 05 04:35:23 GMT +0000 2026

Clear NAT Errors

Syntax

clear address-translation error

This command resets the existing statistics for NAT errors.