root@Andromeda:~# nmcli con show "Wired connection 1" | grep -i routes
ipv4.routes:                            --

then ...

root@Andromeda:~# nmcli con modify "Wired connection 1" +ipv4.routes ""
root@Andromeda:~# nmcli connection up "Wired connection 1" 
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/8)
root@Andromeda:~# nmcli con show "Wired connection 1" | grep -i routes
ipv4.routes:                            { ip =, nh = }

but ...

root@Andromeda:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         speedport-entry         UG    100    0        0 enp3s0 U     0      0        0 br-f8186d7831df
link-local     U     1000   0        0 enp3s0     U     0      0        0 docker0   U     100    0        0 enp3s0
root@Andromeda:~# ip route
default via dev enp3s0 proto dhcp metric 100 dev br-f8186d7831df proto kernel scope link src linkdown dev enp3s0 scope link metric 1000 dev docker0 proto kernel scope link src linkdown dev enp3s0 proto kernel scope link src metric 100 

Why isn't the specific route being shown by either ip route or route commands although it seems to exist when using nmcli ?


First of all, nmcli connection ... shows that the manual route is in the connection profile. A profile is a bunch of settings for configuring a networking device. But it is not the configuration of the device itself. If you want to see the routes that are currently configured, then nmcli -f all device show enp3s0 or ip route show are right. These two commands don't do exactly the same, the first asks NetworkManager what it thinks is the current configuration, the second asks kernel via netlink API. Of course, the information provided by both command should agree.

Anyway, so you set the route in the profile and activate it. You are right to expect to see the route on the device.

It's not there because the gateway is not directly reachable. Kernel won't allow to add this route and probably in NetworkManager's logfile you would see a warning about the failure to add the route. You would also be unable to add this route with ip route add directly.

The potential solution is to either configure the route as onlink (which kernel and NetworkManager only supports relatively recently). A better solution is to also add a direct route to the gateway as well (+ipv4.routes Provided, that that is the right configuration in your network.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.