4

I'm wondering whether it is possible to configure a Windows 7 machine to request more than 1 IP address?

I'm doing some testing and it would be useful to have 2 local IP addresses however, the network I'm on is using DHCP so I don't want to pick one that someone else might be using.

EEAA
  • 109,363
  • 18
  • 175
  • 245
Nick
  • 226
  • 2
  • 5
  • I'd have to do some testing but I believe you'd have to have multiple adapters on the same segment. Why do you need multiple IPs on the same workstation (without VMs)? – Jim B Apr 27 '12 at 14:51
  • I'm developing some *peer-2-peer* technology and need to be able to host more than one instance on more than one IP address. – Nick Apr 27 '12 at 14:56
  • Interesting, but I'm not sure the traffic would ever leave the machine without a VM solution – Jim B Apr 27 '12 at 15:09
  • 2
    in linux we can use nic alias even if you only have 1 nic, but i am not sure how to do so in windows. – johnshen64 Apr 27 '12 at 15:10
  • Are you trying to simulate communication between multiple *peers*? If so, would virtual machines be a more realistic way to simulate your product's actual operation on a local network? – Skyhawk Apr 27 '12 at 16:33

3 Answers3

7

No, it is not possible. Each MAC address can only request a single IP.

If you need more than one IP, you need to talk with your IT department and request a static address.

EEAA
  • 109,363
  • 18
  • 175
  • 245
  • 1
    Ok, thanks. Do you know of any virtual network cards for Windows 7. My XPMode VM happily requests a DHCP address over my host's network interface... so it must be possible. – Nick Apr 27 '12 at 14:54
  • It's possible from a VM, because that VM has its own MAC address. – EEAA Apr 27 '12 at 14:58
  • 2
    If you can set up virtual network interfaces it is very well possible. –  Apr 27 '12 at 15:03
  • @tibordp: Any hints on how to do this? – Nick Apr 27 '12 at 15:04
  • @tibordp: as he sad: you can only request one address per MAC - that means, One per Network Interface. – ercpe Apr 27 '12 at 17:54
  • 2
    Physical NICs do not equate logical interfaces, and the OP's question refers to the former if I understand correctly. –  Apr 27 '12 at 18:43
1

Purchase a two-port network adapter and install it, or install a second single port network adapter (even an external USB one would work).

Then plug both in... use a cheap switch if you don't have two network drops.

Glenn Sullivan
  • 1,368
  • 9
  • 17
1

There are some good answers, here, but wouldn't you just be able to use something like a laptop, and be connected hardwired via ethernet, and connected to Wifi via your WLAN card simultaneously.

you might look into this application, I don't use it for anything nearly as ambitious, but it allows you to force a an application to bind to an IP address of a network interface.

http://www.r1ch.net/stuff/forcebindip/

I mostly would use it to connect to non-firewall friendly apps like spotify, by connecting my wifi to my company's guest network, while simultaneously remaining connected via ethernet able to work within the LAN. but you might be able to launch an instance of your application using this to bind it to the other network interface.

Matt Hamende
  • 129
  • 1
  • 11