Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm testing some network setups, and bought two dirt-cheap USB network interfaces. My plan was to attach these two to an embedded device (sheevaplug) and mess with firewall setups.
However, the two interfaces are absolutely identical; they have the same MAC, and lsusb -v is the same for both, line by line (except for device number, which tells the order the devices are plugged in, I believe?). Also, this is a single usb bus (single port, with a hub).
Now, obviously I can't make much of a firewall setup if I can't tell the interfaces apart... I realize I probably hit a brick wall, but does anyone have thoughts on this?
lsusb -v may give the same vendor and product IDs for the devices, but I highly doubt that the MAC addresses are the same. Could you confirm this by giving the output of ifconfig -a?
[44481.858302] usb 1-1.4: reset high speed USB device using orion-ehci and address 5
[50322.477299] usb 1-1.3: new full speed USB device using orion-ehci and address 12
[50322.592536] usb 1-1.3: New USB device found, idVendor=0a46, idProduct=9601
[50322.599741] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[50322.607107] usb 1-1.3: Product: DM9601 USB NIC
[50322.612576] usb 1-1.3: Manufacturer: DM9601 USB NIC
[50322.617676] usb 1-1.3: SerialNumber: 9601
[50322.624174] usb 1-1.3: configuration #1 chosen from 1 choice
[50322.638516] eth2: register 'dm9601' at usb-orion-ehci.0-1.3, Davicom DM9601 USB Ethernet, 00:60:6e:00:f1:7d
[50323.415383] udev[25703]: renamed network interface eth2 to eth2-eth1
eth0 is "onboard"; I'm sucessfully using one usb interface at eth1. These are ifconfig -a and dmesg outputs just after I plug the second usb interface. udev even tries to assign the same name to them, and then renames the second to eth2-eth1.
Distribution: CentOS, RHEL, Fedora, Debian, Ubuntu, LinuxMint, Kali Linux, Raspbian
Posts: 166
Rep:
Did you copy eth1 config file and change IP Address ? If you did it then remove MAC address from eth2 file first and restart network services. If still problem persist then Change MAC address manually by ifconfig command.
Did you copy eth1 config file and change IP Address ?
Sorry, didn't quite catch that. By 'eth1' config file you mean /etc/network/interfaces? I have no mention of the usb interfaces there yet.
Or you meant udev rules? I have only one file, rules.d/70-persistent-net.rules, which I pasted here, and the rules were written by the system. Should I have a file for each interface? (I'm sorry, I don't have much knowledge about udev)
I could change the MAC by "ifconfig ethX hw ether Y:Y:Y:Y:Y:Y", but I wanted this change to persist across reboots/usb plugging. And since there's no reliable way to tell the devices apart without physical intervention, I can't see how one could automate that?
--EDIT--
Hm, maybe I could change the mac by identifying the network the interface is plugged on?... Like, put the interface up, do DHCP (or other test), and change the MAC according to the results?
That sounds really.. hacky, but it's worth a try if nothing else does the trick.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.