Dynamic Host Configuration Protocol or DHCP


Configuring Your Internet Connection Part 1: The Dynamic Host Control Protocol

Every time you connect a computer or router to the Internet, you will be expected to provide important details describing your immediate pathway out to the rest of the world. Four items of information will almost always be required:

1 of 4: Your IP address

2 of 4: A - "Netmask" - indicating the size of your local IP subnet

3 of 4: IP Address of your subnet's Default Gateway

4 of 4: IP Address of an available Domain Name Server

In this movie we will examine these four items in sufficient detail to allow you to understand and use popular, - automated - configuration services for a typical personal computer or a router. We'll also help you to visualize the components that are being configured.

We will use Microsoft's popular - "Windows XP" operating system as the basis for most of the illustrated dialogs and menus. Although routers or computers using other operating systems will not look exactly like Windows XP, most of them use the same vocabulary and request this same information in substantially the same way.

Part 1 of 4: Your - IP Address

Every path to the Internet leads through a router. In fact, Internet pathways generally pass through many, many routers, and the worldwide Internet can be visualized as a branching, maze-like galaxy of routers, each defining the intersection points between millions of smaller networks. Among the millions of routers constituting the worldwide Internet, we are going to assume that you've purchased - one - of them that is of special significance to you, because it is installed inside your home or small office, and it will use "NAT" (Network Address Translation) technology (as described in other movies here on AskMisterWizard.com) to help you manage multiple IP addresses.

If you aren't familiar with NAT technology, then you should watch the two movies entitled - "Simple Routers for Small Networks Part 1: Client Firewalls" - and - "Simple NAT Routers Part 2: Multiple PCs", before proceeding here, because - this - movie builds on - those - concepts.

If yours is a typical small network using a low-cost Cable or DSL Internet connection, the - "external" - ethernet interface of your router will be assigned a single IP address by your Internet Service Provider. (That - "public" - IP address will probably change from time to time because most ISPs like to assign and re-assign public addresses dynamically, as they are needed).

The - "internal" - interface of your router will use NAT technology to help you manage a group of local IP addresses. When you connect a computer, print server, or file server to your local area network, its ethernet interface will need an IP address from that group. Most small NAT routers can manage a group of 256 local IP addresses.

Technically, an IP address is a unique 32-bit, binary number that identifies a piece of Internet equipment. Computers use binary numbers because binary hardware is a lot simpler (and less expensive) than hardware built to understand decimal or other number systems. If you were to examine an Internet Address as it arrives from an Ethernet cable, it would look something like this:


Although that binary system is efficient for computer hardware, it's unwieldy for us humans! If we convert that number into the familiar decimal form that we use for normal human mathematics, it looks like this:


But Internet addresses are not just ordinary numbers; the format has a functional, unique structure. They are assigned by an - "Internet Architecture Board" - in patterns that can be analyzed to give hints as to the location of the associated equipment within the grand scheme of the worldwide Internet. Within that - Grand Scheme, it turns out that the most important characteristics of an individual address can be deduced by examining eight-bit blocks. Unfortunately, if we convert an Internet Address into a decimal number, the 8-bit boundaries become hopelessly obscured. This led the Internet gurus of yesteryear to abandon decimal address representations. Instead, they prefer to visualize the 32 bits as four segments of eight bits each like this:

11000000 10101000 00000000 00000010

By common agreement, Internet folk have decided to represent each of those four, eight-bit binary segments as an individual number which can be converted to decimal, ranging between 0 and 255 (base 10). The usual and customary arrangement separates each of those segments with a period (pronounced - "dot" - among the Internet Cogniscenti). This results in IP addresses that look like this:

All of your Internet-compatible computers and equipment must somehow become aware of an Internet address by which it can communicate with everybody else using the IP protocol

The methods by which your computers and equipment learn their IP addresses fall into two broad categories as follows:

1 of 2: They can be automatically configured with a "dynamic" IP address,


2 of 2: They can be manually configured with a "static" IP address.

Most people start out using the first of these options, resulting in - "dynamic" IP addresses. Later, as they become more experienced and as they activate increasingly sophisticated services, it is commonplace to configure some of their equipment with static IP addresses.

Let's examine Dynamic IP address configuration first. (Later on, we'll view other movies to tackle the manual configuration methods that are necessary for static IP addresses).

DHCP: The "Dynamic Host Control Protocol"

Long ago, as well-established Local-Area Networks based on - Ethernet - began to evolve into globe-spanning networks using Internet Protocols, some very smart people determined that it would be a - Good Thing - to have an Ethernet-compatible server that might help a population of computers to migrate to the Internet, automatically obtaining IP addresses and every other necessary detail. As a result of this foresight, they agreed on a protocol by which ethernet-based computers that needed an IP address could use ethernet to ask for and receive one from a nearby - "server" - authority that understood both Ethernet and Internet protocols. They named this - "DHCP" - the - "Dynamic Host Control Protocol", and it has become very popular. Basically, any computer (or other piece of network equipment with an ethernet interface) that needs an IP address can use ethernet to - "broadcast" - a request for help like this:

"Hey! Everybody listen up: I need an IP address. If there's anybody here that understands the DHCP protocol and knows about available IP addresses that are compatible with this local area network, please respond back to me on my ethernet address so I can use IP along with the rest of you."

If a - "DHCP server" - has been installed on that ethernet broadcast domain, it will respond with a message like this:

"I am the DHCP server for this network. According to my records, you should use IP address until further notice. The netmask for this network is, the default gateway address is, and Domain Name Services are always available from a computer at"

This information will permit any ethernet-equipped computer to configure itself for the Internet Protocol and to communicate with all of the other computers on the Internet.

Most modern, low-cost NAT routers include a built-in DHCP server that can handle DHCP requests for all of your computers and other network equipment.

As illustrated in this example, the DHCP protocol provides more than just an IP address. It's now time for us to proceed with brief discussions of that other information.

Part 2 of 4: Your network's - "Netmask" or - "Subnet Mask"

As you connect through your Internet Service Provider, your Local Area Network will behave as a - "subnetwork" - or - "subnet" - of the worldwide - "Internet". The design of the Internet permits subnets of various sizes, and the size of your own subnet determines the theoretical maximum number of computers or hardware servers that can communicate directly with one another without passing through your router. Most home or small office subnets accommodate as many as 256 distinct IP addresses. When any of your local computers sends information anywhere else, it will need to make a quick decision as to whether it can send it directly using your local ethernet hardware, or whether it needs to ask your router to send it to some other, remote subnet.

The size of your subnet is determined by your - "subnet mask". This concept was designed by engineers that were comfortable with the binary numbering system. As a result of this binary orientation, you will eventually notice that certain subnet mask values get used a lot. In particular, you will see these numbers used for most subnet masks:

If you speak binary, you'll recognize the special significance of those numbers and the reason why they can easily be interpreted to divide a 32-bit number into two different sections. If you don't speak binary, don't worry about it! You can satisfy almost every configuration question by just memorizing these three items of information:

1 of 3: Netmask specifies just one single IP address for use by just one single computer or piece of network equipment. This netmask is used for certain special cases in which it's important to isolate one computer from all others.

2 of 3: Netmask specifies a small subnet for a very basic router and just ONE computer. This is the way most Internet Service Providers will try to configure the external interface of your router for access from their - "Cable modem" - or - "DSL modem".

3 of 3: Netmask specifies a subnet with 256 IP addresses. This is the way your local router will generally configure it's own local interface to establish the basis for IP on your LAN.

The DHCP protocol will work with your router's preprogrammed, - "default" - behavior to automatically configure all of the Netmask values that will ever be needed in your Local Area Network. If you are using the DHCP protocol everywhere, you should never need to specify a netmask.

Once this information is available to the computers on your network, they will use it in combination with their own IP address to determine whether any other IP address can be reached through local ethernet hardware, or whether it can only be reached through your router.

Part 3 of 4: Your network's - "Default Gateway"

Most home or small office networks have just one pathway out to the worldwide Internet, through a single Internet Service Provider. In that case, whenever any of your local computers wants to transmit a packet of IP information outside of your local subnet, it will need help from your router. Accordingly, your router serves as the - "Default Gateway" - to the Internet for your local network, and all of your local computers will need to know its local IP address. The DHCP protocol will work with your router's preprogrammed - "default" - behavior to automatically inform all of your other equipment of its local IP address. (Furthermore, - your router - will use your Internet Service Provider for - its - Default Gateway, and will learn the associated IP address through the DHCP protocol, from a DHCP server hosted by your ISP). If you are using the DHCP protocol everywhere, you should never need to specify a Default Gateway value.

Part 4 of 4: Your network's - "Domain Name Server"

IP addresses are always 32-bit numbers. As we illustrated in section 1 of this movie, those 32-bit numbers can be represented in a variety of ways, and we suggested that the popular - "dotted decimal" - notation was the most widespread. The example that we used looked like this:

Your computer can very easily convert that format into the binary format that works best with its hardware.

There is another popular way to represent an IP address. You've probably seen IP addresses that look like this:





When an IP address is represented in that format, it is called a - "Domain Name" address. Obviously those IP address representations can be more meaningful and more memorable to humans. Unfortunately, your computer cannot convert that format into the binary format that your hardware needs unless it gets help from some kind of - "higher intelligence" that's aware of the domain names chosen by humans. Internet designers long ago implemented an automated, easy mechanism for translating back and forth between the two formats. The mechanism relies on computers running special processes called - "Domain Name Servers" - (DNS) - that have a highly evolved intelligence optimized for converting IP addresses back and forth between Domain Name and Dotted Decimal representations. (Often these services are supplemented with the names of your ISP's devices, and are relayed through the routers made available by your Internet Service Provider). Whenever you want to use an Internet address like "www.google.com", your computer automatically contacts a Domain Name Server and asks for help translating it to a dotted decimal address, which it remembers for awhile, and uses for subsequent message transmission.

Accordingly, all of the computers and other network equipment on your LAN will want to know the numeric IP address(es) of one or more Domain Name Servers that can answer requests for address translation services. Your Internet Service Provider should host one or more DNS servers for your use, and the DHCP protocol will work with your router's preprogrammed, - "default" - behavior to make this information available. If you are using the DHCP protocol everywhere, you should never need to specify a DNS Server address value.

Configuration Example using Windows XP

Let's use Microsoft's well-known - "Windows XP" - operating system as an example to show how to configure an Internet connection. From the - "Control Panel" - facility, select "Network and Internet Connections". From there, click on "Network Connections". That will result in a frame like this, showing a list of all of your network interfaces:

Click on the icon representing the network interface that you want to configure with an IP address. Usually it will have a name like - "Local Area Connection". (If your computer has only one network interface, then the list will show only that single entry. Double-click on it.)

A new frame, named - "Local Area Connection Status" - will appear as follows:

From the prominent - "General" - tab, select the button labelled - "Properties".

A new frame, named - "Local Area Connection Properties" - will appear as follows:

That frame will be dominated by a list under a title that says "This connection uses the following items". From within that list, doubleclick on - "Internet Protocol (TCP/IP)".

A new frame, named - "Internet Protocol (TCP/IP) Properties will appear as follows:

From the prominent - "General" - tab, select - "Obtain an IP address automatically" - and - "Obtain DNS Server address automatically".

Click "OK" and close all of the open frames. Your PC is configured for Internet Access!


Modern NAT routers include a - "Dynamic Host Control Protocol" - (DHCP) server that makes it very easy to configure all of the other computers in your local area network for Internet access. It is easy to configure your Personal Computers and other network equipment to use this protocol to ask your router for all of the details they will need to become Internet compatible. Your router will use this same protocol in turn, to ask your Internet Service Provider for the information it needs.