Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Interface names

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
chargejan
Posts: 8
Joined: 2018-02-07 10:15

Interface names

#1 Post by chargejan »

Hello

Iam using fresh installation of Debian 9 on older server and i noticed strange behaviour while naming network interfaces. Iam not looking for answer how to rename them using 70-persistent-net.rules after bit of a change in grub, but iam mainly interested why the naming convention is not applies here ate all:

2: eno1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:**********:42 brd ff:ff:ff:ff:ff:ff
3: rename3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:*******:43 brd ff:ff:ff:ff:ff:ff
4: rename4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether ************:44 brd ff:ff:ff:ff:ff:ff
inet 10.1.***** brd 10.1.***** scope global rename4
valid_lft forever preferred_lft forever
inet6 ************* scope link
valid_lft forever preferred_lft forever
5: rename5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether *********:45 brd ff:ff:ff:ff:ff:ff

Not sure where eno1 is coming from but mainly, why are interfaces named "rename". Each of them are unique interfaces with MAC addreses, oddly same until las digit which is incremented by one (ergo :42 / :43 / :44 ....). Everything is working normally, you can see rename4 is normally obtaining address via DHCP (which needed to be added manually to network/interface, since sometimes after reboot he did not regained it, sometime it did, but thats just FYI, to be complete)

I would not mind ens**, iam just wondering what is this about? It was not tampered with, its simply state after install.

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Interface names

#2 Post by Thorny »

chargejan wrote:I would not mind ens**, iam just wondering what is this about? It was not tampered with, its simply state after install.
This might help.
https://www.freedesktop.org/wiki/Softwa ... faceNames/
Did you add your own rules to udev?

chargejan
Posts: 8
Joined: 2018-02-07 10:15

Re: Interface names

#3 Post by chargejan »

I did not, i now realize the last sentence was bit off my goal. I know there is a lot of people interested exactly why new convention needed to be adopted and why it look as it does, but iam really more baffled why my interfaces are named "rename2" etc. by default, which looks odd. I did not played with udev at all.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Interface names

#4 Post by bw123 »


baffled why my interfaces are named "rename2" etc. by default,
Researching the hardware will probably be helpful. Some type of virtual nic arrangement?
resigned by AI ChatGPT

chargejan
Posts: 8
Joined: 2018-02-07 10:15

Re: Interface names

#5 Post by chargejan »

just this
https://www.supermicro.com/products/mot ... -ln4f_.cfm

Intel® i350 Quad Port Gigabit Ethernet
Virtual Machine Device Queues reduce I/O overhead
Supports 10BASE-T, 100BASE-TX, and 1000BASE-T, RJ45 output
1x Realtek RTL8201N PHY (dedicated IPMI)

I may just settle down with the naming it gave, but would like to have answer for my senior admin since it baffled him too :))

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Interface names

#6 Post by debiman »

adding this:

Code: Select all

net.ifnames=0
to your linux boot command will get you back those old interface names like eth1 etc.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Interface names

#7 Post by Head_on_a_Stick »

chargejan wrote:iam really more baffled why my interfaces are named "rename2" etc. by default, which looks odd. I did not played with udev at all.
Do you have /etc/udev/rules.d/70-persistent-net.rules on your system?

See https://askubuntu.com/questions/354783/ ... as-rename3

Use journalctl(1) to check if there are any problems in the logs.
deadbang

chargejan
Posts: 8
Joined: 2018-02-07 10:15

Re: Interface names

#8 Post by chargejan »

I used this

1) Edit your /etc/default/grub change GRUB_CMDLINE_LINUX="" to :

GRUB_CMDLINE_LINUX="net.ifnames=0"

from
https://unix.stackexchange.com/question ... ian-jessie

And it worked, now my interfaces are eth0 and so on. I think iam happy now. Thanks guys

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Interface names

#9 Post by Thorny »

chargejan wrote:..., now my interfaces are eth0 and so on. I think iam happy now. Thanks guys
You did good! ;-)

Just in the interest of completeness, that
freedesktop.org wiki link I posted also shows the other two methods of avoiding "predictable" interface names. In case others want to do it with a different method.

chargejan
Posts: 8
Joined: 2018-02-07 10:15

Re: Interface names

#10 Post by chargejan »

I have sad addon, the running interface is still rename4 but i think iam giving up, its just stubborn system, i respect it :/

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:25:90:f4:**:42 brd ff:ff:ff:ff:ff:ff
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:25:90:f4:**:43 brd ff:ff:ff:ff:ff:ff
4: rename4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:25:90:f4:**:44 brd ff:ff:ff:ff:ff:ff
inet 10.1*** brd 10.1.**5 scope global rename4
valid_lft forever preferred_lft forever
inet6 fe80::225:**4/64 scope link
valid_lft forever preferred_lft forever
5: eth3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:25:90:f4:**:45 brd ff:ff:ff:ff:ff:ff

Or mabye i can try biosdevname=0 after installing it, not sure about that tho

dryden
Posts: 80
Joined: 2015-02-04 08:54

Re: Interface names

#11 Post by dryden »

You are probably best off renaming them using

Code: Select all

man systemd.link

Code: Select all

[Match]
MACAddress=.....

[Link]
NamePolicy=
Name=.....
But you would need to create one file per device as /etc/systemd/network/$dev.link, so you could do

Code: Select all

for d in 0 1 2 3; do
	cat > /etc/systemd/network/eth$d.link <<- EOF
	[Match]
	MACAddress=.....:$(( 42 + d ))
	[Link]
	NamePolicy=
	Name=eth$d
	EOF
done
update-initramfs -u
And I think it should work.

It's all rather complicated, but yeah.

You would end up with devices eth0, eth1, eth2 and eth3 according to their mac address.

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Interface names

#12 Post by golinux »

chargejan wrote:I used this

1) Edit your /etc/default/grub change GRUB_CMDLINE_LINUX="" to :

GRUB_CMDLINE_LINUX="net.ifnames=0"

from
https://unix.stackexchange.com/question ... ian-jessie

And it worked, now my interfaces are eth0 and so on. I think iam happy now. Thanks guys
The new interface names are some silliness aren't they! Devuan has gotten rid of them, so no need to have to revert manually.
May the FORK be with you!

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Interface names

#13 Post by Thorny »

golinux wrote: Devuan has gotten rid of them, so no need to have to revert manually.
Well, personally I don't find them that "predictable" but don't you remember the days when sometime disks and interfaces didn't always get enumerated in the same order when there were multiples?

But forgive me if all you want to do is make another plug for Devuan, I don't mind if you do that.

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Interface names

#14 Post by golinux »

Thorny wrote:
golinux wrote: Devuan has gotten rid of them, so no need to have to revert manually.
Well, personally I don't find them that "predictable" but don't you remember the days when sometime disks and interfaces didn't always get enumerated in the same order when there were multiples?
I never had a problem using uuid or labels.
Thorny wrote:But forgive me if all you want to do is make another plug for Devuan, I don't mind if you do that.
That's a rather cynical and judgmental conclusion. You could happily substitute the name any distro that does the same thing. Users have a right to know that the madness is NOT a fait accompli in all Debian-based distros.
May the FORK be with you!

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: [OT]Interface names

#15 Post by Thorny »

[OT]
golinux wrote: That's a rather cynical and judgmental conclusion. You could happily substitute the name any distro that does the same thing. Users have a right to know that the madness is NOT a fait accompli in all Debian-based distros.
No surprise there, I am both cynical and judgmental (sic), pedantic too.

However, I was writing about the days when we used hdx terminology for designating HDDs. You know, before UUIDs.

And, I don't have a problem with using LABELS either, I can never remember UUIDs.

I did write that I didn't mind if you want to plug Devuan.

dryden
Posts: 80
Joined: 2015-02-04 08:54

Re: Interface names

#16 Post by dryden »

OpenSUSE also doesn't enable "Predictable" Interface Names by default.

These names are the worst invention in Linux thus far, after SystemD.

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Interface names

#17 Post by Thorny »

Well, I kind of like the number two way of avoiding the "predictable interface naming" shown in the link I posted.
2. You create your own manual naming scheme, for example by naming your interfaces "internet0", "dmz0" or "lan0". For that create your own .link files in /etc/systemd/network/, that choose an explicit name or a better naming scheme for one, some, or all of your interfaces. See systemd.link(5) for more information.
It is similar to the use of LABEL for drives. However it also does not happen automagically and of course wouldn't be useful for those who don't use systemd.

[edit] Yes, dryden, I am aware you mentioned that.

dryden
Posts: 80
Joined: 2015-02-04 08:54

Re: Interface names

#18 Post by dryden »

The idea of 'sorted' interface names itself is not bad, the implementation is just defunct.

There is no sensible reason why, in the booting of the system, they could not have implemented a choke point like network.target at which the 'biosdevnames' could not be enumerated into a logical list.

And if that's not possible for hot-pluggable devices like 3g modems, then use device ID strings or let the user assign a number to each device (as has of course been implemented).

It should be easy enough to have some software that lists the devices and where you can say "device "string" set number 2".

It only requires 2 commands but we don't have it.

Maybe OpenSUSE has it (with YaST) I don't know.

I mean it's so utterly simple to provide a user-friendly solution, but apparently that is not difficult enough and you can't call yourself a genius for solving such a problem; however if you make the solution utterly complex you can make a career out of solving the problems your own solutions produced.

(Lots of people in the world are employed in such systems).

Post Reply