GNOME Bugzilla – Bug 761631
Incorrect interpretation of default route
Last modified: 2016-02-11 13:31:39 UTC
Network Manager interpretation default in route config as 0.0.0.0/32, but this mean 0.0.0.0/0. # cat /etc/sysconfig/network-scripts/route-enp0s5 169.254.0.1 dev enp0s5 scope link default via 169.254.0.1 # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 169.254.0.1 255.255.255.255 UGH 100 0 0 enp0s5 10.94.0.0 0.0.0.0 255.255.0.0 U 100 0 0 enp0s5 169.254.0.1 0.0.0.0 255.255.255.255 UH 100 0 0 enp0s5 192.168.124.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0 If add /0 to route: # cat /etc/sysconfig/network-scripts/route-enp0s5 169.254.0.1 dev enp0s5 scope link default/0 via 169.254.0.1 # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 169.254.0.1 0.0.0.0 UG 0 0 0 enp0s5 10.94.0.0 0.0.0.0 255.255.0.0 U 0 0 0 enp0s5 link-local 0.0.0.0 255.255.0.0 U 1002 0 0 enp0s5 169.254.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 enp0s5 192.168.124.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0 Problem must be in ifcfg-rh plugin, cause it use 32 mask as default in any case.
yes, there was a bug here. Thanks for reporting!! Fixed by: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=3fd414442e18d92491da53a20ec3b069076f01e0 But note, that NM does not allow you to specify the default route like a normal route. The default route is controlled via ipv4.never-default (DEFROUTE) and ipv4.gateway (GATEWAY) -- see `man nm-settings-ifcfg-rh`.