FD.io VPP  v17.04.2-2-ga8f93f8
Vector Packet Processing
src/plugins/snat

set interface snat

Summary/usage

set interface snat in <intfc> out <intfc> [del].

Declaration and implementation

Declaration: set_interface_snat_command (src/plugins/snat/snat.c line 2115)

Implementation: snat_feature_command_fn.

set snat workers

Summary/usage

set snat workers <workers-list>.

Description

Example usage
vpp# set snat workers
Set SNAT workers if 2 or more workers available, use:
 vpp# set snat workers 0-2,5

Declaration and implementation

Declaration: set_workers_command (src/plugins/snat/snat.c line 2328)

Implementation: set_workers_command_fn.

show snat

Summary/usage

show snat.

Declaration and implementation

Declaration: show_snat_command (src/plugins/snat/snat.c line 2968)

Implementation: show_snat_command_fn.

snat add address

Summary/usage

snat add addresses <ip4-range-start> [- <ip4-range-end>] [tenant-vrf <vrf-id>] [del].

Declaration and implementation

Declaration: add_address_command (src/plugins/snat/snat.c line 2044)

Implementation: add_address_command_fn.

snat add interface address

Summary/usage

snat add interface address <interface> [del].

Declaration and implementation

Declaration: snat_add_interface_address_command (src/plugins/snat/snat.c line 3154)

Implementation: snat_add_interface_address_command_fn.

snat add static mapping

Summary/usage

snat add static mapping local tcp|udp|icmp <addr> [<port>] external <addr> [<port>] [vrf <table-id>] [del].

Description

Example usage
vpp# snat add static mapping
Static mapping allows hosts on the external network to initiate connection
to to the local network host.
To create static mapping between local host address 10.0.0.3 port 6303 and
external address 4.4.4.4 port 3606 for TCP protocol use:
 vpp# snat add static mapping local tcp 10.0.0.3 6303 external 4.4.4.4 3606
If not runnig "static mapping only" S-NAT plugin mode use before:
 vpp# snat add address 4.4.4.4
To create static mapping between local and external address use:
 vpp# snat add static mapping local 10.0.0.3 external 4.4.4.4

Declaration and implementation

Declaration: add_static_mapping_command (src/plugins/snat/snat.c line 2259)

Implementation: add_static_mapping_command_fn.

snat deterministic add

Summary/usage

snat deterministic add in <addr>/<plen> out <addr>/<plen> [del].

Description

Example usage
vpp# snat deterministic add
Create bijective mapping of inside address to outside address and port range
pairs, with the purpose of enabling deterministic NAT to reduce logging in
CGN deployments.
To create deterministic mapping between inside network 10.0.0.0/18 and
outside network 1.1.1.0/30 use:
# vpp# snat deterministic add in 10.0.0.0/18 out 1.1.1.0/30

Declaration and implementation

Declaration: snat_det_map_command (src/plugins/snat/snat.c line 3220)

Implementation: snat_det_map_command_fn.

snat deterministic forward

Summary/usage

snat deterministic forward <addr>.

Description

Example usage
vpp# snat deterministic forward
Return outside address and port range from inside address for deterministic
NAT.
To obtain outside address and port of inside host use:
 vpp# snat deterministic forward 10.0.0.2
 1.1.1.0:<1054-1068>

Declaration and implementation

Declaration: snat_det_forward_command (src/plugins/snat/snat.c line 3282)

Implementation: snat_det_forward_command_fn.

snat deterministic reverse

Summary/usage

snat deterministic reverse <addr>:<port>.

Description

Example usage
vpp# snat deterministic reverse
Return inside address from outside address and port for deterministic NAT.
To obtain inside host address from outside address and port use:
 #vpp snat deterministic reverse 1.1.1.1:1276
 10.0.16.16

Declaration and implementation

Declaration: snat_det_reverse_command (src/plugins/snat/snat.c line 3347)

Implementation: snat_det_reverse_command_fn.

snat ipfix logging

Summary/usage

snat ipfix logging [domain <domain-id>] [src-port <port>] [disable].

Description

Example usage
vpp# snat ipfix logging
To enable SNAT IPFIX logging use:
 vpp# snat ipfix logging
To set IPFIX exporter use:
 vpp# set ipfix exporter collector 10.10.10.3 src 10.10.10.1

Declaration and implementation

Declaration: snat_ipfix_logging_enable_disable_command (src/plugins/snat/snat.c line 2390)

Implementation: snat_ipfix_logging_enable_disable_command_fn.