Bug 700933 - official way to determine the name of the ethernet device
Summary: official way to determine the name of the ethernet device
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: biosdevname
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Narendra K
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-29 20:03 UTC by Andrew McNabb
Modified: 2015-02-17 13:44 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 13:44:05 UTC
Type: ---


Attachments (Terms of Use)
rename-eth-configs.sh (2.26 KB, text/plain)
2011-11-04 05:33 UTC, Charles Rose
no flags Details
rename-eth-configs.sh (2.31 KB, text/plain)
2011-11-04 05:37 UTC, Charles Rose
no flags Details

Description Andrew McNabb 2011-04-29 20:03:15 UTC
Now that the Consistent Network Device Naming feature is here, it would be nice to have an official way to determine the name of the ethernet device for single-nic systems.  It would be very, very helpful if this were documented in the Fedora 15 release notes.

We have a kickstart postinstall script that sets some network options in /etc/sysconfig/network-scripts/ifcfg-eth0.  Obviously the postinstall script doesn't work anymore, and there does not seem to be an obvious way to get the name of the NIC.  This would need to work within a kickstart script, and it would need to exclude bridge, loopback, tun/tap, or any other non-physical NICs that might possibly be in place.  I couldn't come up with anything other than something unacceptable like "ifconfig -a |egrep '^[a-z]' | cut -d' ' -f1 |egrep -v 'lo|wlan|tun|br'" (this is awkward and brittle).

Comment 1 Fedora Admin XMLRPC Client 2011-05-02 15:57:36 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Terje Røsten 2011-07-02 12:12:46 UTC
Why not pass  

biosdevname=0 

to kernel and use eth0 as before?

Comment 3 Andrew McNabb 2011-07-02 16:06:04 UTC
(In reply to comment #2)
> Why not pass  
> 
> biosdevname=0 
> 
> to kernel and use eth0 as before?

That's the workaround that I'm doing for now, but it doesn't work nearly as well for a machine that's already installed and already has names for its devices.

Comment 4 Andrew McNabb 2011-11-03 17:23:16 UTC
I've still been using biosdevname=0, but I'm wondering if there's a more permanent solution.

Comment 5 Charles Rose 2011-11-04 05:33:58 UTC
Created attachment 531698 [details]
rename-eth-configs.sh

Andrew, I had to write this up to solve an issue with some kickstart installs that were creating ifcfg-ethN files during post-install. I just inserted this script after the creation/modification of these files. The script works only if there is a HWADDR field in the ifcfg-ethN file and not otherwise. I have not tried this on many systems and definitely not with bridge/tun interfaces.

Let me know if this helps.

Comment 6 Charles Rose 2011-11-04 05:37:20 UTC
Created attachment 531699 [details]
rename-eth-configs.sh

Comment 7 Andrew McNabb 2011-11-22 19:37:59 UTC
Between biosdevname and persistent-net-rules, I'm about to go crazy. Anyway, my best hack so far to identify the primary interface is:

ip route |grep ^default |egrep -o 'dev \w*' |cut -f2 -d' '

This finds the interface associated with the default route. It only works if networking is currently working.

Comment 8 Bob Gustafson 2012-01-20 16:17:49 UTC
In Fedora 16, the Gnome System Settings->Network calls it 'Wired'..

Also, the Firewall Configuration->Interfaces is looking for eth+ names..

Also, netstat -rn calls it 'em1'

------

Would be good to have some consistency, from Anaconda on into a running system.

Comment 9 Fedora End Of Life 2013-01-16 16:05:49 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Fedora End Of Life 2013-04-03 16:28:23 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 11 Andrew McNabb 2013-07-16 18:00:07 UTC
In Fedora 19, this is all the more serious, since setting `biosdevname=0` doesn't work anymore.

Comment 12 Narendra K 2013-07-17 20:07:53 UTC
(In reply to Andrew McNabb from comment #11)
> In Fedora 19, this is all the more serious, since setting `biosdevname=0`
> doesn't work anymore.

Hi, could you please share the output from cat /proc/cmdline ?

Comment 13 Andrew McNabb 2013-07-17 20:38:24 UTC
(In reply to Narendra K from comment #12)
> (In reply to Andrew McNabb from comment #11)
> > In Fedora 19, this is all the more serious, since setting `biosdevname=0`
> > doesn't work anymore.
> 
> Hi, could you please share the output from cat /proc/cmdline ?

BOOT_IMAGE=/vmlinuz-3.9.9-302.fc19.x86_64 root=UUID=962d65c6-df88-49ef-98ce-62b144fec414 ro rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 consoleblank=0 biosdevname=0

I was eventually able to override the udev rules with "ln -sf /dev/null /etc/udev/rules.d/80-net-name-slot.rules" to disable renaming in Fedora 19.

But I would much rather have a command that just returns a list of ethernet interfaces so I wouldn't have to find a new way to disable renaming for every single Fedora release.

Comment 14 Fedora End Of Life 2015-01-09 16:39:07 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 15 Fedora End Of Life 2015-02-17 13:44:05 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.