Bug 29505 - Interface metrics automatically reset and do not initialize according to the METRIC settings
Summary: Interface metrics automatically reset and do not initialize according to the ...
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-30 15:10 CEST by P R
Modified: 2024-08-22 23:00 CEST (History)
2 users (show)

See Also:
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:


Attachments

Description P R 2021-09-30 15:10:37 CEST
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 :-/
Florian Hubold 2021-09-30 18:11:01 CEST

CC: (none) => doktor5000

Comment 1 Lewis Smith 2021-10-01 20:36:15 CEST
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
CC: (none) => olav
Source RPM: ip => drakx-net-2.55-1.mga8.src.rpm, ifmetric-0.3-19.mga8.src.rpm, initscripts-9.78-27.mga8.src.rpm

Comment 2 Marja Van Waes 2024-08-22 23:00:08 CEST
We stopped supporting Mageia 8 almost 8 months ago 
https://blog.mageia.org/en/2023/12/30/mageia-8-end-of-life/

That means we also stopped fixing Mageia 8 bugs and that this bug report needs to be closed, regardless of whether it was fixed for Mageia 8 or not.

If this particular bug did not get fixed for Mageia 8, then we do regret that.

If this issue is still present in Mageia 9 or cauldron, then please reopen this report, write a comment and adjust the "Version:" field.

If you are not yet a member of one or our teams, then please consider becoming one. https://wiki.mageia.org/en/Contributing
Mageia is a community project, meaning that we, the users, make Mageia together.

The more active contributors we have, the more bug reports will get fixed.
Besides, being active in a team can be very rewarding. It was and is certainly rewarding to me :-D

Resolution: (none) => OLD
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.