Re: Ensuring predictable MAC address for bond interface
- From: Ed Swierk <eswierk skyportsystems com>
- To: Dan Williams <dcbw redhat com>
- Cc: networkmanager-list gnome org
- Subject: Re: Ensuring predictable MAC address for bond interface
- Date: Tue, 7 Oct 2014 20:25:21 -0700
For these experiments I upgraded to NetworkManager 0.9.10.0.
I tried setting primary=eth0 in the bond options. This option has an effect in only one case: if I start with only eth1 plugged in (i.e. carrier up), and then plug in eth0, the bond driver will switch the active slave from eth1 to eth0 (whereas normally it leaves eth1 active, switching to eth0 only when link drops on eth1). But this has no effect on the MAC address of the bond device--either way, the bond device gets eth1's MAC address and keeps it, since eth1 was the first enslaved device.
I also experimented with setting ignore-carrier=eth0,eth1 in the main section of NetworkManager.conf, in the hope of tricking the nm_device_state_changed() logic into transitioning the slave devices to DISCONNECTED and enslaving them regardless of their carrier state. This works, sort of: now NetworkManager starts up, creates the bond device, and enslaves eth0 and eth1, whether or not they are plugged in. The bond device gets eth0's MAC address. It's still pretty easy to mess things up, for example by bringing down the bond device (via nmcli conn down) and then bringing up eth1.
I'm getting the sense that I'm fighting a losing battle against a fundamental aspect of NetworkManager, which is to react dynamically to link events, and only secondarily try to guarantee a certain configuration. I'm going to try systemd-networkd next, and see if it's a better fit for my application.
--Ed
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]