Softpedia
 

NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
TRENDING TODAY
Home > News > Microsoft > Tips & Tricks

February 19th, 2007, 17:51 GMT · By Dragos Jijau

Both DHCP and Static IP address at the same time

SHARE:

Adjust text size:

For those who want to learn more about networking, I prepared a special material today. It is intended to provide advanced knowledge about a special TCP/IP configuration. How would you configure your TCP/IP connection to use both DHCP obtained IP and a static IP at the same time?

I am talking about setting up your network card to use more IP addresses at the same time on a single NIC adaptor. What is the utility of this special tweak configuration?

There may be more, but one crosses my mind right now: in case someone has more hostnames, he can configure them to use different IP addresses on the network connection, therefore the Internet connection will be shared between the hostnames.

No additional network card and separate Internet connection would be needed for each hostname.


Setting the connection to obtain the DHCP provided IP


To setup the connection in order to automatically obtain the IP address from the DHCP, you need to right click on the Local Area Connection and to select Properties. Under the General tab go to Internet protocol (TCP/IP) and select properties.

The options "Obtain IP address automatically" and "Obtain DNS server addresses automatically" must be selected. Under the next tab, "Alternate
Configuration", "Automatic private IP address" must be also selected. With these settings you ensure that your computer obtains the IP address from the DHCP server.
Review imageReview imageReview image


Adding more static IP addresses

Next step consists in the operation of adding another static IP addresses (not provided by the DHCP server). Because from Windows there is no option to offer you the freedom to add more IP addresses that can be used in the same time, we need to do a little trick editing the registry.

Open the registry editor (Go to Start > Run and type Regedit) and look for the following path:

HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Services>Tcpip>Parameters>Interfaces

Here you will find a key look like this: {BDF058FE-237C-402A-ABAB-8DEB342026BC}. It is the one that represents the NIC card. You need to look for the one representing your own network card.

Once you found it, select it and in the right panel, look for IPAddress key. Double click on it and you will get the Edit Multi-String window with a value of 0.0.0.0. Under this value, just add your static IP. You can add one, two or more IP addresses according to your needs.

In the same right panel, look for the SubnetMask key. This key needs to be edited in the same way we did with the key above.

Now close the Registry editor and disable the network connection by right clicking on the tray icon. Re-enable the connection again and you are done.
Review imageReview imageReview image



44,954 hits · 18 comments
Link to this article · Print article · Send to friend

MUST-READ RELATED ARTICLES:


Secrets of Secured Wireless Connections

Free Network Test Tool from Microsoft

Juggle with Your MAC Address

Increase Your Internet Connection Speed!

Two Protection Tweaks for Corporate PCs

READER COMMENTS:


Comment #1 by: da4an1qu1 on 20 Mar 2007, 16:03 UTC reply to this comment

Has anyone got this to work for a Wireless Lan interface? It does not work for me with a Wireless Lan interface. The interface does not release the old DHCP address, but also fails to re-acquire it via DHCP.


Comment #2 by: kevin Cooke on 17 Feb 2008, 11:44 UTC reply to this comment

It worked for me. I can now get my wireless bridge to obtain an Ip from an external access point and manage the bridge with a separate ip range. the beauty is I don't have to hunt for the ip of the bridge every time it connects to a different hot spot


Comment #3 by: Loco on 07 Sep 2008, 18:39 UTC reply to this comment

Has anyone successfully done this in vista?


Comment #4 by: Vivek Kumar on 01 Nov 2008, 06:02 UTC reply to this comment

i want to know how to run two statics ips on one computer at the same time........?


Comment #5 by: jose on 09 Mar 2009, 19:34 UTC reply to this comment

this not works, i cant connect by my "static" ip to my server said mme wrong ip acces denied, because apper other ip on conig /all the ip of the dhcp


Comment #6 by: Experimenter on 18 Mar 2009, 01:23 UTC reply to this comment

Works on one of my PCs, doesn't work on another one. Both XP/SP3. Exported and compared the registry branches to exclude manual errors. On the one where it's working, ipconfig /all shows the manually entered additional IP-Address, whereas on the one where it's not working it shows the an additional IP-Address 0.0.0.0. Maybe it depends on the network adaptor.

Comment #6.1 by: Jed on 03 Jan 2010, 09:48 GMT

did you manage to work out why this works on one macgine and not the other? I want to use this to set up static addresses for telephony purposes but cannot get it to work. I suspect that this is an OS issue, I am using XP home edition SP2 to test.


Comment #7 by: AnanthaP on 27 May 2009, 11:42 UTC reply to this comment

The example has (see screen image) has 3 keys like : BDF058FE-237C-402A-ABAB-8DEB342026BC.

How do I know ehich is for my NIC?


Comment #8 by: Antonia on 22 Sep 2009, 04:18 UTC reply to this comment

I'm in the same boat as AnanthaP .. How do you know which one is for your NIC? I have tried looking at the device properties etc, and can't find what i am looking for!


Comment #9 by: Michael van Yperen on 09 Dec 2009, 13:25 UTC reply to this comment

Assign a static IP to the NIC.

The click each key, and look at the IPaddress key.

Whichever one has the IP you just assigned, is the one you need.


Comment #10 by: Dav on 26 Dec 2009, 16:41 UTC reply to this comment

It works for my wired adapter, but doesn't work for my wireless adapter. Why?


Comment #11 by: jorge on 27 Mar 2010, 01:39 UTC reply to this comment

Excellent! thanks a lot, i was trying to do this a long time ago, very good info indeed!!!

For those who are asking how to indentify your adapter in the registry, i've done it by looking for the one with the actual ip address assigned to my lan connection, i had 14 lan adapters in this pc...


Comment #12 by: CB on 18 May 2010, 23:27 UTC reply to this comment

Any word on Windows Vista? This is precisely the solution I'm looking for but I need it for Vista.


Comment #13 by: DiS on 22 Sep 2010, 13:01 UTC reply to this comment

!! THANK YOU MEN !!


Comment #14 by: Satish on 01 Oct 2011, 06:04 UTC reply to this comment

It works at one system but if you ping from second static IP system to the fist static IP it give "request timed out".(in windows XP) why?


Comment #15 by: sara on 30 Jan 2012, 09:38 UTC reply to this comment

i need to make my PC access internet through DHCP and access an internal server with static IP away from internet, i tried as you said and also i tried to edit gateway but i still access only internet


Comment #16 by: Kashif on 04 Mar 2012, 09:04 UTC reply to this comment

Wat abt DNS servers?


Comment #17 by: marcos on 20 Mar 2012, 08:21 UTC reply to this comment

Excellent, you save my day. Thanks a lot

Copyright © 2001-2013 Softpedia. Contact/Tip us at

WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM