0

I try to connect to several physically divided Networks with different net-masks. Because I often need to connect to more than one simultaneously I want to setup and leave one Ethernet adapter with every Network/Eth-Cable.

Windows seems to treat these ThinkPad USB-Ethernet adapters the same device.

The first one connected gets the first IP Settings, and the second one gets the second set. The second adapter just gets a #2 added to its Device ID.

Picture of Adapter settings of the two Network Adapters

So now when connecting them I have to check and swap Ethernet cables.

Is there a way to make them uniquely identifiable for windows so every adapter gets the right set of IP Masks?

EDIT: It seems like the first connected Device always gets the UID 000001000000. This leads to windows not noticing (or ignoring) that it is an adapter with a different MAC-Adress.

4
  • Check in Device Manager (or any other suitable tool like UsbTreeView): Do both adapter have the same USB serial number? Commented Mar 8, 2023 at 16:44
  • Why do you have multiple Ethernet adapters? If you don’t need them, you can uninstall the drivers for one from the device manager I think. Commented Mar 8, 2023 at 16:55
  • Thank you @SeñorCMasMas, the reference was really good! I am wondering how the UIDs can be kept even after reboots but not when un and replugged. In the age of Laptops and USB C docks it feels like this does need an overhaul Commented Mar 8, 2023 at 19:52
  • UPDATE: Thanks for your Input! Your first instinct was right @DanielB ! It seems like the first connected Device always gets the UID 000001000000 After that, the assigned UIDs are recurrent but not always assigned to the same adapters. It's really strange since every Device has a unique S/N and MAC-Adress even printed on the adapters themselves. Commented Mar 8, 2023 at 19:53

2 Answers 2

1

Looks like Windows drivers behave exactly like this.

When faced with devices running with the same driver, it enumerates them at the bus (be it USB or PCI) and assigns their Device IDs accordingly.

Unlike PCI, where enumeration goes along the physical connections of the bus, in USB it goes in the order of insertion.

If you happen to start a machine with USB devices already plugged, they will likely be enumerated in the bus order (with some caveats, because devices are not always quick enough to respond to the call "who's there").

I am not aware of any strategy to make Windows behave differently.

It is unlikely that one exists because at the point when OS enumerates the devices, their drivers are not started and the OS has no way to know subtleties like MAC address.

If this will make you happier, Linux does exactly the same, because this is the proper thing to do in a plug and play context.

On the other hand, most Linux distributions have an extensive infrastructure for renaming network devices according to some custom rules with MAC address as a possible and frequently used criteria.

This happens before assigning the IP addresses so in Linux one usually gets consistent behavior in situations like yours even with the default settings.

If you really want to mimmic this in Windows, renaming the devices is possible but won't do because it is not the name what is linked to the IP address. But you can still create a script (CMD or Powershell) that uses netsh.exe to assign IP addresses depending on the network adapter MAC address.

It will be quirky, I promise you, but could be made to work.

0

Making Windows ignoring the USB serial number should solve the problem. The the used USB port decides which device is which. Right-click one of the devices in UsbTreeView -> Regedit... The second item should be one containing \UsbFlags, select it, Regedit opens. Here create a BINARY value named IgnoreHWSerNum with the value 01.

For both next time attached or Windows restarted a new device instance will be created but then you are done.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.