2

On linux you can set up a virtual interface using

ifconfig eth0:0 ....

There's these questions:

How do you create a virtual network interface on Windows?

virtual network interface for windows

But they talk about vpn or loopback. VPN wont work in my situation as I'm trying to talk to a machine I don't have control over that sits on a hardwired subnet, which is not the one I get via dhcp. Loopback doesn't work as it doesn't actually talk to the physical device.

There's a hack on WinXP that lets you override dhcp by hacking the registry, but it was disabled in Win7 for security reasons.

Community
  • 1
  • 1
Malcolm
  • 1,239
  • 1
  • 14
  • 25
  • You should be able to configure any network interface via the command line with `netsh`. I'm not sure if that was in XP, but it should be in Vista and 7. – Michael Madsen Feb 09 '12 at 22:42
  • netsh will let you change the interface configuration, it does not appear to allow you to add a virtual interface to an existing one. " netsh interface ipv4 add address ..." just edits the current configuration. – Malcolm Feb 09 '12 at 23:34
  • I suspect that you can't configure an additional IP address on an interface (by any means) when it is set to use DHCP. However, bridging the physical adapter to the Microsoft Loopback Adapter might work. – Harry Johnston Feb 13 '12 at 03:57
  • DHCP does seem to prevent adding an IP address. Bridging to the loopback adapter didn't seem to work, there's still only one visible IP address (the bridge gets the IP of the last adapter added). – Malcolm Feb 13 '12 at 23:25

2 Answers2

2

For the record, the only solution we found at $WORK that actually solved the problem on Win7 (embedded) is a custom MUX (multiplexer) driver derived from source from Microsoft. That let us set up two different virtual adapters with the different configurations.

AddIPAddress doesn't let you add a static address to an adapter using DHCP in Win7 (it works in XP, but they disabled it in Vista).

Malcolm
  • 1,239
  • 1
  • 14
  • 25
0

AddIPAddress can be used to add a new IP address (and subnet mask) to an existing network adaptor. This should let you talk to a computer on a different subnet to the default.

arx
  • 16,686
  • 2
  • 44
  • 61
  • For the record, the only solution we found at $WORK that actually solved the problem on Win7 (embedded) is a custom MUX (multiplexer) driver derived from source from Microsoft. – Malcolm May 24 '12 at 14:30