docs: convert plugins doc md->rst
[vpp.git] / src / plugins / nat / nat64 / nat64_doc.rst
1 Stateful NAT64
2 ==============
3
4 This document describes stateful NAT64 Network Address and Protocol
5 Translation
6
7 Introduction
8 ------------
9
10 Stateful NAT64 in VPP allows IPv6-only clients to contact IPv4 servers
11 using unicast UDP, TCP, or ICMP based on RFC 6146.
12
13 Configuration
14 -------------
15
16 Enable/disable NAT64 feature on the interface
17 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
19    set interface nat64 in|out [del]
20
21 in: inside/local/IPv6 network out: outside/external/IPv4 network intfc:
22 interface name
23
24 Add/delete NAT64 pool address
25 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26
27 One or more public IPv4 addresses assigned to a NAT64 are shared among
28 several IPv6-only clients.
29
30    nat64 add pool address [- ] [tenant-vrf ] [del]
31
32 ip4-range-start: First IPv4 address of the range ip4-range-end: Last
33 IPv4 address of the range (optional, not used for single address)
34 tenant-vrf-id: VRF id of the tenant associated with the pool address
35 (optional, if not set pool address is global)
36
37 Add/delete static BIB entry
38 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
39
40 Stateful NAT64 also supports IPv4-initiated communications to a subset
41 of the IPv6 hosts through statically configured bindings.
42
43    nat64 add static bib tcp|udp|icmp [vfr ] [del]
44
45 ip6-addr: inside IPv6 address of the host in-port: inside port or ICMPv6
46 identifier ip4-addr: outside IPv4 address of the host out-port: outside
47 port or ICMPv4 identifier table-id: VRF id of the tenant associated with
48 the BIB entry (optional, default use global VRF)
49
50 Set NAT64 session timeouts
51 ~~~~~~~~~~~~~~~~~~~~~~~~~~
52
53 Session is deleted when timer expires. If all sessions corresponding to
54 a dynamically create BIB entry are deleted, then the BIB entry is also
55 deleted. When packets are flowing session timer is refreshed to keep the
56 session alive.
57
58    set nat64 timeouts udp icmp tcp-trans tcp-est tcp-incoming-syn \|
59    reset
60
61 udp: UDP session timeout value (default 300sec) icmp: ICMP session
62 timeout value (default 60sec) tcp-trans: transitory TCP session timeout
63 value (default 240sec) tcp-est: established TCP session timeout value
64 (default 7440sec) tcp-incoming-syn: incoming SYN TCP session timeout
65 value (default 6sec) reset: reset timers to default values
66
67 Set NAT64 prefix
68 ~~~~~~~~~~~~~~~~
69
70 Stateful NAT64 support the algorithm for generating IPv6 representations
71 of IPv4 addresses defined in RFC 6052. If no prefix is configured,
72 Well-Known Prefix (64:ff9b::/96) is used.
73
74    nat64 add prefix / [tenant-vrf ] [del]
75
76 ip6-prefix: IPv6 prefix plen: prefix length (valid values: 32, 40, 48,
77 56, 64, or 96) tenant-vrf: VRF id of the tenant associated with the
78 prefix
79
80 Show commands
81 ~~~~~~~~~~~~~
82
83    show nat64 pool show nat64 interfaces show nat64 bib tcp|udp|icmp
84    show nat64 session table tcp|udp|icmp show nat64 timeouts show nat64
85    prefix
86
87 Notes
88 -----
89
90 Multi thread is not supported yet (CLI/API commands are disabled when
91 VPP runs with multiple threads).