DHCP and static IP can co-exist on Windows.

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,657
Reaction score
14,094
Location
USA
Traditionally, if you want to assign a static IP to a network interface, you need to disable DHCP on that interface. Well that is no longer the case. There is a lesser-known capability of Windows where you can assign static IP addresses to a network interface that has DHCP enabled. (search "dhcpstaticipcoexistence") But that requires remembering or looking up command line stuff, which makes it painful for me and a lot of other people to use.

Last weekend, I built a small Windows app that provides an easy interface for adding and removing static IP addresses from any network interface, whether it has DHCP enabled or not. Here is the app on github.

This can be very helpful if your IP cameras or other IoT gear are in a different IP address range than your router, but share the same physical network. And even moreso if you want to access those networks from a laptop that you may connect to other networks from time-to-time, so you want to keep DHCP enabled on it.

For example to be able to set up new Dahua IP cameras, it is helpful to assign a static IP like 192.168.1.2/24 (/24 indicates the subnet mask 255.255.255.0).

1716394517545.png

I wish this kind of thing was built into the Windows network configuration GUI but the way things have been going at Microsoft, that will probably never happen.
 

ludshed

Getting comfortable
Joined
Sep 14, 2022
Messages
650
Reaction score
817
Location
Us
I was at a clients last week and after getting the physical network in place had their It log in remotely and saw this. It was done through gui in advance net config; the one that switches over to look like xp. And something else I didn’t realize that one adapter can now exist on multiple ip ranges.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,657
Reaction score
14,094
Location
USA
I was at a clients last week and after getting the physical network in place had their It log in remotely and saw this. It was done through gui in advance net config; the one that switches over to look like xp. And something else I didn’t realize that one adapter can now exist on multiple ip ranges.
You must be referring to this. Yes, this has been available for decades with the ability to assign multiple static IP addresses (even in different subnets) to one interface. But the Windows stock GUI forces you to disable DHCP in order to assign static IPs. My app lets you assign static IPs while leaving DHCP enabled, which is a very useful capability in my opinion.

1716398892004.png
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,664
Reaction score
50,080
Location
USA
Any concerns of a camera jumping subnets with this and accessing internet?
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,989
Reaction score
6,813
Location
Scotland
Under Linux, multiple network profiles can be defined with whatever parameters are required, with selection of whichever one is needed for the work in hand just 2 mouse clicks away.
A simple and very useful facility for those of us messing about at that level.
 
Top