Default routes not getting deleted


#1

Hi,

In my vyos setup i get multiple default routes which i don’t want
e.g.
$ ip route
default proto zebra
nexthop via 120.0.0.1 dev eth0 weight 1
nexthop via 11.0.0.129 dev eth3 weight 1
nexthop via 11.0.0.65 dev eth1 weight 1
11.0.0.0/26 dev eth2 proto kernel scope link src 11.0.0.1
11.0.0.64/26 dev eth1 proto kernel scope link src 11.0.0.75
11.0.0.128/26 dev eth3 proto kernel scope link src 11.0.0.129
120.0.0.0/24 dev eth0 proto kernel scope link src 120.0.0.19
127.0.0.0/8 dev lo proto kernel scope link src 127.0.0.1
192.168.100.240 via 120.0.0.1 dev eth0

Instead of that i need a route of my own. but i am not able to delete the existing routes.
On one thread i found that i should disable zebra service, is it right way to achieve?


#2

what is the output of:
show ip route
show configuration commands | grep ‘set protocols’

there should be no reason to disable zebra


#3

ip route output:
default proto zebra
nexthop via 120.0.0.1 dev eth0 weight 1
nexthop via 11.0.0.129 dev eth3 weight 1
11.0.0.0/26 dev eth2 proto kernel scope link src 11.0.0.1
11.0.0.64/26 dev eth1 proto kernel scope link src 11.0.0.71
11.0.0.128/26 dev eth3 proto kernel scope link src 11.0.0.129
120.0.0.0/24 dev eth0 proto kernel scope link src 120.0.0.15

show configuration commands | grep ‘set protocols’ returns empty.


#4

if the show configuration returns empty then VyOS has not been configured to have any type of routing protocol. using set protocols and set system gateway address you add routing ability and a default route. Have you been adding routes outside of the VyOS commandline configuration wrapper? if so you can’t expect VyOS to know about the underlying routing that’s going on. You also still did not post the output of show ip route. Try setting a default gateway for the router ‘set system gateway-address x.x.x.x’