Re: [arch-dev-public] network interface naming with systemd 197

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, 7 Jan 2013 10:58:20 -0500
Dave Reisner <d@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> 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_id.c#n21

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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux