1

Using NetworkManager on CentOS 7.6 I was able to create two default routes with same metric:

# nmcli connection eth0 modify ipv4.route-metric 10
# nmcli connection eth1 modify ipv4.route-metric 10
# nmcli connection up eth0
# nmcli connection up eth1
$ ip route
default via 192.168.1.1 dev eth0 proto dhcp metric 10 
default via 192.168.1.1 dev eth1 proto dhcp metric 10 

That's looking strange to me because I thought there possible only one default route with specific metric and if I try to achieve same routing table with ip I've got an error:

# sudo ip route add default via 192.168.1.1 dev eth1 proto dhcp metric 11
# sudo ip route add default via 192.168.1.1 dev eth0 proto dhcp metric 11
RTNETLINK answers: File exists

So basically I have two questions:

1) Is that a bug? If it's not how kernel interpret such a routing table?

2) How can I build such a routing table using ip command?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.