DHCP pool range

I have written in the past about some of the advantages of using DHCP, to automatically assign IP addresses to the computers on your network. Today, I want to look at a pitfall that I have seen come up. In fact, it happened just the other day to one of our customers.

This pitfall occurs when you have some static IP addresses on your network, along with DHCP assigned addresses. Many times it is desirable, and often necessary, to have one or more servers with a static IP address. There is no problem with having a mixture of static and dynamic addresses on your network, provided that your DHCP server is setup properly.

The problem arises when the "pool" of addresses that the DHCP server is using, overlaps those static addresses. In that case, the DHCP server may assign the static address that is being used by a server to another machine. This will result in having two machines with the same IP address, and one of those machines (usually the server with the static address) will then shut off it’s network interface to avoid the conflict. The result is that the machine that shut off its interface will no longer be able to communicate on the network.

The proper way to set this up, is to have a range of static addresses, and a second range of dynamic addresses. For example, let’s assume that you are using the non-hosted address range of 192.168.1.1 to 192.168.1.254. In that case, I would reserve 192.168.1.1 thru 192.168.1.100 for the static addresses. In other words, all machines that require a static address, would have an address assigned to them that falls in that range. Then, the DHCP server would be allowed to use the rest of the addresses for dynamic assignment. In the DHCP server configuration, the range of allowable addresses, usually referred to as the pool, would be setup to be 192.168.1.101 thru 192.168.1.254. That way, there is no chance of a dynamic address being assigned that conflicts with a static address.

There are some versions of the DHCP server that will check if an address is actually in use before assigning it. SCO UNIX, and some Linux, DHCP servers will do this. Windows and most routers do NOT, however, if they are acting as the DHCP server. In those cases where the DHCP server does check, they should still be setup so that no overlap occurs.