:: Re: [DNG] My Qemu LAN-peer document…
Forside
Slet denne besked
Besvar denne besked
Skribent: Florian Zieboll
Dato:  
Til: dng
Emne: Re: [DNG] My Qemu LAN-peer documentation is now in its first draft
On Wed, 3 Mar 2021 10:49:19 +0100
Antony Stone <Antony.Stone@???> wrote:

> On Wednesday 03 March 2021 at 10:40:20, Florian Zieboll via Dng wrote:
>
> > On Wed, 3 Mar 2021 08:04:19 +0100
> >
> > tito via Dng <dng@???> wrote:
> > > you can set the device names by MAC addresses at boot
> > > and in the past it worked as udev/eudev net-persisent-name.rules
> > > (but seems to be broken, optimized out nowadays).
> >
> > Thanks, Tito, for the clue! I am using udev (resp. eudev) rules to
> > define the NIC names by MAC addresses and had not been aware of the
> > upcoming change (with buster / beowulf it is still working).
> >
> > For the sake of completeness and y'all's convenience, here a link
> > to the related info in the Debianwiki:
> >
> > https://wiki.debian.org/NetworkInterfaceNames
>
> That was where I started 2½ months ago and found that things were
> certainly more complicated than they used to be under previous
> versions of De{bi,vu}an (but I did end up with a working solution).
>
> https://lists.dyne.org/lurker/message/20201212.131553.0a6af87d.en.html



Sure, it is more error prone to work with enx"$mac" NIC names, but as
it's probably too late for complaining, I just made my router "future
proof":

backup /etc/:
$ cp -a /etc /etc.bkp

cd to /etc/:
$ cd /etc/

delete related custom udev rules
$ rm ./udev/rules.d/7?-persistent-net-*\.rules

define future NIC names as variables to avoid mistakes:
$ eth0_new=`udevadm test-builtin net_id /sys/class/net/eth0 2>/dev/null | grep "ID_NET_NAME_MAC=" | sed 's/ID_NET_NAME_MAC=//'`
$ eth1_new=`udevadm test-builtin net_id /sys/class/net/eth1 2>/dev/null | grep "ID_NET_NAME_MAC=" | sed 's/ID_NET_NAME_MAC=//'`

test run to stdout (commented lines are excluded)
$ grep -r ^[^#]*eth[0-1] ./* | sed -e "s/eth0/$eth0_new/g" -e "s/eth1/$eth1_new/g"

replace NIC names "inplace" (with commented lines still excluded)
$ grep -rl ^[^#]*eth[0-1] ./* | xargs -l1 sed -i -e "s/eth0/$eth0_new/g" -e "s/eth1/$eth1_new/g"

reboot

so far, everything seems to work fine -_-


libre Grüße,
Florian