Test Your DHCP Knowledge
This quiz covers the Dynamic Host Configuration Protocol (DHCP), including the DORA process, lease management, relay agents, security mechanisms, and protocol specifications.
DORA Process & Message Types
IP Address Allocation Methods
Lease Renewal & Rebinding
DHCP Relay Agents
Protocol Ports & Layers
Security & DHCP Snooping
1
What does the acronym DORA stand for in DHCP operations?
A
Discover, Offer, Request, Acknowledge
B
Discover, Obtain, Receive, Assign
C
Demand, Offer, Response, Acceptance
D
Detect, Optimize, Request, Allocate
Correct Answer: A
DORA stands for Discover, Offer, Request, Acknowledge. This is the four-step process used by DHCP to assign IP addresses:
1. Discover: Client broadcasts to find DHCP servers
2. Offer: Server responds with available IP address
3. Request: Client requests the offered IP
4. Acknowledge: Server confirms the assignment
1. Discover: Client broadcasts to find DHCP servers
2. Offer: Server responds with available IP address
3. Request: Client requests the offered IP
4. Acknowledge: Server confirms the assignment
2
Which transport protocol and ports does DHCP use?
A
TCP ports 67 and 68
B
UDP ports 67 and 68
C
TCP ports 53 and 54
D
UDP ports 53 and 54
Correct Answer: B
DHCP uses UDP (User Datagram Protocol) because it is connectionless and lightweight, suitable for broadcast-based discovery when clients don't yet have IP addresses.
• UDP Port 67: Used by the DHCP server
• UDP Port 68: Used by the DHCP client
DHCP operates at the Application Layer (Layer 7) of the OSI model but initially uses Layer 2 broadcasts since the client has no IP address during the discovery phase.
• UDP Port 67: Used by the DHCP server
• UDP Port 68: Used by the DHCP client
DHCP operates at the Application Layer (Layer 7) of the OSI model but initially uses Layer 2 broadcasts since the client has no IP address during the discovery phase.
3
At what percentage of the lease duration does a DHCP client first attempt to renew its IP address lease?
A
25%
B
50%
C
75%
D
87.5%
Correct Answer: B
At 50% of the lease time (T1), the client sends a DHCPREQUEST directly to the server (unicast) to renew the lease. If successful, the lease is extended without requiring a full DORA cycle.
Key Timers:
• T1 (50%): Unicast renewal attempt to original server
• T2 (87.5%): Broadcast rebinding attempt to any available server
• 100%: Lease expires; client must restart DORA process
Key Timers:
• T1 (50%): Unicast renewal attempt to original server
• T2 (87.5%): Broadcast rebinding attempt to any available server
• 100%: Lease expires; client must restart DORA process
4
What is the primary function of a DHCP relay agent?
A
To assign static IP addresses to servers
B
To forward DHCP messages between different subnets
C
To encrypt DHCP traffic for security
D
To cache DNS requests from DHCP clients
Correct Answer: B
A DHCP relay agent forwards DHCP packets between clients and servers when they are not on the same physical subnet (Layer 3 boundary). Since DHCP uses broadcast messages that don't cross routers, the relay agent (typically configured on a router with the "ip helper-address" command) forwards requests to a centralized DHCP server and returns responses to the client.
The relay agent inserts its own IP address (GIADDR - Gateway IP Address) in the DHCP packet so the server knows which scope to use for address allocation.
The relay agent inserts its own IP address (GIADDR - Gateway IP Address) in the DHCP packet so the server knows which scope to use for address allocation.
5
Which DHCP message type does a client send if it detects that the offered IP address is already in use on the network?
A
DHCP NAK
B
DHCP Decline
C
DHCP Release
D
DHCP Inform
Correct Answer: B
The client sends a DHCP Decline message to the server when it detects an IP address conflict (usually through ARP probing or gratuitous ARP). This informs the server that the offered address is already in use by another device, and the server should mark it as unavailable.
Other Message Types:
• DHCP NAK: Sent by server to deny a request
• DHCP Release: Client voluntarily releases IP address
• DHCP Inform: Client requests additional configuration parameters
Other Message Types:
• DHCP NAK: Sent by server to deny a request
• DHCP Release: Client voluntarily releases IP address
• DHCP Inform: Client requests additional configuration parameters
6
What is DHCP snooping?
A
A technique to monitor network bandwidth usage
B
A Layer 2 security feature to prevent rogue DHCP servers
C
A method to encrypt DHCP messages
D
A protocol for DHCP server load balancing
Correct Answer: B
DHCP snooping is a Layer 2 security feature that acts as a firewall between trusted DHCP servers and untrusted clients. It prevents unauthorized DHCP servers (rogue servers) from offering IP addresses to clients by filtering DHCP messages on switch ports.
How it works:
• Switch ports are configured as "trusted" (connected to legitimate DHCP servers) or "untrusted" (connected to clients)
• DHCP server messages (DHCPOFFER, DHCPACK) received on untrusted ports are dropped
• Creates a binding table tracking MAC-IP mappings for additional security features like Dynamic ARP Inspection (DAI)
How it works:
• Switch ports are configured as "trusted" (connected to legitimate DHCP servers) or "untrusted" (connected to clients)
• DHCP server messages (DHCPOFFER, DHCPACK) received on untrusted ports are dropped
• Creates a binding table tracking MAC-IP mappings for additional security features like Dynamic ARP Inspection (DAI)
7
Which of the following is NOT a valid DHCP IP address allocation method?
A
Dynamic allocation
B
Automatic allocation
C
Static allocation (reservation)
D
Random allocation
Correct Answer: D
Random allocation is not a standard DHCP allocation method. The three valid methods are:
1. Dynamic Allocation: IP addresses are assigned from a pool for a limited lease duration; addresses are recycled when leases expire
2. Automatic Allocation: IP addresses are assigned permanently to clients (infinite lease) from the pool
3. Static Allocation (Reservation): Specific IP addresses are reserved for specific MAC addresses, ensuring the same device always receives the same IP
1. Dynamic Allocation: IP addresses are assigned from a pool for a limited lease duration; addresses are recycled when leases expire
2. Automatic Allocation: IP addresses are assigned permanently to clients (infinite lease) from the pool
3. Static Allocation (Reservation): Specific IP addresses are reserved for specific MAC addresses, ensuring the same device always receives the same IP
8
In the DHCP DORA process, why is the DHCP Request message sent as a broadcast even though the client knows the server's IP address?
A
Because the client hasn't configured its IP stack yet
B
To inform all other DHCP servers that their offers were declined
C
Because UDP requires all messages to be broadcast
D
To synchronize with the network gateway
Correct Answer: B
The DHCP Request is broadcast to inform all other DHCP servers on the network that their offers were declined. In environments with multiple DHCP servers, the client may receive multiple DHCPOFFER messages. By broadcasting the DHCP Request (which includes the Server Identifier option 54 specifying the chosen server), all other servers know their offers were rejected and can return those IP addresses to their available pools.
This broadcast behavior ensures efficient IP address management across multiple servers and prevents address reservation conflicts.
This broadcast behavior ensures efficient IP address management across multiple servers and prevents address reservation conflicts.
9
What information is included in the DHCP Option 82 (Agent Information Option) inserted by relay agents?
A
DNS server addresses and domain name
B
Agent Circuit ID and Agent Remote ID
C
Client MAC address and requested IP
D
Lease duration and renewal time
Correct Answer: B
DHCP Option 82 (Agent Information Option) contains sub-options including:
• Agent Circuit ID: Identifies the specific circuit/interface on which the DHCP request was received (e.g., VLAN and port information)
• Agent Remote ID: Provides additional identification of the relay agent or client location
• Link Selection: Helps the server select the correct scope
• Server Identifier Override: Allows the relay to specify which server should respond
This information helps DHCP servers make intelligent IP allocation decisions and enables policy-based address assignment based on physical location.
• Agent Circuit ID: Identifies the specific circuit/interface on which the DHCP request was received (e.g., VLAN and port information)
• Agent Remote ID: Provides additional identification of the relay agent or client location
• Link Selection: Helps the server select the correct scope
• Server Identifier Override: Allows the relay to specify which server should respond
This information helps DHCP servers make intelligent IP allocation decisions and enables policy-based address assignment based on physical location.
10
Which of the following parameters can be provided by a DHCP server to clients?
A
IP address, subnet mask, default gateway, and DNS servers
B
Only IP address and MAC address
C
Routing tables and firewall rules
D
Wireless encryption keys only
Correct Answer: A
DHCP servers can provide comprehensive network configuration parameters including:
• IP Address (Option 50/51)
• Subnet Mask (Option 1)
• Default Gateway/Router (Option 3)
• DNS Servers (Option 6)
• Domain Name (Option 15)
• WINS Servers (Option 44)
• NTP Servers (Option 42)
• TFTP Server (Option 66/150)
• Lease Duration (Option 51)
These options are defined in RFC 2132 and allow for complete automated network configuration.
• IP Address (Option 50/51)
• Subnet Mask (Option 1)
• Default Gateway/Router (Option 3)
• DNS Servers (Option 6)
• Domain Name (Option 15)
• WINS Servers (Option 44)
• NTP Servers (Option 42)
• TFTP Server (Option 66/150)
• Lease Duration (Option 51)
These options are defined in RFC 2132 and allow for complete automated network configuration.
11
What happens when a DHCP client reaches 87.5% of its lease time (T2) without successfully renewing?
A
The client immediately releases the IP address
B
The client broadcasts a DHCPREQUEST to any available server (rebinding)
C
The client switches to a static IP configuration
D
The client reduces its network bandwidth by 50%
Correct Answer: B
At 87.5% of the lease time (T2), the client enters the rebinding state. If the original server hasn't responded to renewal attempts, the client broadcasts a DHCPREQUEST to any available DHCP server on the network, not just the original one.
Rebinding Process:
• Client accepts lease extension from any server that responds with DHCPACK
• If no server responds by 100% lease expiration, the client must stop using the IP and restart the full DORA process
• During rebinding, the client continues to use its current IP while seeking renewal
Rebinding Process:
• Client accepts lease extension from any server that responds with DHCPACK
• If no server responds by 100% lease expiration, the client must stop using the IP and restart the full DORA process
• During rebinding, the client continues to use its current IP while seeking renewal
12
Can DHCP distinguish between authorized and unauthorized devices based on MAC addresses to prevent network access?
A
Yes, DHCP inherently blocks unauthorized MAC addresses by default
B
No, DHCP cannot distinguish between permanent and user-supplied MAC addresses
C
Yes, but only when DHCP snooping is disabled
D
Only if the client uses DHCPv6 instead of DHCPv4
Correct Answer: B
No, DHCP alone cannot prevent unauthorized network access because it cannot reliably distinguish between a device's permanent MAC address and a user-supplied (spoofed) MAC address.
Limitations:
• DHCP will offer IP addresses to any client that sends a valid DHCPDISCOVER, regardless of authorization
• MAC address spoofing is trivial on most operating systems
• DHCP is designed for convenience, not security
Solutions:
• Use 802.1X port-based authentication with RADIUS servers for access control
• Implement DHCP snooping + Dynamic ARP Inspection (DAI) to prevent attacks
• Combine with MAC address filtering on switches (though this is administratively intensive)
Limitations:
• DHCP will offer IP addresses to any client that sends a valid DHCPDISCOVER, regardless of authorization
• MAC address spoofing is trivial on most operating systems
• DHCP is designed for convenience, not security
Solutions:
• Use 802.1X port-based authentication with RADIUS servers for access control
• Implement DHCP snooping + Dynamic ARP Inspection (DAI) to prevent attacks
• Combine with MAC address filtering on switches (though this is administratively intensive)
0/12
Quiz Completed!
You answered 0 out of 12 questions correctly.