Command Line Reference
IP Service
NAT Configuration
13 min
nat configuration nat configuration show nat config show nat config \[command] show nat config \[purpose] display nat configuration information \[view] system view \[use cases] sonic# show nat config global values admin mode disabled global timeout 600 secs tcp timeout 86400 secs udp timeout 300 secs static entries nat type ip protocol global ip global port local ip local port twice nat id \ pool entries pool name global ip range global port range \ nat bindings binding name pool name access list nat type twice nat id \ nat zones port zone \ ethernet8 0 loopback0 0 vlan4000 0 show nat translations show nat translations \[command] show nat translations \[purpose] display nat translations information \[view] system view \[use cases] sonic# show nat translations static nat entries 2 static napt entries 0 dynamic nat entries 0 dynamic napt entries 0 static twice nat entries 0 static twice napt entries 0 dynamic twice nat entries 0 dynamic twice napt entries 0 total snat/snapt entries 1 total dnat/dnapt entries 1 total entries 2 protocol source destination translated source translated destination \ all 192 168 1 1 1 1 1 1 all 1 1 1 1 192 168 1 1 show nat translations count show nat translations count \[command] show nat translations count \[purpose] display nat translations counts \[view] system view \[use cases] sonic# show nat translations count static nat entries 2 static napt entries 0 dynamic nat entries 0 dynamic napt entries 0 static twice nat entries 0 static twice napt entries 0 dynamic twice nat entries 0 dynamic twice napt entries 0 total snat/snapt entries 1 total dnat/dnapt entries 1 total entries 2 show nat statistics show nat statistics \[command] show nat statistics \[purpose] display nat hit statistics \[view] system configuration view \[use cases] sonic# show nat statistics protocol source destination packets bytes \ all 192 168 1 1 0 0 all 1 1 1 1 0 0 nat zone nat zone 0 3 \[command] nat zone 0 3 \[purpose] configure nat zone \[parameter] true 148,513 left #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type \[view] interface view \[use cases] sonic(config if 8)# nat zone 1 nat enable nat enable \[command] nat enable no nat enable \[purpose] enable nat function \[view] system configuration view \[use cases] sonic(config)# nat enable nat static basic global ip local ip {snat|dnat} tcp|udp|icmp|all \[extendable|normal] \[comment] nat static basic global ip local ip {snat|dnat} tcp|udp|icmp|all \[extendable|normal] \[comment] \[command] nat static basic global ip local ip {snat|dnat} tcp|udp|icmp|all \[extendable|normal] \[comment] no nat static basic global ip local ip tcp|udp|icmp|all \[purpose] configure static nat function \[parameter] true 148,513 trueleft #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type \[view] system configuration view \[use cases] sonic(config)# nat static basic 1 1 1 1 192 168 1 1 snat tcp test1 nat static {tcp|udp} global ip global port local ip local port {snat|dnat} \[extendable|normal] \[comment] nat static {tcp|udp} global ip global port local ip local port {snat|dnat} \[extendable|normal] \[comment] \[command] nat static {tcp|udp} global ip global port local ip local port {snat|dnat} \[extendable|normal] \[comment] no nat static {tcp|udp} global ip global port local ip local port \[purpose] configure static napt function \[parameter] true 148,513 trueleft #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type \[view] system configuration view \[use cases] sonic(config)# nat static tcp 1 1 1 1 2000 192 168 1 1 3000 snat test1 nat pool {pool name} start ip \[end ip] nat pool {pool name} start ip \[end ip] \[command] nat pool {pool name} start ip \[end ip] no nat pool {pool name} \[purpose] configure dynamic address pool \[parameter] true 157,504 trueleft #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type \[view] system configuration view \[use cases] sonic(config)# nat pool test 1 1 1 1 1 1 1 2 nat binding {binding name} {pool name} \[acl name] nat binding {binding name} {pool name} \[acl name] \[command] nat binding {binding name} {pool name} \[acl name] no nat binding {binding name} \[acl name] \[purpose] bind dynamic address pool \[parameter] true 162,499 trueleft #4283c7 unhandled content type left #4283c7 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left #d8e5f5 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type \[view] system configuration view \[use cases] sonic(config)# nat binding bing1 test acl1
