:: Re: [DNG] Predictable Network Inter…
Forside
Slet denne besked
Besvar denne besked
Skribent: Jude Nelson
Dato:  
Til: Hendrik Boom
CC: dng@lists.dyne.org
Emne: Re: [DNG] Predictable Network Interface Names - Stupid or good idea?
> Isn't the initial identification of network adapters and assignment
originally handled by the Kernel or is this another urban myth that I have
mistakenly hung on to?

Yes--network interfaces are given a monotonically-increasing sequence
number as they are enumerated (e.g. the X in ethX and wlanX). However, X
isn't guaranteed to refer to the same NIC across boots.

> I've only run into mac duplication a couple of times in my life thus far.


That's why vdev also accepts a sysfs device path, which is guaranteed to
persist across boots provided that the device remains on the same bus :)

-Jude




On Sat, Jan 9, 2016 at 3:30 PM, Hendrik Boom <hendrik@???> wrote:

> On Sat, Jan 09, 2016 at 09:19:33PM +0100, Anto wrote:
> >
> > On 09/01/16 19:44, shraptor wrote:
> > >On 2016-01-09 19:17, Anto wrote:
> > >
> > >>On the topic. It would be quite interesting how vdev will be (or is)
> > >>managing this network interface naming assignment. Do you have any
> > >>comment on this, Jude?
> > >
> > >vdev uses by default old naming convention but has a file
> > >called /etc/vdev/ifnames.conf where you can set names arbitrarily.
> > >
> > >Example ifnames.conf that is auto-generated at compile time
> > >(only covered up my mac addresses)
> > >
> > ># Format:
> > ># PERSISTENT_INTERFACE_NAME mac|devpath MATCH_ARGUMENT
> > ># * PERSISTENT_INTERFACE_NAME is the persistent name of the
> > >network interface
> > ># * If the second argument is "mac", then MATCH_ARGUMENT is the
> > >colon-separated MAC address
> > ># * If the second argument is "devpath", then MATCH_ARGUMENT is
> > >the device path to the NIC in sysfs
> > >#
> > ># Example: a wireless USB dongle, to be named "wlan-edimax"
> > >#
> > ># Using the "mac" match:
> > ># wlan-edimax mac 80:1F:02:D3:B2:83
> > >#
> > ># Using the "devpath" match:
> > ># wlan-edimax devpath
> > >/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0
> > >
> > >eth0 mac XX:XX:XX:XX:XX:XX
> > >wlan0 mac XX:XX:XX:XX:XX:XX
> >
> > Thanks shraptor,
> >
> > It looks good to me.
> >
> > I have been trying to do the same on udev to have persistent
> > interface name according to the MAC address, e.g. by following the
> > tips on
> http://wiki.networksecuritytoolkit.org/nstwiki/index.php/Network_Setup_Tips
> ,
> > but no joy so far. Perhaps it always fails because I am using eudev
> > instead of systemd-udev. So I just use the workaround to have
> > net.ifnames=0 on my kernel command line until we have vdev package
> > on Devuan repository.
>
> And when the vdev package lands on the Devuan repository couold we please
> have a jessie package or backport for it? Even though jessie is
> supposed to be stable?
>
> -- hendrik
>
> >
> > Cheers,
> >
> > Anto
> > _______________________________________________
> > Dng mailing list
> > Dng@???
> > https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>