Force fabric default route on campus hosts

The 'ip route add default via <fabric-gw>' exec command silently failed
on campus-host1 and campus-host2 because the management DHCP on eth0
had already installed a default via 172.16.0.254. As a result, traffic
leaving the host for other fabric subnets was sent out the management
interface instead of the EVPN fabric, breaking end-to-end ping.

Switch to 'ip route replace' so the fabric gateway overrides whatever
default is installed at container start.
This commit is contained in:
2026-04-23 16:14:43 +00:00
parent cb74dd118f
commit 97fbc1cebe

View File

@@ -279,7 +279,7 @@ topology:
exec:
- ip link set dev eth1 up
- ip addr add 10.60.60.101/24 dev eth1
- ip route add default via 10.60.60.1
- ip route replace default via 10.60.60.1
campus-host2:
kind: linux
@@ -292,7 +292,7 @@ topology:
exec:
- ip link set dev eth1 up
- ip addr add 10.60.70.102/24 dev eth1
- ip route add default via 10.60.70.1
- ip route replace default via 10.60.70.1
links:
# =====================================================