How DHCP Assigns Addresses
When you add a computer to a network, that computer uses a four-step process to get an IP address from DHCP:
- Discover -- The computer sends out a broadcast message on the network, hoping to discover a DHCP service provider.
- Offer -- Each DHCP provider hears the message, recognizes the unique hardware address of the computer, and sends a message back offering its services to that computer.
- Request -- The computer selects a DHCP provider from its offerings and then sends a request to that provider asking for an IP address assignment.
- Acknowledge -- The targeted DHCP provider acknowledges the request and issues an IP address to the computer that doesn't match any other IP addresses currently active on the network.
Earlier, you read that IPv4 addresses represent four eight-digit binary numbers. That means that each number could be 00000000 to 11111111 in binary, or 0 to 255 in decimal (base-10). In other words, 0.0.0.0 to 255.255.255.255. However, some numbers in that range are reserved for specific purposes on TCP/IP networks. These reservations are recognized by the authority on TCP/IP addressing, the Internet Assigned Numbers Authority (IANA). Four specific reservations include the following:
- 0.0.0.0 -- This represents the default network, which is the abstract concept of just being connected to a TCP/IP network.
- 255.255.255.255 -- This address is reserved for network broadcasts, or messages that should go to all computers on the network.
- 127.0.0.1 -- This is called the loopback address, meaning your computer's way of identifying itself, whether or not it has an assigned IP address.
- 169.254.0.1 to 169.254.255.254 -- This is the Automatic Private IP Addressing (APIPA) range of addresses assigned automatically when a computer's unsuccessful getting an address from a DHCP server.
The other IP address reservations are for subnet classes. A subnet is a smaller network of computers connected to a larger network through a router. The subnet can have its own address system so computers on the same subnet can communicate quickly without sending data across the larger network. A router on a TCP/IP network, including the Internet, is configured to recognize one or more subnets and route network traffic appropriately. The following are the IP addresses reserved for subnets:
- 10.0.0.0 to 10.255.255.255 -- This falls within the Class A address range of 22.214.171.124 to 127.0.0.0, in which the first bit is 0.
- 172.16.0.0 to 172.31.255.255 -- This falls within the Class B address range of 126.96.36.199 to 188.8.131.52, in which the first two bits are 10.
- 192.168.0.0 to 192.168.255.255 -- This falls within the Class C range of 192.0.0.0 through 184.108.40.206, in which the first three bits are 110.
- Multicast (formerly called Class D) -- The first four bits in the address are 1110, with addresses ranging from 220.127.116.11 to 18.104.22.168.
- Reserved for future/experimental use (formerly called Class E) -- addresses 240.0.0.0 to 254.255.255.254.
The first three (within Classes A, B and C) are those most used in creating subnets. Later, we'll see how a subnet uses these addresses. The IANA has outlined specific uses for multicast addresses within Internet Engineering Task Force (IETF) document RFC 5771. However, it hasn't designated a purpose or future plan for Class E addresses since it reserved the block in its 1989 document RFC 1112. Before IPv6, the Internet was filled with debate about whether the IANA should release Class E for general use.
Next, let's see how subnets work and find out who has those non-reserved IP addresses out on the Internet.