CCNA NOTES 6 # DHCP Explained: DORA Process, APIPA, Relay Agent & Snooping — Complete Notes
- Get link
- X
- Other Apps
Study Mode
DHCP · APIPA · Relay · Snooping — Complete Notes
Network Protocols · Layer 7 · Application
DHCP & Related Concepts
Dynamic Host Configuration Protocol — DORA · APIPA · Relay Agent · Snooping
Layer 7 — ApplicationProtocol — UDPPort 67 (Server) / 68 (Client)Open Standard · RFC 2131
◈ DHCP DORA Process — 4-Step Handshake
D
DISCOVER
Client → Broadcast
Src: 0.0.0.0
Dst: 255.255.255.255
Src: 0.0.0.0
Dst: 255.255.255.255
O
OFFER
Server → Client
Server proposes
an IP address
Server proposes
an IP address
R
REQUEST
Client → Broadcast
Client accepts
the offered IP
Client accepts
the offered IP
A
ACK
Server → Client
Confirmed — client
assigns the IP
Confirmed — client
assigns the IP
◈
Overview & Why DHCP
Automatically assigns IP address to host devices on a network
Saves time — no manual IP configuration needed
Reduces administrative overhead and human error
Prevents duplicate IP addresses across the network
Increases team productivity significantly
≡
Parameters DHCP Assigns
| Parameter | Details |
|---|---|
| IP Address | Assigned from configured pool |
| Subnet Mask | Defines the network boundary |
| Default Gateway | L3 interface for outside-LAN comms |
| DNS Server | Primary & Secondary DNS |
| Lease Duration | Cisco = 24 hrs · Windows = 8 hrs |
!
Lease = Duration of IP assigned to a user. After expiry, DHCP negotiation restarts automatically.
→
DORA — Packet Details
| Step | Src IP | Dst IP | Type |
|---|---|---|---|
| Discover | 0.0.0.0 | 255.255.255.255 | Broadcast |
| Offer | DHCP IP | 255.255.255.255 | Broadcast |
| Request | 0.0.0.0 | 255.255.255.255 | Broadcast |
| ACK | DHCP IP | Client IP | Unicast |
✦
Other DHCP Messages
NAK — IP not valid / rejected
DECLINE — Duplicate IP detected
RELEASE — Client frees the IP
INFORM — Already has IP, needs extra config
{ }
Cisco Config — DHCP Pool
! Step 1 — Exclude reserved IPs first ip dhcp excluded-address 10.0.0.1 10.0.0.10 ! Step 2 — Create the pool ip dhcp pool MYPOOL network 10.0.0.0 255.0.0.0 default-router 10.0.0.1 dns-server 8.8.8.8 ! On client router interface ip address dhcp
⚡
APIPA — Auto Private IP Addressing
!
When you see 169.254.x.x — DHCP server is unreachable. APIPA is a self-assigned fallback, not a working IP.
APIPA Address Range
169.254.0.1 – 169.254.255.254
Subnet Mask: 255.255.0.0 | /16
Client boots → tries to contact DHCP → no response
Self-assigns an IP from the 169.254.x.x range
Keeps polling for DHCP server periodically
When DHCP found → APIPA replaced automatically
✕
No Default Gateway assigned
✕
No internet / routing possible
⇄
DHCP Relay Agent
?
Why needed? DHCP uses broadcasts. Routers do NOT forward broadcasts across subnets — so the relay agent bridges this gap.
Client sends DHCP Discover (broadcast)
Router (relay agent) receives it on the LAN interface
Converts broadcast → unicast and forwards to DHCP server
Server replies → router delivers to the client
Adds Option 82 (relay agent info) to packet
{ }
Cisco Config — Relay Agent
! On the router interface facing clients interface FastEthernet0/0 ip helper-address 10.0.0.1 ↑ IP of DHCP Server ! Disable Option 82 if causing issues no ip dhcp snooping information option
✓
One DHCP server can serve multiple subnets using relay agents — no need for a DHCP server in every network segment.
#DHCP#Networking#Cisco#DORA#APIPA#RelayAgent
Page 01 / 02 · Network Notes
Network Security · Layer 2 · Switch Feature
DHCP Snooping
Security guard for DHCP — blocks rogue servers · builds binding table · protects against MITM attacks
Layer 2 SecuritySwitch FeatureTrusted / Untrusted PortsBinding Table · ARP Guard
🛡
What & Why — DHCP Snooping
Layer 2 security feature on switches
Monitors all DHCP messages traversing the switch
Allows only trusted DHCP servers to respond with Offer/ACK
Blocks rogue DHCP servers — attacker pretending to be DHCP
Prevents Man-in-the-Middle (MITM) attacks via fake IP assignment
Builds a binding table linking MAC ↔ IP ↔ Port ↔ VLAN
✓ Trusted Port
Connected to real DHCP server or uplink
OFFER / ACK — Allowed
✕ Untrusted Port
Connected to clients / user devices
OFFER / ACK — Blocked
!
Default: ALL switch ports are Untrusted. You must manually mark the DHCP server port as trusted. Never trust user ports.
{ }
Cisco Config — DHCP Snooping
! Enable DHCP snooping globally ip dhcp snooping ! Enable on specific VLANs ip dhcp snooping vlan 1,10,20 ! Mark the DHCP server port as trusted interface FastEthernet0/1 ip dhcp snooping trust ! Disable Option 82 insertion (if needed) no ip dhcp snooping information option ! Verification commands show ip dhcp snooping show ip dhcp snooping binding ! Debug on DHCP server debug ip dhcp server events
≡
DHCP Snooping Binding Table
| IP Address | MAC Address | Lease (hr) | VLAN | Interface |
|---|---|---|---|---|
| 10.0.0.1 | AA:BB:CC:0A | 24 | 1 | Gi0/1 |
| 10.0.0.2 | AA:BB:CC:0B | 24 | 1 | Gi0/2 |
| 10.0.0.3 | AA:BB:CC:0C | 24 | 10 | Gi0/3 |
★
🔥 Important Interview & Exam Points
// 01
APIPA range is 169.254.0.0/16. Seeing 169.254.x.x = DHCP server is unreachable. No gateway, no internet.
// 02
DHCP uses UDP. Port 67 = Server, Port 68 = Client. Remember: server number is lower.
// 03
DHCP Relay uses ip helper-address. Converts broadcast → unicast and forwards to DHCP server IP.
// 04
Snooping: all ports untrusted by default. Only port to DHCP server should be trusted. Never trust client ports.
// 05
DORA process: Discover → Offer → Request → Ack. First and third messages are from the client.
// 06
Lease defaults: Cisco = 24 hrs, Windows = 8 hrs. DHCPNAK = server rejects. DECLINE = client rejects (duplicate detected).
✎
My Notes — Add Your Own
Personal Notes
Questions to Review
CONFIDENCE:
REVIEWED ON:_____________ / _____________ / _____
#DHCPSnooping#RogueServer#BindingTable#MITMProtection#CiscoSwitch
Page 02 / 02 · Network Notes
APIPA
CCNA
Cisco
Computer Networks
DHCP
DHCP Snooping
DORA Process
IP Address
IT Notes
Network Protocols
Network Security
Networking
Networking Notes
Relay Agent
Study Notes
Techwithyourfriend
UDP
Location:
New Delhi, Delhi, India
- Get link
- X
- Other Apps
Comments
Post a Comment