Grant Edwards wrote:
> On 2024-05-21, Dale <rdalek1...@gmail.com> wrote:
>
>>> Here's my udev rules file that defines my network interface names
>>> for the machine I'm on at the moment:
>>>
>>> ------------------/etc/udev/rules.d/70-my-persistent-net.rules-----------------------
>>> SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="2c:f0:5d:6f:10:af", 
>>> NAME="net0"
>>> SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:1b:21:b1:d1:e9", 
>>> NAME="net1"
>>> -------------------------------------------------------------------------------------
>> Examples do help a lot.  I do use the enp* naming scheme.  My
>> understanding, that is the "new" way.
> The suffix for those enp* names comes from the PCI bus subsystem based
> on bus number, slot number, etc.  [Yes, slot number apparently does
> change based on what PCIe cards are present. No, that doesn't make
> sense to me either]
>
>> Based on your config, I would need to change the NAME= to enp* names
>> and that would correct that.
> I suppose you could, but I would not use enp* names. Those could
> conflict with the autogenerated names.
>
>> Where you have ATTR, is that a quote or did you edit to remove a
>> number, MAC address, IP or something? 
> What I posted is exactly what's in the file
> (without the ----------- delimiters).
>
> Here's more documentation:
>
> https://wiki.gentoo.org/wiki/Udev
> https://wiki.archlinux.org/title/udev
> https://wiki.archlinux.org/title/Network_configuration#Change_interface_name
>
> [The arch Wiki is always a good fallback if the Gentoo manual/Wiki
> don't have what you're looking for.]
>
>> If it is one of those, where do I find that info?  I checked
>> ifconfig and didn't see a MAC address.  I also checked lspci -v. 
>> I'm not sure where you get the needed info from.   BTW, right now,
>> I'm on my main rig. 
> The only thing you need to change from my example would be the mac
> address(es) (e.g. 2c:f0:5d:6f:10:af) and the names (e.g. net0).
>
>> I have the package net-misc/networkmanager installed.  Most likely
>> pulled in by something else.  Could I use it to configure this? 
> Possibly, I don't use networkmanager and don't know how it works on
> Gentoo.  I use the default Gentoo netifrc scheme
> https://wiki.gentoo.org/wiki/Netifrc.
>
>> I also have KDE installed on the NAS box, it is also a backup rig in
>> case my main rig dies.  It may have a GUI that I could use.  I'm not
>> opposed to the command line way tho.  Biggest thing, copy and paste
>> would be nice. 
> I don't know much of anything about KDE.
>
> --
> Grant

Got a little busy with my garden.  Found my first zucchini yesterday. 
Ready to pick in a few days.  Found some small tomatoes too.  Anyway. 
Did manage to create this rule tho.  This look reasonable?  I'm thinking
it should be named something else tho.  It could clash with the usual
name. 

# PCI device 0x11ab:0x4363 (Intel e1000e)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="68:05:ca:42:17:39",ATTR{dev_id}=="0x0", ATTR{type}=="1",
KERNEL=="eth*", NAME="enp3s0"

I got the ATTR address from ifconfig.  I'm not real sure on the other
ATTR variables tho.

I did this on my main rig.  It is commented out at the moment.  I'll use
it as a guide on the NAS box tho.  May enable this on my main rig, just
so they all the same.

Ironically, I removed the net.enp* from the default runlevel and put
dhcpd back.  It starts no matter where the card is located with that. 
It just sees it, starts it and carries on.  Still, I'd like all my
installs to be done the same way.  It's hard enough to remember how to
do things.  :/

Thanks.

Dale

:-)  :-) 

Reply via email to