nat: Include platform specific headers on FreeBSD
[vpp.git] / src / plugins / nat / nat44-ei / nat44_ei_ha_doc.rst
1 Active-Passive NAT HA
2 =====================
3
4 Introduction
5 ------------
6
7 One NAT node actively manages traffic while the other is synchronized
8 and ready to transition to the active state and takes over seamlessly
9 and enforces the same NAT sessions when failure occur. Both nodes share
10 the same configuration settings.
11
12 Configuration
13 -------------
14
15 NAT HA protocol
16 ~~~~~~~~~~~~~~~
17
18 Session synchronization traffic is distributed through an IPv4 UDP
19 connection. The active node sends NAT HA protocol events to passive
20 node. To achieve reliable transfer NAT HA protocol uses acknowledgment
21 with re-transmission. This require the passive node to respond with an
22 acknowledgment message as it receives the data. The active node keeps a
23 record of each packet it sends and maintains a timer from when the
24 packet was sent. The active node re-transmits a packet if the timer
25 expires before receiving the acknowledgment.
26
27 Topology
28 ~~~~~~~~
29
30 The two NAT nodes have a dedicated link (interface GE0/0/3 on both) to
31 synchronize NAT sessions using NAT HA protocol.
32
33 ::
34
35            +-----------------------+
36            |    outside network    |
37            +-----------------------+
38             /                     \
39            /                       \
40           /                         \
41          /                           \
42         /                             \
43    +---------+                   +---------+
44    | GE0/0/1 | Active    Passive | GE0/0/1 |
45    |         |                   |         |
46    |  GE0/0/3|-------------------|GE0/0/3  |
47    |         |   sync network    |         |
48    | GE0/0/0 |                   | GE0/0/0 |
49    +---------+                   +---------+
50         \                             /
51          \                           /
52           \                         /
53            \                       /
54             \                     /
55            +-----------------------+
56            |    inside network     |
57            +-----------------------+
58
59 Active node configuration
60 ~~~~~~~~~~~~~~~~~~~~~~~~~
61
62 ::
63
64    set interface ip address GigabitEthernet0/0/1 10.15.7.101/24
65    set interface ip address GigabitEthernet0/0/0 172.16.10.101/24
66    set interface ip address GigabitEthernet0/0/3 10.0.0.1/24
67    set interface state GigabitEthernet0/0/0 up
68    set interface state GigabitEthernet0/0/1 up
69    set interface state GigabitEthernet0/0/3 up
70    set interface nat44 in GigabitEthernet0/0/0 out GigabitEthernet0/0/1
71    nat44 add address 10.15.7.100
72    nat ha listener 10.0.0.1:1234
73    nat ha failover 10.0.0.2:2345
74
75 Passive node configuration
76 ~~~~~~~~~~~~~~~~~~~~~~~~~~
77
78 ::
79
80    set interface ip address GigabitEthernet0/0/1 10.15.7.102/24
81    set interface ip address GigabitEthernet0/0/0 172.16.10.102/24
82    set interface ip address GigabitEthernet0/0/3 10.0.0.2/24
83    set interface state GigabitEthernet0/0/0 up
84    set interface state GigabitEthernet0/0/1 up
85    set interface state GigabitEthernet0/0/3 up
86    set interface nat44 in GigabitEthernet0/0/0 out GigabitEthernet0/0/1
87    nat44 add address 10.15.7.100
88    nat ha listener 10.0.0.2:2345