I have the following in /etc/udev/rules.d/70-persistent-net.rules

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="d0:50:99:50:43:17", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="d0:50:99:50:43:18", KERNEL=="eth*", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="68:05:ca:1a:ce:9d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

However, on boot, udev hate me. Why?

dmesg snips:

[   13.328778] e1000e 0000:01:00.0 eth0: registered PHC clock
[   13.328781] e1000e 0000:01:00.0 eth0: (PCI Express:2.5GT/s:Width x1) 68:05:ca:1a:ce:9d
[   13.328783] e1000e 0000:01:00.0 eth0: Intel(R) PRO/1000 Network Connection
[   13.970303] igb 0000:07:00.0: Intel(R) Gigabit Ethernet Network Connection
[   13.970305] igb 0000:07:00.0: eth1: (PCIe:2.5Gb/s:Width x1) d0:50:99:50:43:17
[   13.970434] igb 0000:07:00.0: eth1: PBA No: 001300-000
[   14.013474] igb 0000:08:00.0: Intel(R) Gigabit Ethernet Network Connection
[   14.013476] igb 0000:08:00.0: eth2: (PCIe:2.5Gb/s:Width x1) d0:50:99:50:43:18
[   14.013603] igb 0000:08:00.0: eth2: PBA No: 001300-000
[   16.274874] systemd-udevd[155]: renamed network interface eth2 to p121p1
[   16.847244] systemd-udevd[160]: renamed network interface eth1 to p119p1
[   19.425858] systemd-udevd[607]: renamed network interface eth0 to eth2

How come the third works but the first two don't?

share|improve this question
1  
It appears to be a bug: bugs.launchpad.net/ubuntu/+source/biosdevname/+bug/1284043 – chili555 Feb 26 '15 at 0:17
    
Just saw the notes here: wiki.debian.org/Bonding about UDEV. I'm going to try and rename by PCI address and see if that helps. – Jonathan S. Fisher Feb 26 '15 at 19:40
    
Nope that didn't work either... – Jonathan S. Fisher Feb 26 '15 at 20:10
1  
Actually I did get it to work eventually with PCI address ID. You have to put this in etc/default/grub: GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 net.ifnames=1 biosdevname=0" – Jonathan S. Fisher Apr 7 '15 at 19:37
up vote 5 down vote accepted

Actually I did get it to work eventually with PCI address ID. Two things, you have to:

  1. Put/edit this in etc/default/grub:

    GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=1 biosdevname=0
    

    then do a sudo update-grub

  2. Put your desired names into /etc/udev/rules.d/70-persistent-net.rules, like this:

    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNELS=="0000:03:00.0", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
    

    Where 0000:03:00.0 is your PCI address you located in your dmesg output.

Note: No need to disable IPV6, I forgot that flag was in there. We just don't use it, so we disable it for safety.

share|improve this answer
  1. Append this to /etc/default/grub:

    GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0"
    
  2. Update bootloader :

    sudo update-grub
    
  3. Reboot!

    reboot
    

Tested on ubuntu 15.10

share|improve this answer
    
the OP already posted the answer in a comment... also, an accepted answer is already here. – cmks Apr 5 '16 at 0:40
    
you wrong I did it and if you don't set net.ifnames=0 kernel will rename the interfaces. I don't really know maybe on other version it differ. – MSS Apr 5 '16 at 8:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.