sking
sking

Reputation: 1

(Identical hardware ids)Programmatically create/destroy network bridges with .NET on Windows 7

It seems Bridgeutil_1.0 is a great tool, simple and easy, but my problem is the there are two network adapters with same hardware ID and I happened to have to attach them together, how could I do it?

I used command like:

bridgeutil /attach "PCI\VEN_8086&DEV_10D3&SUBSYS_00008086&REV_00" /attach "PCI\VEN_8086&DEV_10D3&SUBSYS_00008086&REV_00"

but it still only attach one network.

Programmatically create/destroy network bridges with .NET on Windows 7

Upvotes: 0

Views: 248

Answers (1)

sking
sking

Reputation: 1

I find some clue.

run msinfo32, you can get the "PNP Device ID" and index, which will be different for the same model of adapters.

It seems index don't work with Bridgeutil. This PNP Device ID will work with the Bridgeutil.

Now the issue became to "How to programmatically get the PNP Device ID?"

For the problem i met, it seems every unit have the same PNP Device ID, as every unit was installed with the same windows7 image. I can directly use the two PNP Device ID i found out.

My problem solved.

Bridgeutil also updated to better support this case:

/attach [] Index or hardware id of the adapter to attach to bridge. /detach [] Index or hardware id of the adapter to detach from bridge.

The optional parameter either specifies a network adapter MAC address or an interface alias name.

For example:

bridgeutil /attach "PCI\VEN_8086&DEV_10D3&SUBSYS_00008086&REV_00" Front_LAN /attach "PCI\VEN_8086&DEV_10D3&SUBSYS_00008086&REV_00" Internal_NIC

Upvotes: 0

Related Questions