>>>>  My laptop's
>>>> r8169 eth0 appears under ifconfig even when there's no ethernet cable
>>>> attached.  That's the expected behavior isn't it?
>>>
>>> Sure; ifconfig will even tell you if the link is up or down. Just
>>> because the link is down doesn't mean the interface isn't there. :)
>>
>> I see eth0 under ifconfig on my laptop but not on my desktop.
>> Strangely, on my desktop eth0 does appear under iwconfig (no wireless
>> extensions).  dmesg pertaining to eth0 and r8169 looks normal.  lspci
>> -v says:
>>
>> Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI
>> Express Gigabit Ethernet controller
>> ...
>> Kernel driver in use: r8169
>>
>> But no eth0 under ifconfig.
>
> Time to go for a walk in /sys, to find out more information.
>
> Check out /sys/bus/pci/devices
>
> Now, with lspci, a NIC will look something like this:
> 01:08.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
> RTL-8139/8139C/8139C+ (rev 10)
>
> If I look under /sys/bus/pci/devices, I'll see a corresponding
> directory (compare the first column from the lspci output):
> 0000:01:08.0

I have:

# lspci
...
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

# ls /sys/bus/pci/devices
0000:00:00.0  0000:00:0a.0  0000:00:13.0  0000:00:14.3  0000:00:15.1
0000:00:18.1  0000:01:05.0  0000:04:00.0
0000:00:01.0  0000:00:11.0  0000:00:13.2  0000:00:14.4  0000:00:16.0
0000:00:18.2  0000:01:05.1
0000:00:04.0  0000:00:12.0  0000:00:14.0  0000:00:14.5  0000:00:16.2
0000:00:18.3  0000:02:00.0
0000:00:09.0  0000:00:12.2  0000:00:14.1  0000:00:15.0  0000:00:18.0
0000:00:18.4  0000:03:00.0

# ls /sys/bus/pci/devices/0000:04:00.0
broken_parity_status      device         irq            msi_bus  reset
     resource2_wc  subsystem_device  vpd
class                     dma_mask_bits  local_cpulist  net
resource   resource4     subsystem_vendor
config                    driver         local_cpus     remove
resource0  resource4_wc  uevent
consistent_dma_mask_bits  enable         modalias       rescan
resource2  subsystem     vendor

So I guess I'm missing net:eth0 in that last one?

It's a nearly brand new motherboard:

http://www.newegg.com/Product/Product.aspx?Item=N82E16813128490

Maybe the r8169 driver hasn't caught up?

- Grant


> If I run 'ls' in that directory, I see:
>
> -rw-r--r-- 1 root root 4096 2011-08-01 15:19 broken_parity_status
> lrwxrwxrwx 1 root root    0 2011-08-01 15:19 bus -> ../../../../bus/pci
> -r--r--r-- 1 root root 4096 2011-08-01 15:11 class
> -rw-r--r-- 1 root root  256 2011-08-01 15:11 config
> -r--r--r-- 1 root root 4096 2011-08-01 15:11 device
> lrwxrwxrwx 1 root root    0 2011-08-01 15:11 driver ->
> ../../../../bus/pci/drivers/8139too
> -rw------- 1 root root 4096 2011-08-01 15:19 enable
> -r--r--r-- 1 root root 4096 2011-08-01 15:11 irq
> -r--r--r-- 1 root root 4096 2011-08-01 15:19 local_cpus
> -r--r--r-- 1 root root 4096 2011-08-01 15:19 modalias
> -rw-r--r-- 1 root root 4096 2011-08-01 15:19 msi_bus
> lrwxrwxrwx 1 root root    0 2011-08-01 15:19 net:eth2 ->
> ../../../../class/net/eth2
> drwxr-xr-x 2 root root    0 2011-05-12 10:47 power
> -r--r--r-- 1 root root 4096 2011-08-01 15:11 resource
> -rw------- 1 root root  256 2011-08-01 15:19 resource0
> -rw------- 1 root root  256 2011-08-01 15:19 resource1
> lrwxrwxrwx 1 root root    0 2011-08-01 15:19 subsystem -> ../../../../bus/pci
> -r--r--r-- 1 root root 4096 2011-08-01 15:19 subsystem_device
> -r--r--r-- 1 root root 4096 2011-08-01 15:19 subsystem_vendor
> -rw-r--r-- 1 root root 4096 2011-08-01 15:19 uevent
> -r--r--r-- 1 root root 4096 2011-08-01 15:11 vendor
>
>
> So, you an see a file named 'net:eth2', so I expect it would show up
> as eth2, absent any udev renaming or aliasing rules.
>
> --
> :wq

Reply via email to