Re: [DNG] Ethernet names revisited

2020-12-17 Thread Antony Stone
On Thursday 17 December 2020 at 13:03:57, rattenkopf via Dng wrote:

> hi Antony
> 
> Yesterday I had the same problem - mainboard network interface gets eth1
> as name and the both interfaces from the pci-card are eth0 and eth2 and
> fiddling with udef-rule didn't get the wanted result.

Indeed - I'm now using my workaround of telling udev rules to assign names 
xeth0, xeth1 etc, and then in /etc/network/interfaces renaming those to eth0, 
eth1, etc.

> But I notice, that as system booted from an usb stick dos not have this
> problem, but the stick could only booted, if uefi was enabled.

Hm, interesting.

> So I decided to install grub with efi extension and after that, the
> system comes up with eth0 from the mainboard and eth1 and eth2 where
> given to the pci-card interfaces.
> 
> But I don't know, if this always happens with uefi or only with that of
> this board (dell PowerEdge)

Well, in my case I can't test that because my machines don't do UEFI (HP N54L 
microservers, Bios only).

Do you have any setting for net.ifnames in your Grub kernel boot parameters?


Antony.

-- 
It may not seem obvious, but (6 x 5 + 5) x 5 - 55 equals 5!

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-17 Thread rattenkopf via Dng
hi Antony

Yesterday I had the same problem - mainboard network interface gets eth1
as name and the both interfaces from the pci-card are eth0 and eth2 and
fiddling with udef-rule didn't get the wanted result.

But I notice, that as system booted from an usb stick dos not have this
problem, but the stick could only booted, if uefi was enabled.

So I decided to install grub with efi extension and after that, the
system comes up with eth0 from the mainboard and eth1 and eth2 where
given to the pci-card interfaces.

But I don't know, if this always happens with uefi or only with that of
this board (dell PowerEdge)

Fine regards
rolf
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-14 Thread Hendrik Boom
On Sun, Dec 13, 2020 at 10:15:26PM +0100, Antony Stone wrote:
> On Sunday 13 December 2020 at 21:13:10, d...@d404.nl wrote:
> 
> > It looks like systemd again is responsible for this mess.
> 
> That is unexpected for me, since I am starting from a clean installation of 
> Devuan Beowulf - no upgrade, no crossover from Debian - just a totally new 
> install of Devuan (which I'm expecting to be ohne/sans/without systemd in any 
> form).

systemd can cause probems on machines without systemd.  Software developed and 
running elsewhere may well acquire adaptations for systemd, which then cause 
trouble on non-systemd machines.  Often unintentional trouble.

For example, 
> > From what I understand uses eudev the same files as systemd with udev.

-- hendrik
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-14 Thread Steve Litt
On Sun, 13 Dec 2020 14:20:25 +0100
Antony Stone  wrote:

> On Sunday 13 December 2020 at 13:02:45, Florian Zieboll via Dng wrote:
> 
> > Am 13. Dezember 2020 12:01:39 MEZ schrieb Antony Stone   
> :
> > > Well, here's the output from "dmesg | grep eth".  It shows the
> > > r8169 interfaces being given names eth0, eth1 (the ones I want as
> > > eth1 and eth2), then the tg3 interface gets called eth2 (which I
> > > want as eth0).
> > > 
> > > At 6 seconds in, you can see my 70-persistent-net.rules file
> > > kicking in and renaming then to xeth2, xeth1 and xeth0; then
> > > finally at 12 seconds, the second rename in
> > > /etc/network/interfaces sets them back to eth0, eth1 and eth2 in
> > > the order I want them.  
> > 
> > So have you tried with 'ifnames=1'?  
> 
> I hadn't, but I've just done so now - it makes no difference - here's
> dmesg:
> 
> [0.00] Linux version 4.19.0-10-amd64
> (debian-ker...@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6))
> #1 SMP Debian 4.19.132-1 (2020-07-24) [0.00] Command line:
> BOOT_IMAGE=/boot/vmlinuz-4.19.0-10-amd64
> root=UUID=9cbc8bd3-4cb8-4ae1-92c5-5a3659e9aed6 ro net.ifnames=1 quiet
> 
> [3.394364] r8169 :04:00.0 eth0: RTL8168e/8111e,
> 00:e0:4c:80:21:6b, XID 2c20, IRQ 30
> [3.394368] r8169 :04:00.0 eth0: jumbo features [frames: 9200
> bytes, tx checksumming: ko]
> [3.450174] r8169 :05:00.0 eth1: RTL8168e/8111e,
> 00:e0:4c:80:21:6c, XID 2c20, IRQ 31
> [3.450177] r8169 :05:00.0 eth1: jumbo features [frames: 9200
> bytes, tx checksumming: ko]
> [3.489342] tg3 :07:00.0 eth2: Tigon3 [partno(BCM95723) rev
> 5784100] (PCI Express) MAC address 78:ac:c0:f7:89:f7
> [3.489347] tg3 :07:00.0 eth2: attached PHY is 5784
> (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[0])
> [3.489350] tg3 :07:00.0 eth2: RXcsums[1] LinkChgREG[0]
> MIirq[0] ASF[0] TSOcap[1]
> [3.489352] tg3 :07:00.0 eth2: dma_rwctrl[7618]
> dma_mask[64-bit] [6.187233] tg3 :07:00.0 xeth0: renamed from
> eth2 [6.231916] r8169 :05:00.0 xeth2: renamed from eth1
> [6.246745] r8169 :04:00.0 xeth1: renamed from eth0
> 
> > And are you sure, that the 'hwaddress' lines in your
> > '/etc/network/interfaces' really define which NIC to use?  
> 
> I'm not using hwaddress in that file - that was a suggestion from
> terryc, and I think it's the wrong idea for exactly the following
> reason:
> 
> > AFAICT this option just changes ("spoofs") the MAC address of the
> > NIC for which it is defined. Although the log confirms that finally
> > eth0 is the tg3 NIC, this seems unusual (and very counterintuitive)
> > to me.  
> 
> 
> Thanks,
> 
> 
> Antony.


Stop the madness! Seriously, life shouldn't be this complicated.
Observe:



#!/bin/sh
# Copyright (c) 2016 by Steve Litt
# Expat license. See http://directory.fsf.org/wiki/License:Expat

chosen_wifi_number=${1:-1}
wifidevs=0

for dev in `ip -o link | sed -n 's/[^:]*: *\(w[^:]*\).*/\1/p'`;
do
wifidevs=`expr $wifidevs + 1`

test $wifidevs -eq $chosen_wifi_number && {
echo $dev
exit 0
}
done

echo =max$wifidevs


The preceding shellscript delivers the single wifi dev name when
there's only one wifi dev. If there are more, you'll need to tweak it a
little, but no big deal. You can also change it to find Ethernet
devices by changing the "w" in the for statement to an "e". You could
even assign and export the crazy device names to environment variables
like $eth0 and $wla1.

Boxes with multiple Ethernet or Wifi devices were always a problem,
since back when I started in 1998 and probably a lot before. Back then,
the old pros advised us newcomers never to have Ethernet cards of the
same brand and model, or the naming of Ethernet devices would be
indeterminate. Names like wlEat5hit01 aren't my idea of a good
solution, but except in the case of USB dongles, they're a hell of a
lot better than the old eth0 names, if you use them right.

If we'd grown up with wlEat5hit01 and eno8shit3gg25 and gotten used to
them, we'd scream bloody murder if they were replaced with eth0 and
the like.

Shellscripts like the one in this email can be enhanced to do amazing
things with very little effort.

When you find yourself trying to peer inside black boxes like udev,
eudev, evdev, vdev and the like, perhaps it's time to try something
new. There's a reason Ken Thompson and Dennis Ritchie made UNIX the way
they did, with simple commands to give the user incredible power. It
was for situations like this, so you didn't have to read and possibly
tweak a couple thousand lines of C code, you just made a 20 line
shellscript.

SteveT

Steve Litt 
Autumn 2020 featured book: Thriving in Tough Times
http://www.troubleshooters.com/thrive
___
Dng mailing list
Dng@lists.dyne.org

Re: [DNG] Ethernet names revisited

2020-12-13 Thread terryc
On Sun, 13 Dec 2020 10:45:56 +0100
Antony Stone  wrote:

> On Sunday 13 December 2020 at 09:25:24, terryc wrote:
> 

> > Just add the line
> > hwaddress mac:add:dress:in:usual:format
> > 
> > to match eth2 & eth3 to the desired card.  
> 
> I think that's entirely the wrong way round.
> 
> Setting hwaddress in /etc/network/interfaces changes the MAC address
> of the interface according to its name (eth0, eth1, etc).

Woops, my apologies. I'd completely forgotten about that feature.

Personally,I have a strong bias against using the udev stuff as mostly
it just kills  my network when the OS HDDs were migrated to a new
motherboard(usually after a mobo died) and less commonly NICs die, get
upgraded or standardised. (66% of our systems are headless).
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread Ralph Ronnquist via Dng
On 13/12 22:22, Antony Stone wrote:
> On Sunday 13 December 2020 at 21:42:50, Simon Hobson wrote:
> 
> > Hendrik Boom  wrote:
> > > I had to solve it by assigning new names to the interfaces (thus not eth0
> > > or eth1) and modifying all the config files mentioning those interface
> > > names (I found them with grep) to use the new names instead.
> > 
> > Not for the OPs reason, but a long time ago I started to use "meaningful
> > names" like ethext, ethint, and so on. Making it clearer in config files
> > what each interface is.
> 
> Ironically enough, that is precisely what I have done on my own routers, 
> which 
> have interfaces named "Internet", "Clients", "Phones", "PubServers" and 
> "PriServers".
> 
> I did that because by default they create VLAN interfaces called eth0.0, 
> eth0.1, eth0.2 etc, and so I used the rename facility in 
> /etc/network/interfaces to give them names which meant something to me.
> 
> > I think removing the need to remember something is better than being good
> > at remembering it (which I'm not anyway !)
> 
> I completely agree with that, however in this case (wanting eth0 to be on the 
> motherboard and eth1/2 to be the PCI card), is close enough to "familiar" for 
> me not to get confused about it (once I get the machine to agree on the 
> names).

One option could be to ensure tg3 is loaded before r8196 by mentioning
them in that order in /etc/modules (or maybe it needs to be in
/etc/initramfs-tools/modules). The tg3 would claim eth0 and r8196
would claim eth1 and eth2 (which probably would name its ports
consistently in the desired order).

Then yo don't even need that 70-.. udev file, which you did need for
jessie so as to counteract its "predictable names" mangling.

Ralph.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread Antony Stone
On Sunday 13 December 2020 at 21:42:50, Simon Hobson wrote:

> Hendrik Boom  wrote:
> > I had to solve it by assigning new names to the interfaces (thus not eth0
> > or eth1) and modifying all the config files mentioning those interface
> > names (I found them with grep) to use the new names instead.
> 
> Not for the OPs reason, but a long time ago I started to use "meaningful
> names" like ethext, ethint, and so on. Making it clearer in config files
> what each interface is.

Ironically enough, that is precisely what I have done on my own routers, which 
have interfaces named "Internet", "Clients", "Phones", "PubServers" and 
"PriServers".

I did that because by default they create VLAN interfaces called eth0.0, 
eth0.1, eth0.2 etc, and so I used the rename facility in 
/etc/network/interfaces to give them names which meant something to me.

> I think removing the need to remember something is better than being good
> at remembering it (which I'm not anyway !)

I completely agree with that, however in this case (wanting eth0 to be on the 
motherboard and eth1/2 to be the PCI card), is close enough to "familiar" for 
me not to get confused about it (once I get the machine to agree on the 
names).


Antony.

-- 
I know I always wanted to be somebody, but I guess I should have been more 
specific.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread Antony Stone
On Sunday 13 December 2020 at 21:13:10, d...@d404.nl wrote:

> It looks like systemd again is responsible for this mess.

That is unexpected for me, since I am starting from a clean installation of 
Devuan Beowulf - no upgrade, no crossover from Debian - just a totally new 
install of Devuan (which I'm expecting to be ohne/sans/without systemd in any 
form).

> From what I understand uses eudev the same files as systemd with udev. If so
> you should do
> 
> ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules

I guess I can try that, however you should be aware that when I started this 
exercise (from the aforementioned fresh installation of Devuan Beowulf), the 
directory /etc/udev/rules.d (a) existed and (b) was empty.

> to make sure (e)udev does not mess with the network devices. (/etc/udev
> seems to have priority above /lib/udev)

I can only say that searching /lib/udev revealed (a) nothing specific to my 
network devices, and (b) no files more recent than January 1st 2020, on a 
machine installed in December 2020, therefore I don't think there is anything 
in there contributing to my problem.

> After that it is somewhat unclear to me. Or
> /etc/udev/rules.d/70-persistent-net.rules should work again. Or you
> should add a 70-net-name-slot.rules with the syntax of
> 80-net-name-slot.rules like
> 
> SUBSYSTEM!="net", GOTO="net_setup_link_end"
> IMPORT{builtin}="path_id"
> ACTION!="add", GOTO="net_setup_link_end"
> IMPORT{builtin}="net_setup_link"
> 
> NAME=="eth0", ENV{ID_NET_NAME_ONBOARD}!="",
> NAME="$env{ID_NET_NAME_ONBOARD}" NAME=="eth0", ENV{ID_NET_NAME_SLOT}!="",
> NAME="$env{ID_NET_NAME_SLOT}" NAME=="eth0", ENV{ID_NET_NAME_PATH}!="",
> NAME="$env{ID_NET_NAME_PATH}"
> 
> LABEL="net_setup_link_end"

I'll give that go tomorrow (or perhaps Tuesday; tomorrow looks like a busy 
work day for me).

> After adding net.ifnames=0 and biosdevname=0 your system should work as
> intended but I do not have the time to test it, hopes it helps in the
> right direction.

I shall report back.


Antony.

-- 
“If code doesn’t receive constant love, it turns to shit.”

 - Brad Fitzpatrick, Google engineer

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread Simon Hobson
Hendrik Boom  wrote:

> I had to solve it by assigning new names to the interfaces (thus not eth0 or 
> eth1) and modifying all the config files mentioning those interface names (I 
> found them with grep) to use the new names instead.

Not for the OPs reason, but a long time ago I started to use "meaningful names" 
like ethext, ethint, and so on. Making it clearer in config files what each 
interface is. On one box (router) I had a fair number of interfaces (I can 
recall at least 8 inc 3 PPP (VDSL2) networks) - made remembering what's what a 
heck of a lot easier. Also did the same thing with my Xen guests - gave the 
interfaces on the host meaningful names via the guest config files.

I think removing the need to remember something is better than being good at 
remembering it (which I'm not anyway !)

Simon
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread Didier Kryn
Le 13/12/2020 à 01:09, Ralph Ronnquist via Dng a écrit :
> On 13/12 00:40, Antony Stone wrote:
>>> If it worked for you previously then, a) there would have been rules
>>> for double renaming,
>> Please point me at where I should find these.
>>
>> I only know that /etc/udev/rules.d/70-persistent-net.rules was the
>> *only* file I needed to edit if I wanted to rearrange the naming of
>> the interfaces under Jessie or earlier.
> Well, the kernel modules makes the first naming, and assigns them as
> eth0, eth1, eth2. That happens before udev starts.
>
> The kernel refuses any attempt to name an interface to, say, eth0 if
> that name is taken.
>
> Those "facts" have been in effect since last millenium, so whatever
> happened for you before would have happened within the eclipse of
> those "facts".
>
>>> and b) any network management would have kicked
>>> in late enough to let name fiddling happen before bringing up the
>>> interfaces. As you know, one of the joys with parallel boot is the
>>> random effects of things happening in parallel.
>> I thought "parallel boot" was one of the evils that systemd was designed to 
>> bring in.  In what way does Devuan do "parallel boot"?
> afact 1) udev processes events (somewhat) in parallel, and 2) the
> post-pivot boot runs init scripts in as much parallelism as is allowed
> with respect to their declared dependencies. That latter thing is
> something newish (10 years?) but current default.
>
    Maybe Udev is parallelized, but the netlink is serialized by the kernel.

--        Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread d...@d404.nl
On 13-12-2020 14:20, Antony Stone wrote:
> On Sunday 13 December 2020 at 13:02:45, Florian Zieboll via Dng wrote:
>
>> Am 13. Dezember 2020 12:01:39 MEZ schrieb Antony Stone 
> :
>>> Well, here's the output from "dmesg | grep eth".  It shows the r8169
>>> interfaces being given names eth0, eth1 (the ones I want as eth1 and
>>> eth2), then the tg3 interface gets called eth2 (which I want as eth0).
>>>
>>> At 6 seconds in, you can see my 70-persistent-net.rules file kicking in
>>> and renaming then to xeth2, xeth1 and xeth0; then finally at 12 seconds,
>>> the second rename in /etc/network/interfaces sets them back to eth0,
>>> eth1 and eth2 in the order I want them.
>> So have you tried with 'ifnames=1'?
> I hadn't, but I've just done so now - it makes no difference - here's dmesg:
>
> [0.00] Linux version 4.19.0-10-amd64 (debian-ker...@lists.debian.org) 
> (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.132-1 (2020-07-24)
> [0.00] Command line: BOOT_IMAGE=/boot/vmlinuz-4.19.0-10-amd64 
> root=UUID=9cbc8bd3-4cb8-4ae1-92c5-5a3659e9aed6 ro net.ifnames=1 quiet
>
> [3.394364] r8169 :04:00.0 eth0: RTL8168e/8111e, 00:e0:4c:80:21:6b, 
> XID 
> 2c20, IRQ 30
> [3.394368] r8169 :04:00.0 eth0: jumbo features [frames: 9200 bytes, 
> tx 
> checksumming: ko]
> [3.450174] r8169 :05:00.0 eth1: RTL8168e/8111e, 00:e0:4c:80:21:6c, 
> XID 
> 2c20, IRQ 31
> [3.450177] r8169 :05:00.0 eth1: jumbo features [frames: 9200 bytes, 
> tx 
> checksumming: ko]
> [3.489342] tg3 :07:00.0 eth2: Tigon3 [partno(BCM95723) rev 5784100] 
> (PCI Express) MAC address 78:ac:c0:f7:89:f7
> [3.489347] tg3 :07:00.0 eth2: attached PHY is 5784 (10/100/1000Base-T 
> Ethernet) (WireSpeed[1], EEE[0])
> [3.489350] tg3 :07:00.0 eth2: RXcsums[1] LinkChgREG[0] MIirq[0] 
> ASF[0] 
> TSOcap[1]
> [3.489352] tg3 :07:00.0 eth2: dma_rwctrl[7618] dma_mask[64-bit]
> [6.187233] tg3 :07:00.0 xeth0: renamed from eth2
> [6.231916] r8169 :05:00.0 xeth2: renamed from eth1
> [6.246745] r8169 :04:00.0 xeth1: renamed from eth0
>
>> And are you sure, that the 'hwaddress' lines in your
>> '/etc/network/interfaces' really define which NIC to use?
> I'm not using hwaddress in that file - that was a suggestion from terryc, and 
> I 
> think it's the wrong idea for exactly the following reason:
>
>> AFAICT this option just changes ("spoofs") the MAC address of the NIC for
>> which it is defined. Although the log confirms that finally eth0 is the tg3
>> NIC, this seems unusual (and very counterintuitive) to me.
>
> Thanks,
>
>
> Antony.
>
It looks like systemd again is responsible for this mess. From what I
understand uses eudev the same files as systemd with udev. If so you
should do

ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules

to make sure (e)udev does not mess with the network devices. (/etc/udev
seems to have priority above /lib/udev)

After that it is somewhat unclear to me. Or
/etc/udev/rules.d/70-persistent-net.rules should work again. Or you
should add a 70-net-name-slot.rules with the syntax of
80-net-name-slot.rules like

SUBSYSTEM!="net", GOTO="net_setup_link_end"
IMPORT{builtin}="path_id"
ACTION!="add", GOTO="net_setup_link_end"
IMPORT{builtin}="net_setup_link"

NAME=="eth0", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
NAME=="eth0", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"
NAME=="eth0", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}"

LABEL="net_setup_link_end"


After adding net.ifnames=0 and biosdevname=0 your system should work as
intended but I do not have the time to test it, hopes it helps in the
right direction.

Grtz.

Nick



signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread Didier Kryn
Le 13/12/2020 à 00:01, Ralph Ronnquist via Dng a écrit :
> On 12/12 23:22, Antony Stone wrote:
>> On Saturday 12 December 2020 at 23:11:25, Ralph Ronnquist via Dng wrote:
>> ...
>>
>> 1. Why is this so totally different from what I could previously do using 
>> /etc/udev/rules.d/70-persistent-net.rules under jessie and earlier releases?
>>
>> 2. https://wiki.debian.org/NetworkInterfaceNames clearly says that if you 
>> upgraded a machine from jessie to stretch and to buster (which for these 
>> purposes I regard as the same as jessie to ascii to beowulf), then it will 
>> continue to work as before, so - what is the difference between doing those 
>> upgrades, and doing a fresh buster / beowulf installation?  What needs to be 
>> changed on a beowulf machine to make it work the same as a jessie machine 
>> upgraded to ascii, upgraded to beowulf?
> If it worked for you previously then, a) there would have been rules
> for double renaming, and b) any network management would have kicked
> in late enough to let name fiddling happen before bringing up the
> interfaces. As you know, one of the joys with parallel boot is the
> random effects of things happening in parallel.
>
    Parallelism might be the issue. In the past, when the first
interface was discovered by the kernel and named eth0, then Udev would
immediately rename it, either to the same name if it matches the rule,
or to ethX which still doesn't exist, then freeing the name eth0, and so
on. The problem may now be that two interfaces are discovered
simultaneously.

--        Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread Antony Stone
On Sunday 13 December 2020 at 14:25:37, tito via Dng wrote:

> On Sun, 13 Dec 2020 10:45:56 +0100 Antony Stone wrote:
> > 
> > From Ascii onwards I get the errors:
> > 
> > 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
> 
> Hi,
> they cannot be renamed because the name is already taken

Yes, I can see that from dmesg.

> NIC1 NIC2 NIC3
> eth0 eth1 eth2 (you have)
> eth1 eth0 eth2 (you want)
> 
> 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
> 
> so renaming fails, use predictable names (remove ifnames=0)

Makes no difference.

> NIC1 NIC2 NIC3
> en1p1 en2p1 en3p1 (you have)
> eth1 eth0 eth2 (you want)

Those are not the names I get.

It doesn't matter whether I have:

net.ifnames=0
net.ifnames=1
no mention of net.ifnames at all

In every case I get eth0, eth1 (PCI card) and eth2 (motherboard).


Antony.

-- 
Why are they called "The Rocky Mountains"?
What are other mountains made of?

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread tito via Dng
On Sun, 13 Dec 2020 14:25:37 +0100
tito via Dng  wrote:

> On Sun, 13 Dec 2020 10:45:56 +0100
> Antony Stone  wrote:
> 
> > On Sunday 13 December 2020 at 09:25:24, terryc wrote:
> > 
> > > On Sat, 12 Dec 2020 14:15:53 +0100
> > > 
> > > 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.
> > > 
> > > Err, what is not clear in 'man interfaces'
> > 
> > If you're referring to the "mapping" section, I've tried that and it
> > doesn't help.
> > 
> > > FWIW, I've just had to do a fresh install of Beowulf and  as I
> > > always do I manuay define /etc/network/interfaces, e.g.
> > > 
> > > # The primary network interface
> > > allow-hotplug eth0
> > > iface eth0 inet static
> > > address 192.168.x.y
> > > netmask 255.255.0.0
> > > gateway 192.168.x.z
> > > 
> > > Just add the line
> > >   hwaddress mac:add:dress:in:usual:format
> > > 
> > > to match eth2 & eth3 to the desired card.
> > 
> > I think that's entirely the wrong way round.
> > 
> > Setting hwaddress in /etc/network/interfaces changes the MAC address
> > of the interface according to its name (eth0, eth1, etc).
> > 
> > I'm looking for the opposite - I want to make sure that the device
> > whose MAC address is 78:ac:c0:f7:89:f7 gets called "eth0" (instead
> > of "eth2", which is what I get from the kernel), and that the
> > devices with MAC addresses 00:e0:4c:80:21:6b and 00:e0:4c:80:21:6c
> > get called "eth1" and "eth2" respectively, instead of "eth0" and
> > "eth1".
> > 
> > I can only repeat - under Jessie and earlier, this was all handled
> > by the settings in /etc/udev/rules.d/70-persistent-net.rules
> > 
> > From Ascii onwards I get the errors:
> > 
> > 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
> 
> Hi,
> they cannot be renamed because the name is already taken
> 
> NIC1 NIC2 NIC3
> eth0 eth1 eth2 (you have)
> eth1 eth0 eth2 (you want)
> 
> 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
> 
> so renaming fails, use predictable names (remove ifnames=0)
> 
> NIC1 NIC2 NIC3
> en1p1 en2p1 en3p1 (you have)
> eth1 eth0 eth2 (you want)
> 
> as there is no name clash the interfaces can be renamed by
> macaddress with udev rules
> 
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
> ATTR{address}=="00:11:22:33:44:51", ATTR{type}=="1", KERNEL=="?*",
> NAME:="eth0" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
> ATTR{address}=="00:11:22:33:44:52", ATTR{type}=="1", KERNEL=="?*",
> NAME:="eth1" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
> ATTR{address}=="00:11:22:33:44:53", ATTR{type}=="1", KERNEL=="?*",
> NAME:="eth2" This works for me on my devuan routers and I was bitten
> by what you are experiencing when I thought that adding ifname=0 was
> a good idea. It was not and at the next reboot the interfaces could
> not be reordered to my liking anymore and were assigned in a wrong
> way which locked me out of the router and broke internet for the joy
> of my coworkers.
> 
> Ciao,
> Tito

P.S.: to make the renaming happen earlier you can add your persistent 
net names file to the initrd in /usr/lib/udev/rules.d/ by hand but
probably this can be made automatic.

> > and so on.
> > 
> > 
> > Antony.
> > 
> 
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread tito via Dng
On Sun, 13 Dec 2020 10:45:56 +0100
Antony Stone  wrote:

> On Sunday 13 December 2020 at 09:25:24, terryc wrote:
> 
> > On Sat, 12 Dec 2020 14:15:53 +0100
> > 
> > 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.
> > 
> > Err, what is not clear in 'man interfaces'
> 
> If you're referring to the "mapping" section, I've tried that and it
> doesn't help.
> 
> > FWIW, I've just had to do a fresh install of Beowulf and  as I
> > always do I manuay define /etc/network/interfaces, e.g.
> > 
> > # The primary network interface
> > allow-hotplug eth0
> > iface eth0 inet static
> > address 192.168.x.y
> > netmask 255.255.0.0
> > gateway 192.168.x.z
> > 
> > Just add the line
> > hwaddress mac:add:dress:in:usual:format
> > 
> > to match eth2 & eth3 to the desired card.
> 
> I think that's entirely the wrong way round.
> 
> Setting hwaddress in /etc/network/interfaces changes the MAC address
> of the interface according to its name (eth0, eth1, etc).
> 
> I'm looking for the opposite - I want to make sure that the device
> whose MAC address is 78:ac:c0:f7:89:f7 gets called "eth0" (instead of
> "eth2", which is what I get from the kernel), and that the devices
> with MAC addresses 00:e0:4c:80:21:6b and 00:e0:4c:80:21:6c get called
> "eth1" and "eth2" respectively, instead of "eth0" and "eth1".
> 
> I can only repeat - under Jessie and earlier, this was all handled by
> the settings in /etc/udev/rules.d/70-persistent-net.rules
> 
> From Ascii onwards I get the errors:
> 
> 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

Hi,
they cannot be renamed because the name is already taken

NIC1 NIC2 NIC3
eth0 eth1 eth2 (you have)
eth1 eth0 eth2 (you want)

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

so renaming fails, use predictable names (remove ifnames=0)

NIC1 NIC2 NIC3
en1p1 en2p1 en3p1 (you have)
eth1 eth0 eth2 (you want)

as there is no name clash the interfaces can be renamed by
macaddress with udev rules

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:11:22:33:44:51", ATTR{type}=="1", KERNEL=="?*", NAME:="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:11:22:33:44:52", ATTR{type}=="1", KERNEL=="?*", NAME:="eth1"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:11:22:33:44:53", ATTR{type}=="1", KERNEL=="?*", NAME:="eth2"
 
This works for me on my devuan routers and I was bitten by what you are 
experiencing when I thought that adding ifname=0 was a good idea.
It was not and at the next reboot the interfaces could not be reordered to my 
liking anymore and were assigned in a wrong way which locked
me out of the router and broke internet for the joy of my coworkers.

Ciao,
Tito

> and so on.
> 
> 
> Antony.
> 

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread Antony Stone
On Sunday 13 December 2020 at 13:02:45, Florian Zieboll via Dng wrote:

> Am 13. Dezember 2020 12:01:39 MEZ schrieb Antony Stone 
:
> > Well, here's the output from "dmesg | grep eth".  It shows the r8169
> > interfaces being given names eth0, eth1 (the ones I want as eth1 and
> > eth2), then the tg3 interface gets called eth2 (which I want as eth0).
> > 
> > At 6 seconds in, you can see my 70-persistent-net.rules file kicking in
> > and renaming then to xeth2, xeth1 and xeth0; then finally at 12 seconds,
> > the second rename in /etc/network/interfaces sets them back to eth0,
> > eth1 and eth2 in the order I want them.
> 
> So have you tried with 'ifnames=1'?

I hadn't, but I've just done so now - it makes no difference - here's dmesg:

[0.00] Linux version 4.19.0-10-amd64 (debian-ker...@lists.debian.org) 
(gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.132-1 (2020-07-24)
[0.00] Command line: BOOT_IMAGE=/boot/vmlinuz-4.19.0-10-amd64 
root=UUID=9cbc8bd3-4cb8-4ae1-92c5-5a3659e9aed6 ro net.ifnames=1 quiet

[3.394364] r8169 :04:00.0 eth0: RTL8168e/8111e, 00:e0:4c:80:21:6b, XID 
2c20, IRQ 30
[3.394368] r8169 :04:00.0 eth0: jumbo features [frames: 9200 bytes, tx 
checksumming: ko]
[3.450174] r8169 :05:00.0 eth1: RTL8168e/8111e, 00:e0:4c:80:21:6c, XID 
2c20, IRQ 31
[3.450177] r8169 :05:00.0 eth1: jumbo features [frames: 9200 bytes, tx 
checksumming: ko]
[3.489342] tg3 :07:00.0 eth2: Tigon3 [partno(BCM95723) rev 5784100] 
(PCI Express) MAC address 78:ac:c0:f7:89:f7
[3.489347] tg3 :07:00.0 eth2: attached PHY is 5784 (10/100/1000Base-T 
Ethernet) (WireSpeed[1], EEE[0])
[3.489350] tg3 :07:00.0 eth2: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] 
TSOcap[1]
[3.489352] tg3 :07:00.0 eth2: dma_rwctrl[7618] dma_mask[64-bit]
[6.187233] tg3 :07:00.0 xeth0: renamed from eth2
[6.231916] r8169 :05:00.0 xeth2: renamed from eth1
[6.246745] r8169 :04:00.0 xeth1: renamed from eth0

> And are you sure, that the 'hwaddress' lines in your
> '/etc/network/interfaces' really define which NIC to use?

I'm not using hwaddress in that file - that was a suggestion from terryc, and I 
think it's the wrong idea for exactly the following reason:

> AFAICT this option just changes ("spoofs") the MAC address of the NIC for
> which it is defined. Although the log confirms that finally eth0 is the tg3
> NIC, this seems unusual (and very counterintuitive) to me.


Thanks,


Antony.

-- 
"I find the whole business of religion profoundly interesting.  But it does 
mystify me that otherwise intelligent people take it seriously."

 - Douglas Adams

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread Florian Zieboll via Dng
Am 13. Dezember 2020 12:01:39 MEZ schrieb Antony Stone 
:

> Well, here's the output from "dmesg | grep eth".  It shows the r8169 
> interfaces being given names eth0, eth1 (the ones I want as eth1 and eth2), 
> then the tg3 interface gets called eth2 (which I want as eth0).
> 
> At 6 seconds in, you can see my 70-persistent-net.rules file kicking in and 
> renaming then to xeth2, xeth1 and xeth0; then finally at 12 seconds, the 
> second 
> rename in /etc/network/interfaces sets them back to eth0, eth1 and eth2 in 
> the 
> order I want them.

So have you tried with 'ifnames=1'?

And are you sure, that the 'hwaddress' lines in your '/etc/network/interfaces' 
really define which NIC to use? AFAICT this option just changes ("spoofs") the 
MAC address of the NIC for which it is defined. Although the log confirms that 
finally eth0 is the tg3 NIC, this seems unusual (and very counterintuitive) to 
me.

libre Grüße,
Florian



-- 
Florian Zieboll
Hauptstraße 6a
D-68535 Edingen

Telefon: +49 6203 925 78 36
Mobil: +49 160 690 15 87
E-Mail: f.zieb...@web.de
PGP keyID: 0xEE454979FE441FD6
Chat / xmpp: f.zieb...@xabber.de
Chat / matrix: @florian_zieboll:feneas.org
WWW: https://www.zwischenspeicher.info

[message sent otg]

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread Antony Stone
On Sunday 13 December 2020 at 11:23:21, Florian Zieboll via Dng wrote:

> Am 13. Dezember 2020 10:45:56 MEZ schrieb Antony Stone:
> > From Ascii onwards I get the errors:
> > 
> > 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
> > 
> > and so on.
> 
> Does the bootlog give a hint, which service did assign the conflicting
> ifnames udevd can't change?

Well, here's the output from "dmesg | grep eth".  It shows the r8169 
interfaces being given names eth0, eth1 (the ones I want as eth1 and eth2), 
then the tg3 interface gets called eth2 (which I want as eth0).

At 6 seconds in, you can see my 70-persistent-net.rules file kicking in and 
renaming then to xeth2, xeth1 and xeth0; then finally at 12 seconds, the second 
rename in /etc/network/interfaces sets them back to eth0, eth1 and eth2 in the 
order I want them.

[3.374572] r8169 :04:00.0 eth0: RTL8168e/8111e, 00:e0:4c:80:21:6b, XID 
2c20, IRQ 30
[3.374576] r8169 :04:00.0 eth0: jumbo features [frames: 9200 bytes, tx 
checksumming: ko]
[3.433052] r8169 :05:00.0 eth1: RTL8168e/8111e, 00:e0:4c:80:21:6c, XID 
2c20, IRQ 31
[3.433056] r8169 :05:00.0 eth1: jumbo features [frames: 9200 bytes, tx 
checksumming: ko]
[3.488464] tg3 :07:00.0 eth2: Tigon3 [partno(BCM95723) rev 5784100] 
(PCI Express) MAC address 78:ac:c0:f7:89:f7
[3.488468] tg3 :07:00.0 eth2: attached PHY is 5784 (10/100/1000Base-T 
Ethernet) (WireSpeed[1], EEE[0])
[3.488471] tg3 :07:00.0 eth2: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] 
TSOcap[1]
[3.488474] tg3 :07:00.0 eth2: dma_rwctrl[7618] dma_mask[64-bit]
[6.139566] r8169 :05:00.0 xeth2: renamed from eth1
[6.168205] r8169 :04:00.0 xeth1: renamed from eth0
[6.186586] tg3 :07:00.0 xeth0: renamed from eth2
[   10.930250] IPv6: ADDRCONF(NETDEV_UP): xeth0: link is not ready
[   12.460422] tg3 :07:00.0 eth0: renamed from xeth0
[   12.533793] r8169 :04:00.0 xeth1: unable to load firmware patch 
rtl_nic/rtl8168e-2.fw (-2)
[   12.645721] IPv6: ADDRCONF(NETDEV_UP): xeth1: link is not ready
[   12.672414] r8169 :04:00.0 eth1: renamed from xeth1
[   12.742780] r8169 :05:00.0 xeth2: unable to load firmware patch 
rtl_nic/rtl8168e-2.fw (-2)
[   12.853714] IPv6: ADDRCONF(NETDEV_UP): xeth2: link is not ready
[   12.880384] r8169 :05:00.0 eth2: renamed from xeth2
[   13.727991] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   13.961821] bond0: Enslaving eth1 as an active interface with a down link
[   14.081838] bond0: Enslaving eth2 as an active interface with a down link
[   16.522996] tg3 :07:00.0 eth0: Link is up at 1000 Mbps, full duplex
[   16.523020] tg3 :07:00.0 eth0: Flow control is on for TX and on for RX
[   16.523074] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

If I can post anything else which shows the detail you're after, please let me 
know where it would be recorded.


Thanks,


Antony.

-- 
This email was created using 100% recycled electrons.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread Florian Zieboll via Dng
Am 13. Dezember 2020 10:45:56 MEZ schrieb Antony Stone 
:

> From Ascii onwards I get the errors:
> 
> 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
> 
> and so on.


Does the bootlog give a hint, which service did assign the conflicting ifnames 
udevd can't change?




-- 

[message sent otg]

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread Antony Stone
On Sunday 13 December 2020 at 09:25:24, terryc wrote:

> On Sat, 12 Dec 2020 14:15:53 +0100
> 
> 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.
> 
> Err, what is not clear in 'man interfaces'

If you're referring to the "mapping" section, I've tried that and it doesn't 
help.

> FWIW, I've just had to do a fresh install of Beowulf and  as I always do
> I manuay define /etc/network/interfaces, e.g.
> 
> # The primary network interface
> allow-hotplug eth0
> iface eth0 inet static
> address 192.168.x.y
> netmask 255.255.0.0
> gateway 192.168.x.z
> 
> Just add the line
>   hwaddress mac:add:dress:in:usual:format
> 
> to match eth2 & eth3 to the desired card.

I think that's entirely the wrong way round.

Setting hwaddress in /etc/network/interfaces changes the MAC address of the 
interface according to its name (eth0, eth1, etc).

I'm looking for the opposite - I want to make sure that the device whose MAC 
address is 78:ac:c0:f7:89:f7 gets called "eth0" (instead of "eth2", which is 
what I get from the kernel), and that the devices with MAC addresses 
00:e0:4c:80:21:6b and 00:e0:4c:80:21:6c get called "eth1" and "eth2" 
respectively, instead of "eth0" and "eth1".

I can only repeat - under Jessie and earlier, this was all handled by the 
settings in /etc/udev/rules.d/70-persistent-net.rules

From Ascii onwards I get the errors:

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

and so on.


Antony.

-- 
Python is executable pseudocode.
Perl is executable line noise.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-13 Thread terryc
On Sat, 12 Dec 2020 14:15:53 +0100
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.

Err, what is not clear in 'man interfaces'
FWIW, I've just had to do a fresh install of Beowulf and  as I always do
I manuay define /etc/network/interfaces, e.g.

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.x.y
netmask 255.255.0.0
gateway 192.168.x.z

Just add the line
hwaddress mac:add:dress:in:usual:format

to match eth2 & eth3 to the desired card.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Steve Litt
On Sat, 12 Dec 2020 16:06:03 +0100
Antony Stone  wrote:

> On Saturday 12 December 2020 at 15:27:08, d...@d404.nl wrote:
> 
> > On 12-12-2020 14:15, Antony Stone wrote:  
> > > 
> > > 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.  
> > 
> > From what I understand after some research you need an additional
> > 
> > /etc/udev/rules.d/10-network.rules as follows:
> > 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"  
> 
> Thanks, but no - it makes no difference.
> 
> I tried:
> 
> 1. Adding that file and keeping 70-persistent-net.rules as well
> 
> 2. Adding that file and removing 70-persistent-net.rules
> 
> 3. Both the above both with and without net.ifnames=0 in the kernel
> boot parameters.
> 
> In every case I continue to get eth0 and eth1 as my PCI card, and the 
> motherboard interface as eth2.
> 
> 
> Anyone else got any useful ideas?

You can create one or a few very simple shellscripts to turn stuff like
eno01y0u5uck02 into eth0, as long as the device isn't moved around,
which ports on a pci card wouldn't be. Another Devuaner and I wrote the
basics of such a script and posted it on this mailing list, several
years ago. 

Sorry, but I'm on a tight deadline and can't research
anything more than this memory. Perhaps somebody else knows.

SteveT

Steve Litt 
Autumn 2020 featured book: Thriving in Tough Times
http://www.troubleshooters.com/thrive
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Ralph Ronnquist via Dng
On 13/12 02:47, Antony Stone wrote:
> On Sunday 13 December 2020 at 01:09:18, Ralph Ronnquist via Dng wrote:
> 
> > Well, the kernel modules makes the first naming, and assigns them as
> > eth0, eth1, eth2. That happens before udev starts.
> > 
> > The kernel refuses any attempt to name an interface to, say, eth0 if
> > that name is taken.
> > 
> > Those "facts" have been in effect since last millenium, so whatever
> > happened for you before would have happened within the eclipse of
> > those "facts".
> 
> So... what's the correct way, in a current Devuan release, to ensure
> that each ethernet interface gets the name you want it to have,
> based on its MAC address (which, as far as I know, is the only
> uniquely identifiable thing about an interface, wherever it happens
> to be found, and in whatever order it gets identified)?

I wish I could tell you exactly: there are many different ways that
turn out to work well for some range of situations, but then not for
others.

Generally the first step is to use a different, unused name series,
say en0, en1, en2, with udev rules for mapping particular macaddress
to particular name.

If one could live with that, it would be a solution.

To map back into ethN requires another udev rule, but this rule must
not be in use until all the interfaces have been duly mapped (by the
above rules). If you use initrd the root pivot make a "stage barrier";
you can arrange the rules such that this mapping-back rule is checked
before the mapping forward rule for each interface, and thereby
achieve that the back mapping only happens at the post-pivot /sys
enumeration.

I'm sure there may be other ways to achieve the "stage barrier"; udev
is a programming language even if obscure.

>
> Antony.
> 
> -- 
> Don't procrastinate - put it off until tomorrow.
> 
>Please reply to the list;
>  please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Antony Stone
On Sunday 13 December 2020 at 01:09:18, Ralph Ronnquist via Dng wrote:

> Well, the kernel modules makes the first naming, and assigns them as
> eth0, eth1, eth2. That happens before udev starts.
> 
> The kernel refuses any attempt to name an interface to, say, eth0 if
> that name is taken.
> 
> Those "facts" have been in effect since last millenium, so whatever
> happened for you before would have happened within the eclipse of
> those "facts".

So... what's the correct way, in a current Devuan release, to ensure that each 
ethernet interface gets the name you want it to have, based on its MAC address 
(which, as far as I know, is the only uniquely identifiable thing about an 
interface, wherever it happens to be found, and in whatever order it gets 
identified)?


Antony.

-- 
Don't procrastinate - put it off until tomorrow.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Ralph Ronnquist via Dng
On 13/12 00:40, Antony Stone wrote:
> > If it worked for you previously then, a) there would have been rules
> > for double renaming,
> 
> Please point me at where I should find these.
> 
> I only know that /etc/udev/rules.d/70-persistent-net.rules was the
> *only* file I needed to edit if I wanted to rearrange the naming of
> the interfaces under Jessie or earlier.

Well, the kernel modules makes the first naming, and assigns them as
eth0, eth1, eth2. That happens before udev starts.

The kernel refuses any attempt to name an interface to, say, eth0 if
that name is taken.

Those "facts" have been in effect since last millenium, so whatever
happened for you before would have happened within the eclipse of
those "facts".

> > and b) any network management would have kicked
> > in late enough to let name fiddling happen before bringing up the
> > interfaces. As you know, one of the joys with parallel boot is the
> > random effects of things happening in parallel.
> 
> I thought "parallel boot" was one of the evils that systemd was designed to 
> bring in.  In what way does Devuan do "parallel boot"?

afact 1) udev processes events (somewhat) in parallel, and 2) the
post-pivot boot runs init scripts in as much parallelism as is allowed
with respect to their declared dependencies. That latter thing is
something newish (10 years?) but current default.

> > The default installation (unfortunately?) have wicd as player to
> > provide networking randomness, but network-manager is good at it too.
> 
> I have neither of those installed on the machines in question.

That's good. Then also avoid "allow-hotplug" declarations as otherwise
udev will bring up interfaces in the pre-pivot boot. I think that
should be enough for using ifrename. (It does come with the
disadvantage of needing manual touch after plugging in cables)

> Antony.
> 
> -- 
> Perfection in design is achieved not when there is nothing left to add, but 
> rather when there is nothing left to take away.
> 
>  - Antoine de Saint-Exupery
> 
>Please reply to the list;
>  please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited - a workaround (but the basic question still remains)

2020-12-12 Thread tito via Dng
On Sat, 12 Dec 2020 23:11:52 +0100
Antony Stone  wrote:

> On Saturday 12 December 2020 at 14:15:53, Antony Stone wrote:
> 
> > 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.
> 
> > 1. how can I get 70-persistent-net.rules to carry on working under
> > Beowulf?

Hi,
enable predictable names (remove net.ifnames=0 or set it to 1
and update grub) 
and use 70-persistent-net.rules with old names (maybe also
update initramfs if rules files are copied there)

Ciao,
Tito


> > 2. what's the "correct" way to get my interfaces named the way I
> > want, according to their MAC addresses, under Beowulf?
> 
> So, I have found a workaround:
> 
> 1. Create /etc/udev/rules.d/70-persistent-net.rules containing a set
> of rules such as:
> 
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
> ATTR{address}=="78:ac:c0:f7:89:f7", ATTR{dev_id}=="0x0",
> ATTR{type}=="1", KERNEL=="eth*", NAME="xeth0"
> 
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
> ATTR{address}=="00:e0:4c:80:21:6b", ATTR{dev_id}=="0x0",
> ATTR{type}=="1", KERNEL=="eth*", NAME="xeth1"
> 
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
> ATTR{address}=="00:e0:4c:80:21:6c", ATTR{dev_id}=="0x0",
> ATTR{type}=="1", KERNEL=="eth*", NAME="xeth2"
> 
> The names are in the order I want them, but prefixed with "x" so they
> don't conflict with what the kernel decided to call them as it booted.
> 
> 2. Add some sections to /etc/network/interfaces:
> 
> auto xeth0 xeth1 xeth2
> 
> iface xeth0 inet manual
> up ip link set xeth0 down
> up ip link set xeth0 name eth0
> 
> iface xeth1 inet manual
> up ip link set xeth1 down
> up ip link set xeth1 name eth1
> 
> iface xeth2 inet manual
> up ip link set xeth2 down
> up ip link set xeth2 name eth2
> 
> That re-renames the (already pseudo-renamed) interfaces to what I
> really want.
> 
> I can then follow that with the standard:
> 
> auto eth0
> iface eth0 inet static
> address 192.168.36.9
> netmask 255.255.255.0
> gateway 192.168.36.5
> 
> etc.
> 
> 
> I would still *really like* to know:
> 
> 1. how can I get 70-persistent-net.rules to carry on working as it
> used to, under Beowulf?  (I never had to do this sort of workaround
> in Jessie or before.)
> 
> 2. what's the "correct" way to get my interfaces named the way I want,
> according to their MAC addresses, under Beowulf, and therefore also
> Chimaera?
> 
> 
> Thanks,
> 
> 
> Antony.
> 

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Antony Stone
On Sunday 13 December 2020 at 00:01:06, Ralph Ronnquist via Dng wrote:

> On 12/12 23:22, Antony Stone wrote:
> > 
> > 1. Why is this so totally different from what I could previously do using
> > /etc/udev/rules.d/70-persistent-net.rules under jessie and earlier
> > releases?
> 
> If it worked for you previously then, a) there would have been rules
> for double renaming,

Please point me at where I should find these.

I only know that /etc/udev/rules.d/70-persistent-net.rules was the *only* file 
I needed to edit if I wanted to rearrange the naming of the interfaces under 
Jessie or earlier.

> and b) any network management would have kicked
> in late enough to let name fiddling happen before bringing up the
> interfaces. As you know, one of the joys with parallel boot is the
> random effects of things happening in parallel.

I thought "parallel boot" was one of the evils that systemd was designed to 
bring in.  In what way does Devuan do "parallel boot"?

> The default installation (unfortunately?) have wicd as player to
> provide networking randomness, but network-manager is good at it too.

I have neither of those installed on the machines in question.


Antony.

-- 
Perfection in design is achieved not when there is nothing left to add, but 
rather when there is nothing left to take away.

 - Antoine de Saint-Exupery

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited - a workaround (but the basic question still remains)

2020-12-12 Thread Antony Stone
On Sunday 13 December 2020 at 00:01:11, Florian Zieboll via Dng wrote:

> On Sat, 12 Dec 2020 23:11:52 +0100 Antony Stone wrote:
> > I would still *really like* to know:
> > 
> > 1. how can I get 70-persistent-net.rules to carry on working as it
> > used to, under Beowulf?  (I never had to do this sort of workaround
> > in Jessie or before.)
> 
> Hallo Antony,
> 
> do I understand correctly, that your issue is the order of the NICs
> (not eth0 assigned to the onboard card, but eth1 or eth2) and not the
> naming scheme (ethN vs. predictable) itself?

Correct.

> If so, have you double checked, that 'net.ifnames=0' is really not set / did
> you remember to 'update-grub' after changing it?

Both correct.

> Did you check /lib/udev/rules.d/ for conflicting rules?

There is nothing there which:

a) references the names of my interfaces (eg: eth0)

b) references the MAC addresses of my interfaces

c) is more recent than January 1st 2020, on a machine I installed last week, 
therefore I don't believe the files there have any knowledge of my hardware.


Antony.

-- 
The Magic Words are Squeamish Ossifrage.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited - a workaround (but the basic question still remains)

2020-12-12 Thread Florian Zieboll via Dng
On Sat, 12 Dec 2020 23:11:52 +0100
Antony Stone  wrote:

> I would still *really like* to know:
> 
> 1. how can I get 70-persistent-net.rules to carry on working as it
> used to, under Beowulf?  (I never had to do this sort of workaround
> in Jessie or before.)


Hallo Antony,

do I understand correctly, that your issue is the order of the NICs
(not eth0 assigned to the onboard card, but eth1 or eth2) and not the
naming scheme (ethN vs. predictable) itself? If so, have you double
checked, that 'net.ifnames=0' is really not set / did you remember to
'update-grub' after changing it?

Did you check /lib/udev/rules.d/ for conflicting rules?

libre Grüße,
Florian
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Ralph Ronnquist via Dng
On 12/12 23:22, Antony Stone wrote:
> On Saturday 12 December 2020 at 23:11:25, Ralph Ronnquist via Dng wrote:
> ...
> 
> 1. Why is this so totally different from what I could previously do using 
> /etc/udev/rules.d/70-persistent-net.rules under jessie and earlier releases?
> 
> 2. https://wiki.debian.org/NetworkInterfaceNames clearly says that if you 
> upgraded a machine from jessie to stretch and to buster (which for these 
> purposes I regard as the same as jessie to ascii to beowulf), then it will 
> continue to work as before, so - what is the difference between doing those 
> upgrades, and doing a fresh buster / beowulf installation?  What needs to be 
> changed on a beowulf machine to make it work the same as a jessie machine 
> upgraded to ascii, upgraded to beowulf?

If it worked for you previously then, a) there would have been rules
for double renaming, and b) any network management would have kicked
in late enough to let name fiddling happen before bringing up the
interfaces. As you know, one of the joys with parallel boot is the
random effects of things happening in parallel.

> 
> And, of course, finally:
> 
> 3. Once /etc/udev/rules.d/70-persistent-net.rules no longer works at
> all under Chimaera, what is the correct / official way of getting
> interfaces named as you want them, according to their MAC addresses?

Without being held awake by this issue myself, I can only suggest a
two phase solution where you have 1) udev rules kicking in during
pre-pivot boot to rename anything ethN onto say the xethN series, and
then 2) an ifrename service for the post-pivot boot, to name the
interfaces by macaddress.

Howver, in order for that to work you must also make sure that your
network management software stays inactive until after the ifrename
activity. The easiest for that is to only rely the ifupdown networking
which in the normal setting is a post-pivot activity subsequent to
ifrename.

The default installation (unfortunately?) have wicd as player to
provide networking randomness, but network-manager is good at it too.

Ralph

> 
> Thanks,
> 
> 
> Antony.
> 
> -- 
> I bought a book about anti-gravity.  The reviews say you can't put it down.
> 
>Please reply to the list;
>  please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Antony Stone
On Saturday 12 December 2020 at 23:11:25, Ralph Ronnquist via Dng wrote:

> 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.

It used to work, with udev and the rules.d files.

> 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).

I think you have given an excellent description of what is going on.

1. Why is this so totally different from what I could previously do using 
/etc/udev/rules.d/70-persistent-net.rules under jessie and earlier releases?

2. https://wiki.debian.org/NetworkInterfaceNames clearly says that if you 
upgraded a machine from jessie to stretch and to buster (which for these 
purposes I regard as the same as jessie to ascii to beowulf), then it will 
continue to work as before, so - what is the difference between doing those 
upgrades, and doing a fresh buster / beowulf installation?  What needs to be 
changed on a beowulf machine to make it work the same as a jessie machine 
upgraded to ascii, upgraded to beowulf?


And, of course, finally:

3. Once /etc/udev/rules.d/70-persistent-net.rules no longer works at all under 
Chimaera, what is the correct / official way of getting interfaces named as you 
want them, according to their MAC addresses?


Thanks,


Antony.

-- 
I bought a book about anti-gravity.  The reviews say you can't put it down.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited - a workaround (but the basic question still remains)

2020-12-12 Thread Antony Stone
On Saturday 12 December 2020 at 14:15:53, Antony Stone wrote:

> 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.

> 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?

So, I have found a workaround:

1. Create /etc/udev/rules.d/70-persistent-net.rules containing a set of rules 
such as:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="78:ac:c0:f7:89:f7", ATTR{dev_id}=="0x0", ATTR{type}=="1", 
KERNEL=="eth*", NAME="xeth0"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:e0:4c:80:21:6b", ATTR{dev_id}=="0x0", ATTR{type}=="1", 
KERNEL=="eth*", NAME="xeth1"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:e0:4c:80:21:6c", ATTR{dev_id}=="0x0", ATTR{type}=="1", 
KERNEL=="eth*", NAME="xeth2"

The names are in the order I want them, but prefixed with "x" so they don't 
conflict with what the kernel decided to call them as it booted.

2. Add some sections to /etc/network/interfaces:

auto xeth0 xeth1 xeth2

iface xeth0 inet manual
up ip link set xeth0 down
up ip link set xeth0 name eth0

iface xeth1 inet manual
up ip link set xeth1 down
up ip link set xeth1 name eth1

iface xeth2 inet manual
up ip link set xeth2 down
up ip link set xeth2 name eth2

That re-renames the (already pseudo-renamed) interfaces to what I really want.

I can then follow that with the standard:

auto eth0
iface eth0 inet static
address 192.168.36.9
netmask 255.255.255.0
gateway 192.168.36.5

etc.


I would still *really like* to know:

1. how can I get 70-persistent-net.rules to carry on working as it used to, 
under Beowulf?  (I never had to do this sort of workaround in Jessie or 
before.)

2. what's the "correct" way to get my interfaces named the way I want,
according to their MAC addresses, under Beowulf, and therefore also Chimaera?


Thanks,


Antony.

-- 
These clients are often infected by viruses or other malware and need to be 
fixed.  If not, the user at that client needs to be fixed...

 - Henrik Nordstrom, on Squid users' mailing list

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Ralph Ronnquist via Dng
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, d...@d404.nl 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@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Hendrik Boom
On Sat, Dec 12, 2020 at 02:15:53PM +0100, 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?

I remember having this problem some years ago with some upgrade (I no longer 
know which one).  It may not have been ascii -> beowulf.  And it may have been 
an earlier Debian upgrade.

In the past when eth0 and eth1 got misassigned I had fixed things by swapping 
the cables on the back of the machine.  Since in those days things were 
consistend from boot to boot, it took care of the problem.

However, this time things were no longer so consistent.

I had to solve it by assigning new names to the interfaces (thus not eth0 or 
eth1) and modifying all the config files mentioning those interface names (I 
found them with grep) to use the new names instead.

Apparently the eth0 file names were allocated a a low-level in the kernel and 
the kernel did not take kindly to having them changed.

It should have been easier.

Unfortunately I can no longer find the files where I did this.

If you have ideas where I could look, I can try to figure out what I did.

I wish everything user-configurable under /etc was under revision control.
then we might even be able to have a vendor branch and a local branch.

-- hendrik

> 
> 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.
> 
> -- 
> Numerous psychological studies over the years have demonstrated that the 
> majority of people genuinely believe they are not like the majority of people.
> 
>Please reply to the list;
>  please *don't* CC me.
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Antony Stone
On Saturday 12 December 2020 at 16:28:04, Didier Kryn wrote:

> Le 12/12/2020 à 14:15, Antony Stone a écrit :
> > 
> > 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?
> 
> Udev has made a big effort to hide its action to the administrator.
> The rules have first been cached in /lib/udev; then the administerable
> files in /etc have been removed.
> 
> Eudev keeps a track of the names it has already assigned to
> interfaces, in /lib/udev/rules.d .

Ah, thanks, I didn't know about that directory (and indeed there are a *lot* 
of files in it - far more even than I'm used to seeing in old Debian machines' 
/etc/udev/rules.d/ directories).

> Maybe you can find something concerning your ethernet interfaces in
> one of these files and maybe your problem is just that Eudev doesn't
> want to overwrite that file; therefore you might try to delete it
> (rename it for safety).

Hm; no.

Firstly there are no references to eth0, eth1 or eth2 in any of those files, 
and secondly the files are all older than Jan 1 2020, so clearly nothing has 
been put there based on the hardware in this machine.

> I don't grant it works; but this is one thing I would try.

Thanks for the idea, and thanks for pointing me at something I didn't 
previously know about, even if it wasn't the solution to my problem.


Antony.

-- 
Never automate fully anything that does not have a manual override capability. 
Never design anything that cannot work under degraded conditions in emergency.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Didier Kryn
Le 12/12/2020 à 14:15, Antony Stone a écrit :
> 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.

    Udev has made a big effort to hide its action to the administrator.
The rules have first been cached in /lib/udev; then the administerable
files in /etc have been removed.

    Eudev keeps a track of the names it has already assigned to
interfaces, in /lib/udev/rules.d .

    Maybe you can find something concerning your ethernet interfaces in
one of these files and maybe your problem is just that Eudev doesn't
want to overwrite that file; therefore you might try to delete it
(rename it for safety).

    I don't grant it works; but this is one thing I would try.

--        Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Antony Stone
On Saturday 12 December 2020 at 16:06:29, tito via Dng wrote:

> On Sat, 12 Dec 2020 14:15:53 +0100 Antony Stone wrote:
> > 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 _have_ tried adding "net.ifnames=0" to the kernel boot line; this
> > makes no difference.

> Hi,
> You can:
> 
> 1) delete the persistent net names file and get the interfaces with
>  old style names but eventually reordered (with net.ifnames=0).

I do not have a problem with the style of the names.

I am getting eth0 and eth1 on my PCI card and eth2 on the motherboard.

I want eth0 on the motherboard and eth1 and eth2 on the PCI card.

> 2) use a new net persistent names file using mac address or pci bus (use
> lspci to get it):
> 
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
> ATTR{address}=="00:00:00:00:00:ea", ATTR{type}=="1", KERNEL=="?*",
> NAME:="eth0"
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
> ATTR{address}=="00:00:00:00:00:eb", ATTR{type}=="1", KERNEL=="?*",
> NAME:="eth1"

Sorry, how is that different from what I already did above?


Regards,


Antony.

-- 
I lay awake all night wondering where the sun went, and then it dawned on me.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread tito via Dng
On Sat, 12 Dec 2020 14:15:53 +0100
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.
> 

Hi,
You can:

1) delete the persistent net names file and get the interfaces with
 old style names but eventually reordered (with net.ifnames=0).

2) use a new net persistent names file using mac address or pci bus (use lspci 
to get it):

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:00:00:00:00:ea", ATTR{type}=="1", KERNEL=="?*", NAME:="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:00:00:00:00:eb", ATTR{type}=="1", KERNEL=="?*", NAME:="eth1"

or

SUBSYSTEM=="net", ACTION=="add", KERNELS==":01:00.0", NAME:="eth0"
SUBSYSTEM=="net", ACTION=="add", KERNELS==":01:00.1", NAME:="eth1"

Ciao,
Tito


   
 
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread Antony Stone
On Saturday 12 December 2020 at 15:27:08, d...@d404.nl wrote:

> On 12-12-2020 14:15, Antony Stone wrote:
> > 
> > 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.
> 
> From what I understand after some research you need an additional
> 
> /etc/udev/rules.d/10-network.rules as follows:
> 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"

Thanks, but no - it makes no difference.

I tried:

1. Adding that file and keeping 70-persistent-net.rules as well

2. Adding that file and removing 70-persistent-net.rules

3. Both the above both with and without net.ifnames=0 in the kernel boot 
parameters.

In every case I continue to get eth0 and eth1 as my PCI card, and the 
motherboard interface as eth2.


Anyone else got any useful ideas?


Antony.

-- 
"Linux is going to be part of the future. It's going to be like Unix was."

 - Peter Moore, Asia-Pacific general manager, Microsoft

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Ethernet names revisited

2020-12-12 Thread d...@d404.nl
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 | |



signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng