Hello

I'm in the process of reconfiguring a Linux router, by adding a VPP interface to it. The BGP session established over this interface uses non-routable IPs, so my link provider gives me an administration IP address so that I can access it remotely from outside my network.

In Linux, this used to be a dummy interface, with source-based routing to ensure packets from the administration IP will always go out via the interface connected to this provider:

ip route add default $peer_ip table mgmt
ip rule add from $admin_ip lookup mgmt

I'm trying to reproduce this configuration in VPP. I've managed to get the loopback address working:

create loopback interface instance 0
lcp create loop0 host-if management
set interface state loop0 up
set interface ip address loop0 $admin_ip/32

With this and an ssh daemon running in the VPP namespace, I can get it to work with a default route, i.e.

ip netns exec ip route add default via $peer_ip dev $uplink_interface

However when the BGP sessions in the router are established, other routes will take precedence, so I'd like to reproduce the source-based routing I had in linux.

I've tried to add a new VRF:

vppctl ip table add 10
vppctl set interface ip table loop0 10
vppctl ip route add 0.0.0.0/0 table 10 via $peer_ip $uplink_interface
vppctl ip route add $admin_ip/32 via ip4-lookup-in-table 10

With this configuration I can see SYN packets arriving at the management interface, but no replies seem to be sent.

I've also tried the SVS plugin:

svs enable ip4 table-id 1 loop0
svs table add ip4 table-id 1
svs route add table-id 1 $admin_ip/32 src-table-id 10

and a few attempts using acl and abf, but nothing worked.

Does anyone have a working example of source-based routing to share?

Thanks,
Andre
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#26292): https://lists.fd.io/g/vpp-dev/message/26292
Mute This Topic: https://lists.fd.io/mt/114909302/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/14379924/21656/631435203/xyzzy 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to