[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <a43adea0-8885-2bda-c931-5b8bf06e3a70@gmail.com>
Date: Wed, 1 Apr 2020 17:03:58 +0200
From: Mikhail Morfikov <morfikov@...il.com>
To: netdev@...r.kernel.org
Subject: Creating a bonding interface via the ip tool gives it the wrong MAC
address
A couple months ago I opened an issue on the Debian Bug Tracker[1] concerning
some weird network behavior, in which bonding interface was involved. Basically,
what I wanted to achieve was to have two interfaces (eth0 and wlan0) of my
laptop in the *active-backup* mode, and in order to make this work, the
*fail_over_mac* has to be set to *none*. Then the two interfaces (and also the
bond0 interface) should have the same MAC address, which is set based on the
interface specified by the *primary* parameter (in this case eth0).
This was working well in the past, but it stopped for some reason. When the
bond0 interface is being set up via the /etc/network/interfaces file, it gets
wrong MAC address, and it's always the same MAC (ca:16:91:ae:9a:ba).
I didn't really know where the problem was (it looks like no one knows so far),
but I recently moved from ifupdown to systemd-networkd, and I noticed that the
issue went away, at least in the default config. But in my case, I had to
create the bonding interface during the initramfs/initrd phase using the *ip*
tool (the regular one, and not the one from busybox). And the problem came back,
but in this case I couldn't really fix it by just restarting the network
connection.
So I created manually the bond0 interface using the *ip* tool in the following
way to check what will happen:
ip link add name bond0 type bond mode active-backup \
miimon 200 \
downdelay 400 \
updelay 400 \
primary eth0 \
primary_reselect always \
fail_over_mac none \
min_links 1
and the interface got the MAC in question. That gave me the idea that something
could be wrong with setting up/configuring the bonding interface via the *ip*
tool because it works well with systemd-networkd, which I think doesn't use the
tool to configure the network interfaces.
So why does this happen?
[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=949062&archived=False&mbox=no&mboxmaint=no
Powered by blists - more mailing lists