Switch between two ip routes while doing NAT44

Pac Ette
 

Hi all,

I have two interfaces (wan0 and wan1) with two different IP addresses.

vpp config:

set int state wan0 up
set int state wan1 up
set int state lan1 up

set int ip address wan0 10.100.1.5/29
ip route add 0.0.0.0/0 via 10.100.1.8

loopback create
set int l2 bridge loop0 1 bvi
set int ip address loop0 10.155.6.1/24
set int state loop0 up
set int l2 bridge lan1 1

nat44 add interface address wan0
set interface nat44 in loop0
set interface nat44 out wan0

What's the best way to switch the NAT out to wan1 and route all loop0 traffic via wan1?

I tried below configuration, set wan1 to another table and switch NAT out to wan1 but packets were still being routed via wan0 from loop0

ip table add 1
set int ip table wan1 1
set int ip address wan1 10.200.1.5/29
ip route add 0.0.0.0/0 table 1 via 10.200.1.8 wan1
nat44 add interface address wan1
set interface nat44 in loop0
set interface nat44 out wan1

Any advice? Thanks!

Join vpp-dev@lists.fd.io to automatically receive all group messages.