Ethernet devices have higher metric than wlan or wwan ones
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snappy-hwe-snaps |
Invalid
|
Undecided
|
Unassigned | ||
nplan (Ubuntu) |
Fix Released
|
Undecided
|
Martin Pitt | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Yakkety |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
In Ubuntu Core, in all supported devices ethernet devices have higher metric than wlan or wwan devices, so packets get routed to the latter always. The metric is 1024, while for instance network-manager assigns these numbers:
ethernet -> 100
wlan -> 600
wwan -> 700
This happens because ethernet devices are managed by default by networkd in ubuntu-core, while wlan and wwan are managed by network-manager if installed. It would make sense to either assign a metric of 100 in networkd configuration file or change network-manager snap so it handles ethernet in all cases when installed.
[Test Case]
* Set up an ethernet and wifi connection using netplan, and check metrics in "ip route". With the current version they have "1024", with the proposed update the ethernet one will have 100, the wifi one 600.
[Regression Potential]
It could in principle happen that someone relies on the current high metric and this interferes with some custom routing. However, netplan has only been used in snappy on xenial since recently, and there is no other official way to configure routing on snappy than netplan. So in practice this should be very low.
Agreed. I'll change the networkd backend to add [DHCP]\ nRouteMetric= 100 for ethernet and 600 for wlan interfaces, for NM compatibility.