Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44044 - if dhcpcd fails, ifconfig only reports, lo even when eth0 detected. ifconfig eth0 reports eth0 h/w address etc. OK. after dhcpcd works, then ifconfig reports lo and eth0. Looks like ifconfig requires that the interface have a valid IP address to make ...
Summary: if dhcpcd fails, ifconfig only reports, lo even when eth0 detected. ifconfig ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Everything (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-08 09:29 UTC by Greg Morse
Modified: 2004-03-09 04:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Morse 2004-03-08 09:29:32 UTC
an ethernet interface with no IP address assigned, will not show up when you type ifconfig with no arguments. The docs imply that in this case your hardware was not detected. But ifconfig eth0 (argument supplied) gives details about the interface including its MAC address. 
You have to know the ethernet card exists and its name, before you can ifconfig it. poor.

Reproducible: Always
Steps to Reproduce:
1. load the eth0 driver module eg tulip. (insmod tulip)
2. do ifconfig. eth0 does not show up. Do ifconfig eth0, now it reports the h/w mac address
3. do dhcpcd eth0. Now do ifconfig (no arguments) and eth0 shows up.
This is a bug because the docs imply that if eth0 does not show up when you type ifconfig, then your hardware has not been detected.

Actual Results:  
eth0 not in the list of net interfaces.

Expected Results:  
eth0 should show up in the list with no IP address assigned.
Comment 1 Benjamin Judas (RETIRED) gentoo-dev 2004-03-08 12:19:26 UTC
That behaviour is normal for ifconfig. But you are right, it maybe should be mentioned in the docs.

swift, I didn't know the alias for documentation, so I put you in ;) Can you keep track of it ? 
Comment 2 Sven Vermeulen (RETIRED) gentoo-dev 2004-03-09 04:14:27 UTC
I'm afraid you misread the docs. The first time we run "ifconfig" is to see if there is a network configured (not NIC, but really network). So if "ifconfig" doesn't show anything, there is no working network connection.

The second time ifconfig is used is to check if the hardware is found. In this case we already ask the user to provide his network card (like "eth0"):

"""
To check if your network card is now detected, use ifconfig. A detected network card would result in something like this:

Code Listing 13: Testing availability of your network card, successful

# ifconfig eth0
(output snipped)

If however you receive the following error, the network card is not detected:

Code Listing 14: Testing availability of your network card, failed

# ifconfig eth0
eth0: error fetching interface information: Device not found
"""

I am going to change Code Listing 4 from

"""
Code Listing 4: /sbin/ifconfig for a working network card
"""

to read

"""
Code Listing 4: /sbin/ifconfig for a working network configuration
"""

I think this is the only thing that could have confused you; marking this as FIXED.
Comment 3 Greg Morse 2011-03-07 00:06:49 UTC
The original summary for this bug was longer than 255 characters, and so it was truncated when Bugzilla was upgraded. The original summary was:

if dhcpcd fails, ifconfig only reports, lo even when eth0 detected. ifconfig eth0 reports eth0 h/w address etc. OK. after dhcpcd works, then ifconfig reports lo and eth0. Looks like ifconfig  requires that the interface have a valid IP address to make the default list.