Re: [arch-general] [arch-dev-public] network interface naming with systemd 197
On Mon, 07 Jan 2013 08:23:10 +0100 Andrea Scarpino <andrea@archlinux.org> wrote:
On Monday 07 January 2013 07:51:30 Allan McRae wrote:
Upstream decision... vanilla packages should follow it.
I agree with Allan. We don't use to change the default behavior. Ship it as default and add two lines on how to disable it.
If I may chime in... regarding switching from MAC-based iface naming to ID_NET_NAME_PATH-based naming. How exactly are these ID_NET_NAME_PATH variables assigned? For instance, I have a box with 2 pci intel cards: 1. DEVPATH=/devices/pci0000:00/0000:00:05.0/0000:02:00.0/net/elan0 ID_NET_NAME_PATH=enp2s0f0 2. DEVPATH=/devices/pci0000:00/0000:00:06.0/0000:03:00.0/net/elan1 ID_NET_NAME_PATH=enp3s0f0 Do I correctly understand that "enp?s0f0" is chosen based on a particular pci slot the card is inserted in and will change if I choose to replug the cards? Thanks, -- Leonid Isaev GnuPG key: 0x164B5A6D Fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
On Mon, Jan 07, 2013 at 09:35:45AM -0600, Leonid Isaev wrote:
On Mon, 07 Jan 2013 08:23:10 +0100 Andrea Scarpino <andrea@archlinux.org> wrote:
On Monday 07 January 2013 07:51:30 Allan McRae wrote:
Upstream decision... vanilla packages should follow it.
I agree with Allan. We don't use to change the default behavior. Ship it as default and add two lines on how to disable it.
If I may chime in... regarding switching from MAC-based iface naming to ID_NET_NAME_PATH-based naming. How exactly are these ID_NET_NAME_PATH variables assigned?
For instance, I have a box with 2 pci intel cards: 1. DEVPATH=/devices/pci0000:00/0000:00:05.0/0000:02:00.0/net/elan0 ID_NET_NAME_PATH=enp2s0f0 2. DEVPATH=/devices/pci0000:00/0000:00:06.0/0000:03:00.0/net/elan1 ID_NET_NAME_PATH=enp3s0f0
Do I correctly understand that "enp?s0f0" is chosen based on a particular pci slot the card is inserted in and will change if I choose to replug the cards?
Yes, it's derived from the PCI path of the card in this case, and yes it'll change if you physically move the card. There's some examples of composed paths in udev source: http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_i... If this is a concern to you, ID_NET_NAME_MAC is also available, which will always be the MAC from the hardware and should never be any possible faked address from the OS side. $ macchanger -m 12:34:56:78:90:ab eth0 Current MAC: de:ad:be:ef:00:01 (unknown) Faked MAC: 12:34:56:78:90:ab (unknown) $ udevadm info -q property /sys/class/net/eth0 | grep ID_NET_NAME_MAC ID_NET_NAME_MAC=enxdeadbeef01 d
On Mon, Jan 7, 2013 at 9:58 AM, Dave Reisner <d@falconindy.com> wrote:
On Mon, 07 Jan 2013 08:23:10 +0100 Andrea Scarpino <andrea@archlinux.org> wrote:
On Monday 07 January 2013 07:51:30 Allan McRae wrote:
Upstream decision... vanilla packages should follow it.
I agree with Allan. We don't use to change the default behavior. Ship it as default and add two lines on how to disable it.
If I may chime in... regarding switching from MAC-based iface naming to ID_NET_NAME_PATH-based naming. How exactly are these ID_NET_NAME_PATH variables assigned?
For instance, I have a box with 2 pci intel cards: 1. DEVPATH=/devices/pci0000:00/0000:00:05.0/0000:02:00.0/net/elan0 ID_NET_NAME_PATH=enp2s0f0 2. DEVPATH=/devices/pci0000:00/0000:00:06.0/0000:03:00.0/net/elan1 ID_NET_NAME_PATH=enp3s0f0
Do I correctly understand that "enp?s0f0" is chosen based on a
On Mon, Jan 07, 2013 at 09:35:45AM -0600, Leonid Isaev wrote: particular pci
slot the card is inserted in and will change if I choose to replug the cards?
Yes, it's derived from the PCI path of the card in this case, and yes it'll change if you physically move the card. There's some examples of composed paths in udev source:
http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_i...
If this is a concern to you, ID_NET_NAME_MAC is also available, which will always be the MAC from the hardware and should never be any possible faked address from the OS side.
$ macchanger -m 12:34:56:78:90:ab eth0 Current MAC: de:ad:be:ef:00:01 (unknown) Faked MAC: 12:34:56:78:90:ab (unknown)
$ udevadm info -q property /sys/class/net/eth0 | grep ID_NET_NAME_MAC ID_NET_NAME_MAC=enxdeadbeef01
d
So I'm guessing for users of NetworkManager there shouldn't be any change. And people using 'systemctl enable dhcpcd@eth0' will have to change the device name? Can this be done before the reboot (for headless systems, so the network will be come up on next reboot) ? Sander
On Mon, Jan 7, 2013 at 5:41 PM, Sander Jansen <s.jansen@gmail.com> wrote:
uessing for users of NetworkManager there shouldn't be any change.
Yeah, NM won't care at all.
And people using 'systemctl enable dhcpcd@eth0' will have to change the device name?
Correct.
Can this be done before the reboot (for headless systems, so the network will be come up on next reboot) ?
Yes. To be safe you could even just enable the new name without disabling the old one (then one of them will fail on reboot, but you'll have your network). -t
On Tue, Jan 8, 2013 at 5:33 AM, Tom Gundersen <teg@jklm.no> wrote:
On Mon, Jan 7, 2013 at 5:41 PM, Sander Jansen <s.jansen@gmail.com> wrote:
uessing for users of NetworkManager there shouldn't be any change.
Yeah, NM won't care at all.
And people using 'systemctl enable dhcpcd@eth0' will have to change the device name?
Correct.
Hi Tom, what about netcfg users. I assume we'd need to change INTERFACE in all our netcfg profiles, but would simply renaming the /etc/network.d/interfaces/{eth,wlan}0 files to the unique names work?
On Tue, 8 Jan 2013 07:13:31 +0800 Oon-Ee Ng <ngoonee.talk@gmail.com> wrote:
On Tue, Jan 8, 2013 at 5:33 AM, Tom Gundersen <teg@jklm.no> wrote:
On Mon, Jan 7, 2013 at 5:41 PM, Sander Jansen <s.jansen@gmail.com> wrote:
uessing for users of NetworkManager there shouldn't be any change.
Yeah, NM won't care at all.
And people using 'systemctl enable dhcpcd@eth0' will have to change the device name?
Correct.
Hi Tom, what about netcfg users. I assume we'd need to change INTERFACE in all our netcfg profiles, but would simply renaming the /etc/network.d/interfaces/{eth,wlan}0 files to the unique names work?
Yes, in /etc/network.d/interfaces/ and in profiles. Alternatively, you can override the corresponding udev rule file. -- Leonid Isaev GnuPG key: 0x164B5A6D Fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
On Tue, Jan 8, 2013 at 7:36 AM, Leonid Isaev <lisaev@umail.iu.edu> wrote:
Hi Tom, what about netcfg users. I assume we'd need to change INTERFACE in all our netcfg profiles, but would simply renaming the /etc/network.d/interfaces/{eth,wlan}0 files to the unique names work?
Yes, in /etc/network.d/interfaces/ and in profiles. Alternatively, you can override the corresponding udev rule file.
I think sticking upstream would be best then, as long as things work as before and only require one-time modification, no problem. On Tue, Jan 8, 2013 at 8:19 AM, Tom Gundersen <teg@jklm.no> wrote:
I know that netcfg users will have to make some adjustments (as it uses the interface names), but I never used netcfg myself so don't know the details...
Not using netcfg? The heresy! Any no worries as Leonid already answered the question above.
On Tue, Jan 8, 2013 at 12:13 AM, Oon-Ee Ng <ngoonee.talk@gmail.com> wrote:
Hi Tom, what about netcfg users. I assume we'd need to change INTERFACE in all our netcfg profiles, but would simply renaming the /etc/network.d/interfaces/{eth,wlan}0 files to the unique names work?
I know that netcfg users will have to make some adjustments (as it uses the interface names), but I never used netcfg myself so don't know the details... -t
On Tue, Jan 08, 2013 at 07:13:31AM +0800, Oon-Ee Ng wrote:
On Tue, Jan 8, 2013 at 5:33 AM, Tom Gundersen <teg@jklm.no> wrote:
On Mon, Jan 7, 2013 at 5:41 PM, Sander Jansen <s.jansen@gmail.com> wrote:
uessing for users of NetworkManager there shouldn't be any change.
Yeah, NM won't care at all.
And people using 'systemctl enable dhcpcd@eth0' will have to change the device name?
Correct.
Hi Tom, what about netcfg users. I assume we'd need to change INTERFACE in all our netcfg profiles, but would simply renaming the /etc/network.d/interfaces/{eth,wlan}0 files to the unique names work?
Yes, that will work. I upgraded to this naming scheme last night, and just changing the names will make it all work fine on the next boot. (If you don't know what they are exactly, disable the netcfg@xxxxx.service, run `ip l`, and then edit the /etc/network.d profiles.) -- William Giokas | KaiSforza GnuPG Key: 0xE99A7F0F Fingerprint: F078 CFF2 45E8 1E72 6D5A 8653 CDF5 E7A5 E99A 7F0F
On Mon, Jan 07, 2013 at 10:41:13AM -0600, Sander Jansen wrote:
So I'm guessing for users of NetworkManager there shouldn't be any change. And people using 'systemctl enable dhcpcd@eth0' will have to change the device name? Can this be done before the reboot (for headless systems, so the network will be come up on next reboot) ?
Sander
Yes. Enabling or disabling a service does not start or stop it till next boot. You can also simply change the netc{fg,tl} profiles to use the new naming scheme without disturbing what is currently connected. -- William Giokas | KaiSforza GnuPG Key: 0xE99A7F0F Fingerprint: F078 CFF2 45E8 1E72 6D5A 8653 CDF5 E7A5 E99A 7F0F
On Mon, 7 Jan 2013 10:58:20 -0500 Dave Reisner <d@falconindy.com> wrote:
On Mon, Jan 07, 2013 at 09:35:45AM -0600, Leonid Isaev wrote:
On Mon, 07 Jan 2013 08:23:10 +0100 Andrea Scarpino <andrea@archlinux.org> wrote:
On Monday 07 January 2013 07:51:30 Allan McRae wrote:
Upstream decision... vanilla packages should follow it.
I agree with Allan. We don't use to change the default behavior. Ship it as default and add two lines on how to disable it.
If I may chime in... regarding switching from MAC-based iface naming to ID_NET_NAME_PATH-based naming. How exactly are these ID_NET_NAME_PATH variables assigned?
For instance, I have a box with 2 pci intel cards: 1. DEVPATH=/devices/pci0000:00/0000:00:05.0/0000:02:00.0/net/elan0 ID_NET_NAME_PATH=enp2s0f0 2. DEVPATH=/devices/pci0000:00/0000:00:06.0/0000:03:00.0/net/elan1 ID_NET_NAME_PATH=enp3s0f0
Do I correctly understand that "enp?s0f0" is chosen based on a particular pci slot the card is inserted in and will change if I choose to replug the cards?
Yes, it's derived from the PCI path of the card in this case, and yes it'll change if you physically move the card. There's some examples of composed paths in udev source:
http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_i...
Thanks for the clarification.
If this is a concern to you, ID_NET_NAME_MAC is also available, which will always be the MAC from the hardware and should never be any possible faked address from the OS side.
Ah... that's cool. I didn't know one can't fake ID_NET_NAME_MAC.
$ macchanger -m 12:34:56:78:90:ab eth0 Current MAC: de:ad:be:ef:00:01 (unknown) Faked MAC: 12:34:56:78:90:ab (unknown)
$ udevadm info -q property /sys/class/net/eth0 | grep ID_NET_NAME_MAC ID_NET_NAME_MAC=enxdeadbeef01
d
-- Leonid Isaev GnuPG key: 0x164B5A6D Fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
participants (6)
-
Dave Reisner
-
Leonid Isaev
-
Oon-Ee Ng
-
Sander Jansen
-
Tom Gundersen
-
William Giokas