I have a DHCP client running on eth0 and eth1. zebra routes show up automatically when these interfaces get a lease. This is the output of ip route:
root@localhost:~# ip route
default proto zebra
nexthop via 192.168.53.254 dev eth1 weight 1
nexthop via 192.168.1.1 dev eth0 weight 1
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.133
192.168.53.0/24 dev eth1 proto kernel scope link src 192.168.53.42
(TL;DR: how do I remove, say, the default route going thru 192.168.53.254 with ip route?)
Now, I'm doing my own PBR load balancing, and I need to take down a route when pinging through it doesn't work for some time. I'm doing
vtysh -c "configure terminal" -c "no ip route 0.0.0.0/0 $ROUTER"
which removes the route, but seems to confuse zebra because when I unplug the cable and replug it doesn't re-add the route automatically anymore. I figure removing the route with ip route won't confuse zebra as much, but for the life of me I can't figure out the correct syntax.
I tried
ip route del default via 192.168.1.1 dev eth0 proto zebra
which doesn't give any errors, but it doesn't do anything. I can see the route is still there if I do "ip route" afterwards.
Can anybody please help?
Thanks in advance.