On 05/12/2016 01:27 PM, Chris Friesen wrote:
On 05/12/2016 12:50 PM, James Hogarth wrote:
 >
 > On 12 May 2016 18:28, "Chris Friesen" <cbf...@mail.usask.ca
<mailto:cbf...@mail.usask.ca>> wrote:
 > >
 > > Hi,
 > >
 > > Could someone point me to the commit that removed support for assigning
"ethX" names based on MAC addresses?
 > >
 > > Alternately, can someone suggest a way to get equivalent behaviour (the
ability to set "ethX" names based on MAC address) using the current
infrastructure? (Preferably as of RHEL 7, so systemd 219 plus a bunch of
patches.)
 > >
 > > The back story is that we've got a lot of scripts/tools that currently
assume the "ethX" naming, and while we will eventually sort it out we really
don't want to do it right now.  The previous method of assigning "ethX" names
was working well for our use-case (though I realize it had issues more
generally).
 > >

For future reference when dealing with EL systems it's best to check the Red Hat
documentation in the first instance:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/ch-Consistent_Network_Device_Naming.html


Thanks, that shows some promise.  I had actually read some portions of that
document, but I should probably have read all of section 8 first.

Looks like I spoke too soon. I tried adding HWADDR= entries to our /etc/sysconfig/network-scripts/ifcfg-ethX files, and while it mostly works I just got this on rebooting:

[root@compute-0 wrsroot]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 08:00:27:9f:b9:47 brd ff:ff:ff:ff:ff:ff
3: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 08:00:27:9d:14:c4 brd ff:ff:ff:ff:ff:ff
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 08:00:27:f1:36:11 brd ff:ff:ff:ff:ff:ff
5: enp0s8: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 08:00:27:dd:42:ae brd ff:ff:ff:ff:ff:ff

Note the position-based naming for device 5.

And here's the relevent file:

[root@compute-0 wrsroot]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
NAME=eth1
HWADDR=08:00:27:dd:42:ae
BOOTPROTO=dhcp
ONBOOT=yes

So...anyone have any ideas why this isn't working? Is it because I'm trying to use the "eth" namespace which could possibly collide with the kernel naming?

Chris

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to