9

I have multiple USB to ethernet devices which are plugged to the same pc.

Is there a way to identify which one is mapped to which eth* network interface via usb port/etc ?

I have tried looking in lsusb and /proc, but haven't found anything useful.

0

3 Answers 3

10

The mapping between interface names and devices can be seen in /sys/class/net/

Example:

$ ls -la /sys/class/net
total 0
drwxr-xr-x  2 root root 0 Oct 29 12:49 .
drwxr-xr-x 56 root root 0 Oct 29 12:49 ..
lrwxrwxrwx  1 root root 0 Oct 29 12:49 eth0 -> ../../devices/pci0000:00/0000:00:19.0/net/eth0
lrwxrwxrwx  1 root root 0 Oct 29 12:49 lo -> ../../devices/virtual/net/lo

My eth0 is on a PCI bus, device 0x19, as the symbolic link reveals.

0

If your system uses udev for device management, you can use the following to get device IDs:

grep -i eth /var/log/udev

Provided your OS stores the udev activity log there; adjust when necessary.

1
  • Only eth0 is there (the pci network interface, non of the usb are there), so it doens't help.
    – user62167
    Jul 12, 2012 at 13:35
-1

You could unplug it and plug it back in, then check the latest messages in dmesg.

1
  • This would work, but its not an option.
    – user62167
    Jul 12, 2012 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .