Skip to content

Latest commit

 

History

History
131 lines (72 loc) · 4.49 KB

DHCP.md

File metadata and controls

131 lines (72 loc) · 4.49 KB

39. DHCP (Dynamic Host Configuration Protocol)

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

image

image

image

image

image

Note: ALL the IPs are the same because this is Jeremy’s Home ROUTER (it provides all these services)

Command ipconfig /release

image

image

Wireshark capture of the ipconfig /release mechanism

image

image


Command ipconfig /renew

image

Renewing Process has FOUR messages:

image

  1. DHCP DISCOVER
  • Are there any DHCP Servers in this NETWORK? I need an IP ADDRESS ?

image

NOTE the use of DHCP Reserved Ports 67 and 68

  1. DHCP OFFER:
  • How about THIS IP ADDRESS ?

image

  • The DHCP OFFER message can be either BROADCAST or UNICAST
  • NOTE OPTIONS at the bottom : Message Type, Server ID, Lease Time, Subnet, etc.
  1. DHCP REQUEST
  • I want to use the IP ADDRESS that was offered

image

  1. DHCP ACK
  • Okay! You may use THAT ADDRESS

image


DHCP RENEW PROCESS SUMMARY

image


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

image

image


CONFIGURING DHCP IN CISCO IOS

Commands for configuring DHCP SERVERS in Cisco IOS

image

Command show ip dhcp binding

image

image


DHCP RELAY AGENT CONFIGURATION IN IOS

image

RELAY AGENT MUST HAVE CONNECTIVITY WITH DHCP SERVER


DHCP CLIENT CONFIGURATION IN IOS

image


COMMANDS SUMMARY

image