| Summary: | Interface metrics automatically reset and do not initialize according to the METRIC settings | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | P R <pmr> |
| Component: | RPM Packages | Assignee: | Mageia tools maintainers <mageiatools> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | doktor5000, olav |
| Version: | 8 | ||
| Target Milestone: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | drakx-net-2.55-1.mga8.src.rpm, ifmetric-0.3-19.mga8.src.rpm, initscripts-9.78-27.mga8.src.rpm | CVE: | |
| Status comment: | |||
|
Florian Hubold
2021-09-30 18:11:01 CEST
CC:
(none) =>
doktor5000 Thank you PR for your report, and the good information. Unsure where the responsibility lies, so assigning initially to mageiatools for 'net_applet'; CC'ing Olav who currently commits 'initscripts'. 'ifmetric' is maintained by various packagers. Assignee:
bugsquad =>
mageiatools |
I use Ethernet and Wifi connections in parallel. Both are connected to the same IP network. I would like to prefer the Ethernet one whenever it is connected, but use also WiFi, when not. I achieve the goal temporarily by setting different metrics to interfaces. The problem is, however, that after some time the metrics reset automatically to 0. I am not sure what exactly causes the reset, but I suppose that it is related to some unwanted connectivity losses and subsequent interface reinitializaions(?) 1. Manual metric set: ifmetric wlp1s0 666 ; ifmetric enp2s0 66 2. After the manual set: [root@pmrnote etc]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 172.18.0.1 0.0.0.0 UG 66 0 0 enp2s0 172.18.0.0 0.0.0.0 255.255.255.192 U 66 0 0 enp2s0 172.18.0.0 0.0.0.0 255.255.255.192 U 666 0 0 wlp1s0 3. After some time: Code: Select all [root@pmrnote etc]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 172.18.0.1 0.0.0.0 UG 0 0 0 enp2s0 172.18.0.0 0.0.0.0 255.255.255.192 U 0 0 0 enp2s0 172.18.0.0 0.0.0.0 255.255.255.192 U 0 0 0 wlp1s0 The network is controlled by the net_applet: [root@pmrnote Temp]# ps -e | grep "NetworkManager\|net_applet" 16356 ? 00:32:29 net_applet I wanted to force initial METRIC values via manual editing of configuration files: [root@pmrnote Temp]# cat /etc/sysconfig/network-scripts/ifcfg-enp2s0 DEVICE=enp2s0 BOOTPROTO=dhcp IPADDR=10.0.0.66 NETMASK=255.255.255.0 ONBOOT=yes METRIC=66 IPV4_ROUTE_METRIC=77 DEFROUTE=yes MII_NOT_SUPPORTED=no USERCTL=yes RESOLV_MODS=yes NOZEROCONF=yes LINK_DETECTION_DELAY=6 IPV6INIT=no IPV6TO4INIT=no #IPV6ADDR=2001:db8:acad:666::6/64 #IPV6ADDR_SECONDARIES="2001:db8:cafe:666::6/64 2001:db8:feed:666::6/64" # IPV6_DEFAULTGW=2001:db8:acad:666::1 IPV6_AUTOCONF=yes DHCPV6C=no ACCOUNTING=no NM_CONTROLLED=yes DHCP_CLIENT=dhclient NEEDHOSTNAME=no PEERDNS=yes PEERYP=yes PEERNTPD=no [root@pmrnote Temp]# cat /etc/sysconfig/network-scripts/ifcfg-wlp1s0 DEVICE=wlp1s0 BOOTPROTO=dhcp ONBOOT=yes METRIC=666 MII_NOT_SUPPORTED=no USERCTL=yes RESOLV_MODS=no WIRELESS_MODE=Managed WIRELESS_ESSID=********** WIRELESS_ENC_KEY=s:**************** WIRELESS_WPA_DRIVER=wext WIRELESS_WPA_REASSOCIATE=no KEY_MGMT=WPA-PSK WPA_PSK=********* IPV6INIT=no IPV6TO4INIT=no ACCOUNTING=no NM_CONTROLLED=yes UUID=************* NAME="System PMR (wlp1s0)" DHCP_CLIENT=dhclient NEEDHOSTNAME=no PEERDNS=yes PEERYP=yes PEERNTPD=no The "METRIC" entries, however, seem to be not effecive :-/