Fedora 16 ethernet port naming "secrets" p1* to eth*
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2010
    Location
    Buellton California USA
    Posts
    15

    Fedora 16 ethernet port naming "secrets" p1* to eth*

    I wanted to share how to force a system running fc14 to fc16 and hopefully later can be made
    to use eth0 eth1 eth2 etc.. rather than the pci hardware probe names.

    1.) Edit lib/udev/rules.d/71-biosdevname.rules
    Change
    --- This is around line 26 comment out the the first program statement and
    --- Define the program statement as shown.
    # using NAME= instead of setting INTERFACE_NAME, so that persistent
    # names aren't generated for these devices, they are "named" on each boot.
    #PROGRAM="/sbin/biosdevname --policy physical -i %k", NAME="%c", OPTIONS+="string_escape=replace"
    PROGRAM="/sbin/biosdevname --policy=all_ethN -i %k", ENV{INTERFACE_NAME}="%c"

    LABEL="netdevicename_end"

    2.) Reboot by making the change to the 71-biosdevname.rules a file will be written
    /etc/udev/rules.d/70-persistent-net.rules.
    if you have more than one Ethernet port you will want look at the this file and see if the
    mac address of then Ethernet port matches what you want the eth* naming you want.
    In my case I have 3 ports on my system. I wanted to built in port to be eth0 and the Intel card to
    be eth1 and eth2. The ATTR{address}== is the MAC address or hardware address
    for the port. Note these are single line entries follow the instruction in the file.

    # PCI device 0x10ec:0x8168 (r8169) (custom name provided by external tool)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="80:ee:73:12:6c:38", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

    # PCI device 0x8086:0x10c9 (igb) (custom name provided by external tool)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="90:e2:ba:02:25:71", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

    # PCI device 0x8086:0x10c9 (igb) (custom name provided by external tool)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="90:e2:ba:02:25:70", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

    After you have rebooted after the changes in 1 and 2 you will want to go to the ifcfg-<namesYou-didnotwant>
    in
    [root@netserver02 ~]# ls -l /etc/sysconfig/network-scripts/ifcfg-*
    -rw-r--r--. 1 root root 427 Mar 4 18:02 /etc/sysconfig/network-scripts/ifcfg-eth0
    -rw-r--r--. 1 root root 368 Mar 4 18:02 /etc/sysconfig/network-scripts/ifcfg-eth1
    -rw-r--r--. 1 root root 405 Mar 4 18:03 /etc/sysconfig/network-scripts/ifcfg-eth2
    Edit each one of the ifcfg-eth* files and change
    the NAME and DEVICE field to correct eth0 eth1 and eth2
    NAME="eth0"
    DEVICE=eth0

    3.) Reboot now the network manager will match the the changes you have made.

    The best reference that help me was it seems to be a little out of date but was helpful.
    linux.dell.com/files/whitepapers/nic-enum-whitepaper-v4.pdf
    Also there are references to script that will make the changes for you. Although they did
    not work for me.


    [/SIZE]
    Last edited by leigh123linux; 5th March 2012 at 09:25 AM. Reason: fonts reduced to normal size.

  2. #2
    Join Date
    Jul 2012
    Location
    Lancaster, MA
    Posts
    5

    Re: Fedora 16 ethernet port naming "secrets" p1* to eth*

    Any idea how to do this on Fedora 17 ???

    Did a fresh install and there's no 70persistent-net.rules file.
    Setting biosdevname=0 on kernel cmdline yields ethX devices like you want, but then there's no 70persistent-net.rules file to the user can use a MAC address to force a particular ethX which is what I'd like to do.

    My thread about the woes I'm having with F17 is here:

    http://forums.fedoraforum.org/showthread.php?p=1590122

    Any info appreciated.

  3. #3
    Join Date
    Jan 2010
    Posts
    7,364

    Re: Fedora 16 ethernet port naming "secrets" p1* to eth*

    I do a minimal install and don't even put the biosdevname in, because when I have done so in the past, it sometimes created something that it wanted to use called wired_1, or similar.

    Once installed, I edit /etc/sysconfig/network-scripts/ifcfg-whatever.

    I change the whatever to eth0
    I rename the file from ifcfg-whatever to ifcfg-eth0

    I remove biosdevname

    rpm -e biosdevname

    Reboot, and all should be well.

  4. #4
    Join Date
    Jul 2012
    Location
    Lancaster, MA
    Posts
    5

    Re: Fedora 16 ethernet port naming "secrets" p1* to eth*

    That's a great tip -- thanks for sharing.

    I solved my problem and if you look at my other thread listed above, you'll see my solution.
    I'm going to go updated that thread now with what I did to take care of my concerns with my Fedora 17 install w/ 6 x enet interfaces!

  5. #5
    Join Date
    Dec 2010
    Location
    Buellton California USA
    Posts
    15

    Re: Fedora 16 ethernet port naming "secrets" p1* to eth*

    I like this solution looks very simple. You just removed the biosdevname package
    and the system still works afterwords.
    Quote Originally Posted by smr54
    I do a minimal install and don't even put the biosdevname in, because when I have done so in the past, it sometimes created something that it wanted to use called wired_1, or similar.

    Once installed, I edit /etc/sysconfig/network-scripts/ifcfg-whatever.

    I change the whatever to eth0
    I rename the file from ifcfg-whatever to ifcfg-eth0

    I remove biosdevname

    rpm -e biosdevname

    Reboot, and all should be well.

  6. #6
    Join Date
    Jan 2010
    Posts
    7,364

    Re: Fedora 16 ethernet port naming "secrets" p1* to eth*

    That is correct. It required a reboot, though I didn't try hard to avoid said reboot.

Similar Threads

  1. Replies: 3
    Last Post: 8th October 2010, 06:00 AM
  2. Network manager "no valid vpn secrets" error
    By daviddoria in forum Using Fedora
    Replies: 1
    Last Post: 17th July 2009, 09:06 PM
  3. Replies: 3
    Last Post: 14th September 2008, 01:08 AM
  4. Replies: 3
    Last Post: 16th December 2007, 10:35 PM
  5. does fedora support "VIA Rhine II Fast Ethernet Adapter" ?
    By legolas_w in forum Hardware & Laptops
    Replies: 3
    Last Post: 28th October 2006, 12:26 AM

Tags for this Thread

Posting Permissions

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