VPP static NAT without destination IP address unexpected behavior
To reproduce
set interfaces ethernet eth0 address '192.168.122.14/24' set interfaces ethernet eth0 description 'WAN' set interfaces ethernet eth1 address '192.0.2.1/24' set vpp settings interface eth0 driver 'dpdk' set vpp settings interface eth1 driver 'dpdk' set vpp settings unix poll-sleep-usec '120' set vpp nat44 static rule 10 inbound-interface 'eth0' set vpp nat44 static rule 10 outbound-interface 'eth1' set vpp nat44 static rule 10 protocol 'tcp' set vpp nat44 static rule 10 translation address '192.0.2.2'
We get unexpected dest address 192.0.2.1:
vyos@r14:~$ show vpp nat44 static Des_address/interface Dest_port Trans_address Trans_port Protocol ----------------------- ----------- --------------- ------------ ---------- 192.0.2.1 192.0.2.2 tcp eth1 192.0.2.2 tcp vyos@r14:~$
We expect:
All traffic that is incoming on WAN interface eth0 is translated to the internal address 192.0.2.2
If we add the destination address, output looks correct:
vyos@r14# set vpp nat44 static rule 10 destination address 192.168.122.111 [edit] vyos@r14# commit vyos@r14# run show vpp nat44 static Des_address/interface Dest_port Trans_address Trans_port Protocol ----------------------- ----------- --------------- ------------ ---------- 192.168.122.111 192.0.2.2 tcp [edit] vyos@r14#