You are not logged in.

#1 2015-09-27 20:31:02

aniap
Member
Registered: 2013-08-11
Posts: 4

[Solved] Predictable Network Interface changes interface names

Background: When I first installed Arch I came across the enp6s5 interface instead of eth0 that I was used to but I just adjusted myself. Recently I have done some changes outside Arch -- changed several bios settings, attached new hard drive to the motherboard, installed Windows on it.

Main problem: The interface name is not always the same at boot. It happened to be enp6s5, enp3s5 and enp2s5. I need to manually check the interface name every time.

My attempts: I was looking for a way to just go back to eth0 and have found this page. The page convinced me that this interface naming actually makes sense and that I want to stay with it. However, I didn't find how to fix my problem while staying with this naming scheme.

Googling and searching forum didn't reveal anyone with similar problem before. I don't even know where (in my system) to look for information what is happening. Does anyone have any idea what can I check? Your help will be appreciated much.

Last edited by aniap (2015-09-27 21:37:00)

Offline

#2 2015-09-27 20:39:23

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Predictable Network Interface changes interface names


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-09-27 20:42:28

aniap
Member
Registered: 2013-08-11
Posts: 4

Re: [Solved] Predictable Network Interface changes interface names

How is it supposed to help me? I want to stay with the Predictable Network Interface Names scheme but want to make it predictable, as it isn't now.

Offline

#4 2015-09-27 20:43:26

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Predictable Network Interface changes interface names

Did you read the link? It tells you how to set predicatble names...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2015-09-27 20:44:03

Atsuri
Member
Registered: 2015-09-27
Posts: 3

Re: [Solved] Predictable Network Interface changes interface names

Personally, I only saw this renaming of network interfaces in 2 cases:
1. When switching from a kernel driver module to its proprietary counterpart (b43 -> wl for broadcom 43xx chips).
2. With a dynamic network name and/or IP.

Hope this is somewhat helpful.

Offline

#6 2015-09-27 20:50:46

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [Solved] Predictable Network Interface changes interface names

I use in /etc/udev/rules.d/10-local.rules

SUBSYSTEM=="net", ATTR{address}=="05:a1:d8:cb:c5:18", NAME:="eth0"

Show MAC address (must be lower-case in udev rule) with:

ip link

Beware the usual gotchas:

The filename contains 10 so that it runs *before* other rules which may try to set the name. The first rule to do so, wins.

After editing rules - to make the changes take effect, run:

udevadm control --reload

This works in eudev - should still work in bleeding-edge udev-within-systemd, AFAIK.

Edit: Hmm, why doesn't wiki use NAME:= (i.e. with a colon, to make attempts at changing the NAME by other udev rules ineffective)?

Last edited by brebs (2015-09-27 20:55:17)

Offline

#7 2015-09-27 20:53:01

aniap
Member
Registered: 2013-08-11
Posts: 4

Re: [Solved] Predictable Network Interface changes interface names

I have the predictable names by default and I want to stay with that. The problem is that for whatever reason my computer finds the network card in different location almost every boot. If I understand correctly the naming scheme, it's been on bus no. 2, 3 or 6 so far.

@Atsuri: I don't think I changed any kernel module recently and the interface is being renamed on almost every boot. But I'll look into this. Thanks.

Offline

#8 2015-09-27 20:56:11

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [Solved] Predictable Network Interface changes interface names

aniap - Look at the udev rule - it assigns by MAC address - the particular bus is irrelevant.

Edit: Note the NAME= vs NAME:= confusion/mistake - I assume this is a mistake in the wiki.

Last edited by brebs (2015-09-27 20:57:12)

Offline

#9 2015-09-27 20:56:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Predictable Network Interface changes interface names

You have to set the names using your mac address: that is how you make them predictable.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2015-09-27 21:21:58

aniap
Member
Registered: 2013-08-11
Posts: 4

Re: [Solved] Predictable Network Interface changes interface names

Thanks, setting the rule for the mac address worked.

@Jasonwryan: I'm sorry I didn't understand what you meant. You linked me to the part that contained the freedesktop link I already posted and the way to disable predictable names. I assumed I wasn't clear in the original post that I ditched the idea to disable it.

I hoped to stay with the default rules, since it makes me feel that everything is under control of the system, without human ingerence. I am still curious what caused my network card jump between physical locations according to udev, but I'll stop digging as I don't have time to fix things that are already working.

Offline

#11 2015-09-27 21:25:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Predictable Network Interface changes interface names

That section is to enable predictable naming (via udev rules), not disable it...


Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB