Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] udevd tries to do weird renames of vlans
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
IVB
n00b
n00b


Joined: 23 Jul 2010
Posts: 6

PostPosted: Thu Dec 22, 2016 10:47 am    Post subject: [SOLVED] udevd tries to do weird renames of vlans Reply with quote

Hello World.

I have recently installed system with kernel sources 4.4.26-gentoo.

Here is my /etc/udev/rules.d/70-my-network.rules file:
Code:
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="60:a4:4c:60:11:00", NAME="net0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:1b:21:52:d8:48", NAME="net1"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:1b:21:52:d8:49", NAME="net2"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:1b:21:52:d8:4c", NAME="net3"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:1b:21:52:d8:4d", NAME="net4"

(I don't want to see enpXXXX network interfaces names and can't use ethX names so we decide to use netX names)

Here is my /etc/conf.d/net file:
Code:
modules="iproute2"

config_net0="null"
vlans_net0="101 103"

config_net1="null"
config_net2="null"
config_net3="null"
config_net4="null"

vlan101_name="vlan101"
config_vlan101="192.168.101.37/24"
routes_vlan101="192.168.0.0/16 via 192.168.101.1"

vlan103_name="vlan103"
config_vlan103="192.168.103.37/24"

(net1 to net4 will be bonded later, so they are all null)

I'm using the same configs from long time ago at different servers and all worked fine. Until now.

Now I have those lines in my log at system start:
Code:
Dec 22 12:30:42 bird2 [    7.639663] udevd[1815]: starting version 3.1.5
Dec 22 12:30:44 bird2 [   16.340208] udevd[1852]: Error changing net interface name vlan101 to net0: File exists
Dec 22 12:30:44 bird2 [   16.340217] udevd[1852]: could not rename interface '7' from 'vlan101' to 'net0': File exists
Dec 22 12:30:44 bird2 [   16.456223] udevd[1852]: Error changing net interface name vlan103 to net0: File exists
Dec 22 12:30:44 bird2 [   16.456232] udevd[1852]: could not rename interface '8' from 'vlan103' to 'net0': File exists


How I can exclude those renaming attempts?
I have single rule file in /etc/udev/rules.d/, which I posted above.
Where is may be my mistake (if it is my)?
Or is it mistake from developers?


Last edited by IVB on Fri Dec 23, 2016 2:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
IVB
n00b
n00b


Joined: 23 Jul 2010
Posts: 6

PostPosted: Fri Dec 23, 2016 2:03 pm    Post subject: Reply with quote

I found the answer.

Vlans are "linked" to net0, so thay have same MAC address as net0. So there are attempts to rename them to net0. Two years ago vlans was not affected by this rules - today are affected. I think that udev developers has reasons to change behavior of their program.

To exclude this weird renames - rules must contain one more element - SUBSYSTEMS=="pci". Physical device has parent (pci), vlan has no parent, so rules will affect only physical ethernet devices, not vlans.

P.S. Please exuse me my very poor english...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum