Interface names

New to Debian (Or Linux in general)? Ask your questions here!

Interface names

Postby chargejan » 2018-02-07 10:24

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.
chargejan
 
Posts: 5
Joined: 2018-02-07 10:15

Re: Interface names

Postby Thorny » 2018-02-07 10:38

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?
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: Interface names

Postby chargejan » 2018-02-07 11:00

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.
chargejan
 
Posts: 5
Joined: 2018-02-07 10:15

Re: Interface names

Postby bw123 » 2018-02-07 11:33


baffled why my interfaces are named "rename2" etc. by default,

Researching the hardware will probably be helpful. Some type of virtual nic arrangement?
User avatar
bw123
 
Posts: 3532
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Interface names

Postby chargejan » 2018-02-07 12:54

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 :))
chargejan
 
Posts: 5
Joined: 2018-02-07 10:15

Re: Interface names

Postby debiman » 2018-02-07 18:25

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
debiman
 
Posts: 3027
Joined: 2013-03-12 07:18

Re: Interface names

Postby Head_on_a_Stick » 2018-02-07 19:27

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.
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8180
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Interface names

Postby chargejan » 2018-02-08 11:57

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
chargejan
 
Posts: 5
Joined: 2018-02-07 10:15

Re: Interface names

Postby Thorny » 2018-02-08 12:40

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.
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: Interface names

Postby chargejan » 2018-02-08 13:20

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
chargejan
 
Posts: 5
Joined: 2018-02-07 10:15

Re: Interface names

Postby dryden » 2018-02-09 14:28

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.
dryden
 
Posts: 80
Joined: 2015-02-04 08:54

Re: Interface names

Postby golinux » 2018-02-09 17:16

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
golinux
 
Posts: 1387
Joined: 2010-12-09 00:56
Location: not a 'buntard!

Re: Interface names

Postby Thorny » 2018-02-09 17:55

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
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: Interface names

Postby golinux » 2018-02-09 20:06

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
golinux
 
Posts: 1387
Joined: 2010-12-09 00:56
Location: not a 'buntard!

Re: [OT]Interface names

Postby Thorny » 2018-02-09 21:15

[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.
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable
cron