:: Re: [DNG] Ethernet names revisited
Top Page
Delete this message
Reply to this message
Author: Ralph Ronnquist
Date:  
To: dng
Subject: Re: [DNG] Ethernet names revisited
It really isn't that hard:

when the kernel starts it will give its default names to the
interfaces as ethN numbering them in order it initializes them. In
your case it will use the names eth0, eth1 and eth2 that get assigned
in whatever time order the kernel discovers them in.

Eventually(!) the hotplug handler (udev) kicks in to process your
rules, and at that time there are three interfaces named eth0, eth1
and eth2, so it will be impossible to make, say, the eth2 interface
get the name eth0 without first making the eth0 interface be named
something else. It would here be nice with a name *swapping* program,
but there is none.

So, if you are not happy with those names being used the way they are
by the kernel, then you will have to arrange it to name them all
twice: first to some other name series (eg en0, en1, en2) and
thereafter back onto the original name series (eth0, eth1, eth2) on
the basis of some other adapter property (eg macadress).

Ralph.

On 12/12 15:27, dng@??? wrote:
> On 12-12-2020 14:15, Antony Stone wrote:
> > Hi.
> >
> > I've just installed a couple of Beowulf systems, each of which has three
> > ethernet interfaces; one on the motherboard, and two on a PCI card.
> >
> > I'm trying to work out how to give those interfaces the names I want; the
> > motherboard as eth0, and the PCI card as eth1 / eth2.
> >
> > Historically, I've been used to udev and /etc/udev/rules.d/70-persistent-
> > net.rules doing this, where I can specify the name I want for each interface
> > according to its MAC address.
> >
> > The file didn't exist (although the directory did) on my Beowulf system, so I
> > created one with the appropriate contents, and I now get messages while the
> > kernel is booting:
> >
> > udevd[441]: Error changing net interface name eth2 to eth0: File exists
> > udevd[441]: could not rename interface '4' from 'eth2' to 'eth0': File exists
> > udevd[438]: Error changing net interface name eth1 to eth2: File exists
> > udevd[438]: could not rename interface '3' from 'eth1' to 'eth2': File exists
> > udevd[445]: Error changing net interface name eth0 to eth1: File exists
> > udevd[445]: could not rename interface '2' from 'eth0' to 'eth1': File exists
> >
> > I've followed the entire thread on this list from July 2018 about this, which
> > I've found _some_ of in the archives at
> > https://lists.dyne.org/lurker/message/20180715.200323.7a2473a2.en.html however
> > that link shows only a very small proportion of the emails in the discussion
> > for some reason (I have my own local copy in my mail client).
> >
> > According to https://wiki.debian.org/NetworkInterfaceNames the old 70-
> > persistent-net.rules system _should_ still work in Buster / Beowulf, but I
> > can't work out how to get it to do so.
> >
> > I _have_ tried adding "net.ifnames=0" to the kernel boot line; this makes no
> > difference.
> >
> > So:
> >
> > 1. how can I get 70-persistent-net.rules to carry on working under Beowulf?
> >
> > 2. what's the "correct" way to get my interfaces named the way I want,
> > according to their MAC addresses, under Beowulf?
> >
> > (The above Debian wiki document indicates that Buster is the last release
> > which will continue to support this, so I'm assuming I'll need to do something
> > else for Chimaera; what is it?)
> >
> >
> > Thanks,
> >
> >
> > Antony.
> >
> From what I understand after some research you need a additional
> /etc/udev/rules.d/10-network.rules as follow:
>
> |SUBSYSTEM=="net", ATTR{address}=="90:e6:ba:01:00:01", NAME="eth0"
> SUBSYSTEM=="net", ATTR{address}=="90:e6:ba:01:00:02", NAME="eth1"|
> ||SUBSYSTEM=="net", ATTR{address}=="90:e6:ba:01:20:01", NAME="eth2" Hope
> this helps. Grtz Nick | |
>





> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng