THE PURPOSE OF DHCP
- DHCP is used to allow HOSTS to automatically / dynamically learn various aspects of their NETWORK configuration; without MANUAL / STATIC configuration
- It is an ESSENTIAL part of modern NETWORKS
- When you connect a phone / laptop to WiFi, do you ask your NETWORK admin which IP ADDRESS, SUBNET MASK, DEFAULT GATEWAY, etc the phone / laptop should use ?
- Typically used for CLIENT devices (workstations, phones, etc)
- DEVICES (such as ROUTERS, SERVERS, etc) are usually MANUALLY configured
- In small NETWORKS (such as Home NETWORKS), the ROUTER typically acts as the DHCP SERVER for HOSTS in the LAN
- In LARGE NETWORKS, the DHCP SERVER is usually a Windows / Linux SERVER
BASIC FUNCTIONS OF DHCP
Note: ALL the IPs are the same because this is Jeremy’s Home ROUTER (it provides all these services)
Command ipconfig /release
Wireshark capture of the ipconfig /release
mechanism
Command ipconfig /renew
Renewing Process has FOUR messages:
- DHCP DISCOVER
- Are there any DHCP Servers in this NETWORK? I need an IP ADDRESS ?
NOTE the use of DHCP Reserved Ports 67 and 68
- DHCP OFFER:
- How about THIS IP ADDRESS ?
- The DHCP OFFER message can be either BROADCAST or UNICAST
- NOTE OPTIONS at the bottom : Message Type, Server ID, Lease Time, Subnet, etc.
- DHCP REQUEST
- I want to use the IP ADDRESS that was offered
- DHCP ACK
- Okay! You may use THAT ADDRESS
DHCP RENEW PROCESS SUMMARY
DHCP RELAY
- Some NETWORK engineers might choose to configure each ROUTER to act as the DHCP SERVER for its connected LANS
- However, large enterprises often choose to use a CENTRALIZED DHCP SERVER
- If the SERVER is centralized, it won’t receive the DHCP CLIENTS’ Broadcast DHCP messages
- To FIX this, you can configure a ROUTER to act as a DHCP RELAY AGENT
- The ROUTER will forward the clients’ Broadcast DHCP messages to the remote DHCP SERVER as a Unicast messages
CONFIGURING DHCP IN CISCO IOS
Commands for configuring DHCP SERVERS in Cisco IOS
Command show ip dhcp binding
DHCP RELAY AGENT CONFIGURATION IN IOS
RELAY AGENT MUST HAVE CONNECTIVITY WITH DHCP SERVER
DHCP CLIENT CONFIGURATION IN IOS
COMMANDS SUMMARY