Configure TCP/IP to use DHCP and a Static IP Address at the Same Time

2

1

  • My computer is configured to obtain a IP address automatically using DHCP.
  • It only has one network adapter.

How to configure an additional static IP address?

I found a tutorial for Windows XP, but the procedure didn't work for Windows 7.

Is it possible to configure two IP addresses on Windows 7, one being static e another being dynamic? How?

The dynamic address I got now is 10.17.11.162. The static IP is 10.17.30.19. The network mask is the same: 255.255.224.0.
Both work independently, but I don't know how to use both at the same time.

tiago2014

Posted 2011-03-01T21:25:20.727

Reputation: 121

Question was closed 2018-08-08T14:17:20.497

You can't. A network card can only have a single active address. – DavidPostill – 2018-08-08T14:17:09.417

Could you explain why having two addresses is useful? – Isaac Rabinovitch – 2012-09-19T07:28:01.320

Answers

2

There are 2 tools to solve this Vista/Windows 7 issue, but after a DHCP refresh or cable replug, the settings are gone.

One tool is "Win IP Config", a graphical tool to add Internet Protocol addresses. The other one is iphelpcon.exe, a command-line tool (to put into Startup folder). The second tool uses the function AddIPAddress of the Microsoft DLL iphlpapi.dll.

http://www.pkostov.com/wipcfg.html

https://anonfiles.com/file/51c4fe4b6a42f3cb450228bd0c1dd50b

Jona Smith

Posted 2011-03-01T21:25:20.727

Reputation: 21

Gotta say that software distributed via an anonymous file sharing site makes me very nervous. – Isaac Rabinovitch – 2012-09-19T07:26:11.367

1

Set the interface to be DHCP, then in a command window type:

C:\> netsh interface ipv4 add address "Local Area Connection" 10.17.30.19 255.255.224.0

Majenko

Posted 2011-03-01T21:25:20.727

Reputation: 29 007

Thanks, but it did not work. After setting to DHCP, the dynamic address 10.17.11.162 was ping'able, and the static 10.17.30.19 wasn't, as expected. After executing "netsh interface ...", the static IP was reachable but the dynamic IP was gone (even on ipconfig). – tiago2014 – 2011-03-01T22:08:58.883

... And the GUI was again as if I had manually set the configuration to use a static IP address in it. – tiago2014 – 2011-03-01T22:11:26.803