7

I think it is possible to set up 2 IP addresses and subnet masks on one NIC in Windows XP.

How can this be done?

0

6 Answers 6

7

Having more than 2 IP addresses is called Multihoming.
Most Multihoming solutions require giving up DHCP addressing in favor of static ones.

Actually, there is a way to multihome a network interface card (NIC) under XP and use both DHCP and multiple static IP addresses. Here's how, taken from Eccentricities of Windows networking :

  1. Use regedit to navigate to
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\NetTrans
  2. Under these subkeys you'll find all of the NICs in your PC listed by their COM Class Identifiers otherwise known as Globally Unique Identifiers (GUID). For example:
    {A8BF419B-8185-4396-B87A-2B6345BBC8E3}
    Be careful to correctly identify which NIC the entry refers to - you'll find multiple GUIDs listed under each NIC in the registry.
  3. Find the key IPAddress and double click on it. In the Edit Multi-String dialog that appears, enter in the value of each of the static IP addresses you want to assign to the NIC, one value per line. Note that the first value must be "0.0.0.0".
  4. Now find the SubnetMask key and edit it exactly the same way you did the "IPAddress" key, again making sure the first value is "0.0.0.0".
  5. Reboot.
6
  • Any clue how to do this for Windows 7? I created these entries in the registry (they aren't present by default, which makes me think they may have removed this ability), but still couldn't access the other network after disabling and re-enabling the interface.
    – Sam Skuce
    Sep 6, 2011 at 16:42
  • Does this help : How to Configure a Multihomed Server.
    – harrymc
    Sep 6, 2011 at 16:57
  • Sorry, no. That article talks about a computer with two NICs, but I was looking for assigning two IP address to one NIC, like your original answer. I've used that procedure often on our XP computers with only one NIC, and today I tried to use it on a Windows 7 machine, only to find it unsuccessful.
    – Sam Skuce
    Sep 6, 2011 at 21:10
  • @sskuce: Understood. How about the procedure described in this article.
    – harrymc
    Sep 7, 2011 at 8:10
  • We want to have one address assigned by DHCP, and the other statically assigned. The procedure from "Eccentricities of Windows Networking" allows this for XP machines, but not for Windows 7. The itsyourip article you just linked is only good for two or more static IPs, unfortunately. Thanks though!
    – Sam Skuce
    Sep 7, 2011 at 15:21
6

I usually do this with netsh as it's easy to replicate.

netsh interface ip set address "Local Area Connection" static 10.0.10.20 255.255.255.0 10.0.10.1 1
netsh interface ip add address "Local Area Connection" 192.168.1.20 255.255.255.0

Now you'll want to configure DNS also, I presume.

netsh interface ip set dns "Local Area Connection" static 10.0.10.1
netsh interface ip add dns "Local Area Connection" 192.168.1.140

I'll then save these commands to a .cmd file and save that in my source code repository (or other backed up location) for posterity.

3

Yes, although both IP's have to be static.

  1. Control Panel -> Network Connections
  2. Right click the NIC -> Properties
  3. TCP/IP->Properties
  4. Click Advanced
  5. Under IP Addresses click Add.
3
  • 1
    actually there is a way to make this work with DHCP (for the first address; the second address must be static). see harrymc's answer. Nov 21, 2009 at 19:05
  • i did it and i can successfully ping myself on that new IP address, but other machines cannot ping me on new IP address? Jan 14, 2014 at 1:30
  • you still have to follow the rules of subnetting :-) Jan 14, 2014 at 3:44
2

Searched Microsoft for "second ip address windows xp" it was the 5th link.

Read though you'll see it in there.

http://technet.microsoft.com/en-us/library/bb457118.aspx

1

It does not work with dhcp but with static ips you can set it by going to

Network card properties. Internet Protocol(TCP/IP) properties. Click advanced

In this screen you can add as much ip's and gatways as you want.

1
  • actually there is a way to make this work with DHCP (for the first address; the second address must be static). see harrymc's answer. Nov 21, 2009 at 19:04
0

The Registry Key details here apply to Windows 98; different info applies to XP - go to the Eccentricities of Windows Networking site for the right info.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .