Results 1 to 9 of 9

Thread: ethernet names not consistent ubuntu server 14.04

  1. #1
    Join Date
    Aug 2013
    Beans
    6

    ethernet names not consistent ubuntu server 14.04

    I installed ubuntu server 14.04 that has 3 ethernet nics.
    The names are not consistent between boots:

    Sometimes I get this:
    # lshw -businfo -C network
    Bus info Device Class Description
    ================================================== ======
    pci@0000:02:00.0 rename4 network 82574L Gigabit Network Connection
    pci@0000:05:00.0 p2p1 network I210 Gigabit Network Connection
    pci@0000:06:00.0 p3p1 network I210 Gigabit Network Connection

    or this:
    ~# lshw -businfo -C network
    Bus info Device Class Description
    ================================================== ======
    pci@0000:02:00.0 p2p1 network 82574L Gigabit Network Connection
    pci@0000:05:00.0 p2p2 network I210 Gigabit Network Connection
    pci@0000:06:00.0 p3p1 network I210 Gigabit Network Connection

    #biosdevname -i rename4
    p2p1
    # biosdevname -i p2p1
    p2p2

    It seems to get in some circular naming, so they are never consistent.

    Changing kernel command line in /etc/default/grub:
    GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=1 biosdevname=0"
    Will get the names back to eth0, eth1, eth2,
    however I'm not sure they will be consistent either.

    How can I return to names defined by mac address?

    Wayne
    Last edited by Wayne_Shumaker; April 27th, 2014 at 02:35 AM.

  2. #2
    Join Date
    Aug 2013
    Beans
    6

    Re: ethernet names not consistent ubuntu server 14.04

    I had a typo in my original 70-persistent-net.rules.
    adding proper rule fixed problem

  3. #3
    Join Date
    Aug 2013
    Beans
    6

    Re: ethernet names not consistent ubuntu server 14.04

    If anyone crosses this thread, I still get random ethernet assignments with udev net naming, with sometimes rename4 and sometimes names get shifted. So much for the persistent naming feature of udev!

    The fix is to create your own /etc/udev/rules.d/70-persistent-net.rules and add something like the following, based on mac address, which tend to be persistent. Sometimes this file gets generated, but bugs remain so don't count on it getting it auto generated, especially if biosdevname -i <nic anme> does not give consistent results.

    SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="d8:50:e6:c2:22:d8", NAME="lan0"
    SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="d8:50:e6:c2:22:d9", NAME="lan1"
    SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="68:05:ca:19:11:ac", NAME="wan0"

    Otherwise I believe ubuntu server 14.04 udev ethernet naming is broken. After a fresh install, my network would not come up because the names were shifted from the install net names. Normally 70-persistent-net.rules is auto-generated, but that is not always the case, hence creating your own based on mac address is the safest solution if you really want "persistent" net names.

    Wayne

  4. #4
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,576
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: ethernet names not consistent ubuntu server 14.04

    Have a look at this thread.

    Things have changed, and no 70-persistent-net.rules is not auto-generated anymore.
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  5. #5
    Join Date
    Aug 2013
    Beans
    6

    Re: ethernet names not consistent ubuntu server 14.04

    I realize that 70-persistent-net.rules is not auto-generated.
    My issue seems to be with biosdevname getting confused.
    It also seems to hang the boot for some time at:

    Begin: Running /scripts/init-bottom/

    Which is hardware related. Changing the grub default as in my first post,
    GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=1 biosdevname=0"
    and creating 70-persistent-rules based on mac address
    both fixes the slow boot and gets the names consistent.

  6. #6
    Join Date
    May 2010
    Beans
    32

    Re: ethernet names not consistent ubuntu server 14.04

    grr. Super frustrating, even with adding the default grub lines, I am still getting inconsistent results with my 70-persistent-net.rules. Sometimes the names are fine, sometimes i have a 5 interface show up in "ip link show" output that is for eth0 or whatever when based on my udev rules, it should exist. Let alone a duplicate.

    Wayne,
    Are things still working fine for you?

  7. #7
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    24,322
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: ethernet names not consistent ubuntu server 14.04

    My understanding is that with no GRUB lines, the package biosdevname installed, and an edited 70-persistent-net.rules, that the interface names will bind to the MAC address and therefor persist, assuming your BIOS supports it. Please see: http://linux.dell.com/files/whitepap...g_in_linux.pdf Especially see page 8.
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D.

  8. #8
    Join Date
    May 2010
    Beans
    32

    Re: ethernet names not consistent ubuntu server 14.04

    Right, but if you are trying to rename your interface for a more uniformed usage, it than the udev rules would be used. Unfortunately those renames are not consistent.

  9. #9
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    24,322
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: ethernet names not consistent ubuntu server 14.04

    if you are trying to rename your interface for a more uniformed usage,
    With biosdevname installed, they get named something like p1p3, that is the first PCI card and the third port, as an example. Is that not uniform enough? What are you looking for?
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •