It seems FRR doesn't seem to set the default gateway from the DHCP lease when having custom routing tables.
Steps to reproduce (can be reproduced from livecd):
- Boot VyOS (tested on rolling 2019-02-16)
- Set eth0 to dhcp:
set interfaces ethernet eth0 address dhcp commit
- Get address and if you do show ip route, you will see a default route
- Now add a custom routing table (use another interface or a vtun):
set protocols static table 100 interface-route 0.0.0.0/0 next-hop-interface eth1
- Now disconnect eth0, and reconnect so it will "renew" it's lease.
- You will see it will assign ip address but when you do: "ip route" you will see there is no default gateway.
Tracked it down to the following script: /sbin/dhclient-script, in update_routers(), it will do:
vtysh -c "conf t" -c "ip route 0.0.0.0/0 $router $ZEBRA_ROUTE_DHCP" >/dev/null 2>&1
If i execute the command manually it won't work either.. So maybe an issue in FRR?
If i modify update_routers() to add the "ip -4 route add ..." version to it, it will work but ofcourse this bypasses FRR.