DHCP Spoofing, Starvation & Snooping Explained

x32x01
  • by x32x01 ||
DHCP is responsible for automatically assigning IP addresses and other network settings to devices. But what happens when an attacker connects a rogue DHCP server to your network?
An attacker can exploit DHCP to distribute malicious network configurations, redirect user traffic, or exhaust the available IP address pool.
Two important attacks to understand are DHCP Starvation and DHCP Spoofing.
Let's explore how these attacks work, how they can be combined, and how DHCP Snooping helps protect your network.



1. What Is a DHCP Starvation Attack?​

A DHCP Starvation attack attempts to exhaust the available IP addresses on a legitimate DHCP server.
Normally, when a device joins a network, it requests an IP address through a process known as DORA:
  1. Discover: The client searches for an available DHCP server.
  2. Offer: The DHCP server offers an available IP address.
  3. Request: The client requests the offered address.
  4. Acknowledgment (ACK): The server confirms the IP address lease.
During a DHCP Starvation attack, an attacker generates a large number of DHCP requests, often using spoofed MAC addresses.
The goal is to consume the available IP address pool.
Once the pool is exhausted, legitimate devices may be unable to obtain an IP address from the authorized DHCP server.
Important: DHCP Starvation does not automatically disable the legitimate DHCP server or give the attacker exclusive control over DHCP. It primarily creates an availability problem that can help facilitate another attack.



2. What Is a DHCP Spoofing Attack?​

DHCP Spoofing occurs when an unauthorized DHCP server, commonly called a Rogue DHCP Server, responds to clients with network configuration information.
Unlike a legitimate DHCP server, the rogue server may provide malicious settings, including:
  • An attacker-controlled default gateway.
  • A malicious DNS server.
  • Incorrect IP configuration.
  • Network settings designed to redirect traffic.
The attacker may combine DHCP Starvation with DHCP Spoofing to increase the likelihood that clients accept configuration information from the rogue server.

How DHCP Spoofing Can Lead to a Man-in-the-Middle Attack​

Consider a network containing a legitimate DHCP server, a router, several client devices, and an attacker.
A possible attack scenario looks like this:
  1. The attacker connects an unauthorized device to the local network.
  2. The attacker attempts to exhaust the legitimate DHCP server's address pool.
  3. The attacker introduces a rogue DHCP server.
  4. A client broadcasts a DHCP Discover message.
  5. The rogue server responds with an IP configuration containing the attacker's IP address as the default gateway.
  6. If the client accepts this configuration, its traffic intended for other networks may be sent through the attacker's device.
The attacker can then attempt to forward the traffic to the legitimate router.
The resulting traffic path may look like this:
Client → Attacker (Fake Gateway) → Legitimate Router → Internet
This can create a Man-in-the-Middle (MITM) position, allowing the attacker to intercept or manipulate traffic passing through the malicious gateway.
However, this requires the attacker to successfully receive and forward the traffic. DHCP Spoofing alone does not guarantee visibility into encrypted application data.



3. What Is DHCP Snooping?​

DHCP Snooping is a Layer 2 security feature that helps prevent unauthorized DHCP servers from distributing IP configuration information to network clients.
It is commonly available on managed switches and works by inspecting DHCP messages and distinguishing between trusted and untrusted switch ports.

The basic idea is simple:
Only authorized DHCP servers should be allowed to send DHCP server responses to clients.
DHCP Snooping achieves this by classifying switch interfaces into two categories.
Port TypeDescription
Trusted PortAllows DHCP server responses from authorized sources
Untrusted PortRestricts DHCP server messages originating from unauthorized devices
By default, DHCP Snooping-enabled interfaces are generally treated as untrusted unless explicitly configured otherwise.

Trusted vs. Untrusted Ports​

Imagine the following network:
Legitimate DHCP Server → Switch → Client Devices
The switch port connected to the authorized DHCP server, or the appropriate uplink toward it, should be configured as trusted.
Ports connected to end-user devices should remain untrusted.
When a client sends a DHCP Discover message, the switch can forward that request toward the legitimate DHCP server.
However, if an attacker connects a rogue DHCP server to an untrusted port and attempts to send DHCP Offer or ACK messages, DHCP Snooping blocks those unauthorized server responses.
Important: DHCP Snooping does not simply block all DHCP Discover packets from user ports. Legitimate clients must still be able to request IP addresses.
The protection focuses on preventing unauthorized DHCP server responses and validating DHCP traffic according to the switch's security rules.



4. How to Configure DHCP Snooping on a Cisco Switch​

Let's look at a basic Cisco IOS configuration example.
Assume the following network setup:
  • VLAN 10 contains the client devices.
  • GigabitEthernet0/1 is the uplink toward the legitimate DHCP server.
  • GigabitEthernet0/2 is connected to an end-user device.
The following configuration illustrates how DHCP Snooping can be enabled.

Step 1: Enable DHCP Snooping Globally
Bash:
Switch(config)# ip dhcp snooping
This enables the DHCP Snooping feature on the switch.

Step 2: Enable DHCP Snooping for VLAN 10
Bash:
Switch(config)# ip dhcp snooping vlan 10
DHCP Snooping must be enabled for the VLANs you want to protect.

Step 3: Configure the Trusted Port
Bash:
Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# ip dhcp snooping trust
This interface is the authorized path toward the legitimate DHCP server.
DHCP server responses received through this trusted interface are permitted.
Only configure interfaces as trusted when they genuinely lead toward authorized DHCP infrastructure.

Step 4: Configure DHCP Rate Limiting
DHCP Snooping can also limit the rate of DHCP packets received on an interface.
For example:
Bash:
Switch(config)# interface GigabitEthernet0/2
Switch(config-if)# ip dhcp snooping limit rate 10
This example configures a limit of 10 DHCP packets per second on the interface.
If the configured threshold is exceeded, supported Cisco platforms may place the interface into an error-disabled state.
This helps reduce the risk of DHCP packet flooding and certain DHCP Starvation attempts.
The appropriate rate limit depends on the network environment, switch platform, and number of legitimate DHCP clients connected to the interface.
Avoid applying an unnecessarily low limit to ports serving multiple devices.

Step 5: Verify the Configuration
Use the following command to inspect the DHCP Snooping configuration:
Bash:
Switch# show ip dhcp snooping
To inspect the DHCP Snooping binding database, use:
Bash:
Switch# show ip dhcp snooping binding
The binding database can contain information such as client MAC addresses, assigned IP addresses, VLANs, lease times, and interfaces.
These bindings can also support additional security features, including Dynamic ARP Inspection and IP Source Guard.
Note that command availability and behavior may vary between Cisco platforms and software versions.



5. DHCP Spoofing vs. DHCP Starvation​

Although these attacks are related, they have different objectives.
FeatureDHCP StarvationDHCP Spoofing
Main objectiveExhaust available DHCP addressesDistribute unauthorized DHCP configurations
Common techniqueFlooding DHCP requestsIntroducing a rogue DHCP server
Primary impactLegitimate clients may fail to obtain IP addressesClients may receive malicious network settings
Potential consequenceDenial of Service (DoS)Traffic redirection or MITM
Defensive measureDHCP rate limiting and additional access controlsDHCP Snooping with properly configured trusted ports
An attacker may combine both techniques, but DHCP Spoofing does not require DHCP Starvation to succeed.



6. Common DHCP Snooping Configuration Mistakes​

Even when DHCP Snooping is enabled, incorrect configuration can cause security issues or disrupt legitimate network connectivity.
Watch out for these common mistakes:
  • Trusting user-facing ports: This may allow an unauthorized DHCP server to distribute network settings.
  • Forgetting to enable DHCP Snooping on the correct VLAN: Global configuration alone may not provide the intended protection.
  • Applying overly restrictive rate limits: Legitimate DHCP traffic may trigger an interface shutdown.
  • Forgetting DHCP relay and uplink requirements: DHCP traffic must still be able to reach the authorized server.
  • Ignoring DHCP Option 82 compatibility: Some DHCP environments require additional configuration to handle relay-agent information correctly.
Always test DHCP Snooping in a controlled environment before deploying it across a production network.



7. Final Thoughts​

DHCP Starvation and DHCP Spoofing target different weaknesses in the DHCP process.
Starvation attempts to exhaust available IP addresses, while Spoofing attempts to distribute unauthorized network configurations.
When combined, these attacks can disrupt connectivity and potentially redirect client traffic through an attacker-controlled gateway.
DHCP Snooping is one of the most important switch-level defenses against rogue DHCP servers.
By configuring trusted interfaces correctly, keeping client-facing ports untrusted, and applying appropriate DHCP rate limits, network administrators can significantly reduce the risks associated with these attacks.
For stronger protection, DHCP Snooping should be combined with additional network security controls rather than treated as a complete defense against every DHCP-related attack.



Frequently Asked Questions​

------------------

Can DHCP Snooping prevent DHCP Starvation?​

DHCP Snooping can help mitigate certain starvation attacks when appropriate DHCP rate limiting is configured. However, it does not guarantee complete protection against every starvation technique.

Does DHCP Snooping block DHCP Discover messages?​

No. Legitimate DHCP Discover messages from clients are generally allowed. DHCP Snooping primarily restricts unauthorized server responses and validates DHCP traffic.

What happens if a rogue DHCP server is connected to an untrusted port?​

DHCP Snooping blocks unauthorized DHCP server messages, such as DHCP Offer and DHCP ACK, received through that interface.

Should every switch port be configured as trusted?​

No. Only interfaces that lead toward authorized DHCP servers should be trusted. End-user-facing interfaces should normally remain untrusted.
 
Similar threads
x32x01
Replies
0
Views
168
x32x01
x32x01
x32x01
Replies
0
Views
142
x32x01
x32x01
x32x01
Replies
0
Views
140
x32x01
x32x01
x32x01
Replies
0
Views
139
x32x01
x32x01
Register & Login Faster
Forgot your password?
Forum Statistics
Threads
1,151
Messages
1,158
Members
16
Latest Member
b_a_s_m_a_l_a7
Back
Top