Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.hardware > #1615 > unrolled thread
| Started by | f0o <f0o@devilcode.org> |
|---|---|
| First post | 2013-02-01 13:23 +0100 |
| Last post | 2013-02-02 16:12 +0100 |
| Articles | 6 — 4 participants |
Back to article view | Back to comp.os.linux.hardware
USB Network dongle, exact copy f0o <f0o@devilcode.org> - 2013-02-01 13:23 +0100
Re: USB Network dongle, exact copy Richard Kettlewell <rjk@greenend.org.uk> - 2013-02-01 12:36 +0000
Re: USB Network dongle, exact copy Allodoxaphobia <knock_yourself_out@example.net> - 2013-02-01 15:34 +0000
Re: USB Network dongle, exact copy Richard Kettlewell <rjk@greenend.org.uk> - 2013-02-01 16:50 +0000
Re: USB Network dongle, exact copy Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2013-02-02 12:11 +0100
Re: USB Network dongle, exact copy Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2013-02-02 16:12 +0100
| From | f0o <f0o@devilcode.org> |
|---|---|
| Date | 2013-02-01 13:23 +0100 |
| Subject | USB Network dongle, exact copy |
| Message-ID | <510bb446@news.synserver.de> |
Hi, I've recently bought 2 USB wired Network dongles. Both have the same MAC, Serial & DeviceNr. Whenever I plug em in, one (the latter one on the BUS) gets to ethX and the other one to renameX. I generally dont mind this as I can rename them via iproute2 and also change thier MACs. But I cant seem to 'guess' a propper way to distinguishing them apart from an `ip link ls` and grep&tail for the last ethX aswell as for the renameX to get to them. Is there a general way to map Network-Interfaces to BUS-IDs? I'd rather rely on the procfs wich tells me where USB is plugged than those logical names for Network devices... Also if I unplug the ethX, the renameX gets instantly renamed to ethY - quite funny... After all, this is what you get for 5$ per USB-dongle... (I'm suprised that they actually work) Thanks, -- - f0o
[toc] | [next] | [standalone]
| From | Richard Kettlewell <rjk@greenend.org.uk> |
|---|---|
| Date | 2013-02-01 12:36 +0000 |
| Message-ID | <877gmsi52z.fsf@araminta.anjou.terraraq.org.uk> |
| In reply to | #1615 |
f0o <f0o@devilcode.org> writes: > I've recently bought 2 USB wired Network dongles. Both have > the same MAC, Serial & DeviceNr. What vendor? (So they can be avoided l-) -- http://www.greenend.org.uk/rjk/
[toc] | [prev] | [next] | [standalone]
| From | Allodoxaphobia <knock_yourself_out@example.net> |
|---|---|
| Date | 2013-02-01 15:34 +0000 |
| Message-ID | <slrnkgno3o.2g5k.knock_yourself_out@vps.jonz.net> |
| In reply to | #1616 |
On Fri, 01 Feb 2013 12:36:20 +0000, Richard Kettlewell wrote: > f0o <f0o@devilcode.org> writes: >> I've recently bought 2 USB wired Network dongles. Both have >> the same MAC, Serial & DeviceNr. > > What vendor? (So they can be avoided l-) Sounds like counterfeit copies!
[toc] | [prev] | [next] | [standalone]
| From | Richard Kettlewell <rjk@greenend.org.uk> |
|---|---|
| Date | 2013-02-01 16:50 +0000 |
| Message-ID | <87r4l0m11c.fsf@araminta.anjou.terraraq.org.uk> |
| In reply to | #1618 |
Allodoxaphobia <knock_yourself_out@example.net> writes: > Richard Kettlewell wrote: >> f0o <f0o@devilcode.org> writes: >>> I've recently bought 2 USB wired Network dongles. Both have >>> the same MAC, Serial & DeviceNr. >> >> What vendor? (So they can be avoided l-) > > Sounds like counterfeit copies! Manufacturer stupidty or error is a perfectly plausible explanation. It wouldn’t be the first time and probably won’t be the last. https://www.google.co.uk/search?q=%2200:50:43:00:45:3e%22 -- http://www.greenend.org.uk/rjk/
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> |
|---|---|
| Date | 2013-02-02 12:11 +0100 |
| Message-ID | <keis9c$rl0$1@saria.nerim.net> |
| In reply to | #1615 |
Hello, f0o a écrit : > > I've recently bought 2 USB wired Network dongles. Both have > the same MAC, Serial & DeviceNr. Whenever I plug em in, one > (the latter one on the BUS) gets to ethX and the other one to > renameX. > > I generally dont mind this as I can rename them via iproute2 > and also change thier MACs. But I cant seem to 'guess' a > propper way to distinguishing them apart from an `ip link ls` > and grep&tail for the last ethX aswell as for the renameX to > get to them. > > Is there a general way to map Network-Interfaces to BUS-IDs? I have done this with two PCI network interfaces on a Sun Ultra workstation, by modifying the udev rules to take the hardware path into account. One funny thing about these Sun machines is that all Sun network interfaces (HME) have the same MAC address (the openfirmware has an option to disable this feature, but that would have been less fun). So I guess it is possible with USB devices too. If you insist I will boot this station and retrieve what I did exactly.
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> |
|---|---|
| Date | 2013-02-02 16:12 +0100 |
| Message-ID | <kejaca$10cg$1@saria.nerim.net> |
| In reply to | #1621 |
Pascal Hambourg a écrit :
>
> f0o a écrit :
>> I've recently bought 2 USB wired Network dongles. Both have
>> the same MAC, Serial & DeviceNr. Whenever I plug em in, one
>> (the latter one on the BUS) gets to ethX and the other one to
>> renameX.
>>
>> I generally dont mind this as I can rename them via iproute2
>> and also change thier MACs. But I cant seem to 'guess' a
>> propper way to distinguishing them apart from an `ip link ls`
>> and grep&tail for the last ethX aswell as for the renameX to
>> get to them.
>>
>> Is there a general way to map Network-Interfaces to BUS-IDs?
>
> I have done this with two PCI network interfaces on a Sun Ultra
> workstation, by modifying the udev rules to take the hardware path into
> account. One funny thing about these Sun machines is that all Sun
> network interfaces (HME) have the same MAC address (the openfirmware has
> an option to disable this feature, but that would have been less fun).
> So I guess it is possible with USB devices too.
>
> If you insist I will boot this station and retrieve what I did exactly.
Here is what I did on a Debian 6.0 (Squeeze) system with a USB wireless
network adapter (wlan0) :
1) Plug in one USB network adapter in the first USB port.
2) Display the interface name :
# ip link
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN
qlen 1000
link/ether 00:0c:76:72:1e:91 brd ff:ff:ff:ff:ff:ff
3) Display the udev info for this interface with a bit of the first parent :
# udevadm info --path=/sys/class/net/wlan0 --attribute-walk
looking at device
'/devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/net/wlan6':
KERNEL=="wlan6"
SUBSYSTEM=="net"
DRIVER==""
ATTR{addr_len}=="6"
ATTR{dev_id}=="0x0"
ATTR{ifalias}==""
ATTR{iflink}=="14"
ATTR{ifindex}=="14"
ATTR{features}=="0x2000"
ATTR{type}=="1"
ATTR{link_mode}=="0"
ATTR{address}=="00:0c:76:72:1e:91"
ATTR{broadcast}=="ff:ff:ff:ff:ff:ff"
ATTR{operstate}=="down"
ATTR{mtu}=="1500"
ATTR{flags}=="0x1002"
ATTR{tx_queue_len}=="1000"
looking at parent device
'/devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0':
KERNELS=="1-6:1.0"
SUBSYSTEMS=="usb"
4) Write down the KERNELS== value which depends on the USB port the
adapter is plugged into. Then plug the adapter in the second USB port
and write down the new KERNELS== value.
5) Edit /etc/udev/rules.d/70-persistent-net.rules and find the rule
related to the USB network adapter based on its MAC address and
interface name (this is all one line) :
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:0c:76:72:1e:91", ATTR{dev_id}=="0x0",
ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
6) Change the NAME= and add the KERNELS== value for the first USB port :
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:0c:76:72:1e:91", ATTR{dev_id}=="0x0",
ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan6", KERNELS=="1-6:1.0"
7) Duplicate the rule and modify the NAME and KERNELS values for the
second USB port :
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:0c:76:72:1e:91", ATTR{dev_id}=="0x0",
ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan5", KERNELS=="1-5:1.0"
8) Save the file and check that the rules work by plugging the adapter
in each port and displaying the interface names.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.os.linux.hardware
csiph-web