zNetLaB › Guided labs › Security
DHCP snooping — a rogue server answers first
Security Intermediate 4 devices 5 checked tasks 100 points Plan lab
Somebody plugged a router into a desk port and it is handing out addresses — with itself as the default gateway, which makes every victim’s traffic pass through the attacker. Turn on DHCP snooping, trust only the port that leads to the real server, and prove the victim leases from the right one. You build it in a browser, type real commands at each device, and every task below is
checked against the running configuration — so you find out it is wrong before anybody else does.
Open this lab in the simulator
The simulator runs in your browser with nothing to install. This lab is part of the full simulator: open it free for 7 days with a new account, then with a plan. It needs an account, which keeps your progress.
The scenario
Somebody plugged a router into a desk port and it is handing out addresses — with itself as the default gateway, which makes every victim’s traffic pass through the attacker. Turn on DHCP snooping, trust only the port that leads to the real server, and prove the victim leases from the right one.
Your role: a security engineer. Level: Intermediate Done when: all 5 goals show as passed (100 points).
Network status
Devices: 1 switch, 2 routers, 1 PC, cabled as drawn. No Layer 1 or Layer 2 faults: every link is connected and up. GW-DHCP starts with addresses (G0/0 10.10.0.1/24) and a DHCP pool already configured. Rogue-DHCP starts with addresses (G0/0 10.10.0.66/24) and a DHCP pool already configured. SW-Access starts with an empty configuration.
Known problems
None: nothing is misconfigured. The network is simply not finished: what the goals list is what you have to build or secure.
Goals
DHCP snooping is on, for the VLAN the desks are in (20 pts) The port toward the real DHCP server is trusted (20 pts) The rogue’s port is NOT trusted (20 pts) The victim leased its address from the real server (gateway 10.10.0.1) (25 pts) The switch has a snooping binding for the victim (15 pts)
The activity, in order
DHCP snooping is on, for the VLAN the desks are in The configuration of SW-Access must contain the line: ip dhcp snooping vlan 1. Type it in the right mode (global, interface or line) and check it appears.Why: This is the task that checks your configuration directly: the line must really be there, not just look right. Verify with: show running-config The port toward the real DHCP server is trusted The configuration of SW-Access must contain the line: interface FastEthernet0/24[^!]*ip dhcp snooping trust. Type it in the right mode (global, interface or line) and check it appears.Why: This is the task that checks your configuration directly: the line must really be there, not just look right. Verify with: show running-config The rogue’s port is NOT trusted The configuration of SW-Access must contain the line: . Type it in the right mode (global, interface or line) and check it appears.Why: This is the task that checks your configuration directly: the line must really be there, not just look right. Verify with: show running-config The victim leased its address from the real server (gateway 10.10.0.1) On Victim, run ipconfig and read the output: it must show Default Gateway : 10.10.0.1.Why: Reading a show command is the core skill of troubleshooting: the output is the truth, not your configuration. Verify with: ipconfig The switch has a snooping binding for the victim On SW-Access, run show ip dhcp snooping binding and read the output: it must show 10.10.0.\d+.Why: Reading a show command is the core skill of troubleshooting: the output is the truth, not your configuration. Verify with: show ip dhcp snooping binding
Tips
Work in the order given: later goals depend on the earlier ones. After every change, run the verify command before moving on; do not guess. Stuck? Read the verify output first. It names the interface, neighbour or route that is wrong. Common mistake: Trusting every port “to make it work” — the rogue is then trusted too Common mistake: Enabling snooping on a VLAN number the ports are not in (nothing is protected) Common mistake: Forgetting to trust the uplink, so the real server’s OFFERs are dropped and nobody gets an address
Why this matters
DHCP has no authentication: whoever answers a DISCOVER first wins. A rogue server hands out a gateway and DNS server of its own, and every victim’s traffic now passes through the attacker. Snooping makes the switch decide which ports are allowed to answer.
What you will be able to do
Enable DHCP snooping globally and per VLAN
Mark only the uplink to the real server as trusted
Read the snooping binding table and say what it is used for (DAI, IP Source Guard)
The network
Catalyst 2960-24TT, ISR 2911, PC — 4 devices in all, already cabled.
Fa0/1 Fa0 Fa0/2 Gi0/0 10.10.0.66/24 Fa0/24 Gi0/0 10.10.0.1/24 SW-Access GW-DHCP Rogue-DHCP Victim Drawn from this lab: devices, cables, ports and the addresses already set.
Device Model Address already set
SW-Access Catalyst 2960-24TT configure it
GW-DHCP ISR 2911 configure it
Rogue-DHCP ISR 2911 configure it
Victim PC configure it
Cabling
SW-Access Fa0/1 ↔ Victim Fa0
SW-Access Fa0/2 ↔ Rogue-DHCP Gi0/0
SW-Access Fa0/24 ↔ GW-DHCP Gi0/0
What is configured at the start
These are already configured when the lab opens — including, where this is a troubleshooting lab, the fault itself:
GW-DHCP interface g0/0
ip address 10.10.0.1 255.255.255.0
no shutdown
exit
ip dhcp excluded-address 10.10.0.1 10.10.0.9
ip dhcp pool LAN
network 10.10.0.0 255.255.255.0
default-router 10.10.0.1
dns-server 10.10.0.1
exit
Rogue-DHCP interface g0/0
ip address 10.10.0.66 255.255.255.0
no shutdown
exit
ip dhcp excluded-address 10.10.0.60 10.10.0.99
ip dhcp pool EVIL
network 10.10.0.0 255.255.255.0
default-router 10.10.0.66
dns-server 10.10.0.66
exit
Tasks, and how each one is checked
Every task is decided by reading the live network — a neighbour in FULL, a ping that succeeds, a line in the running configuration — not by looking for a keyword you typed. The same command shows you what the lab sees.
# Task Pts How to verify it yourself
1 DHCP snooping is on, for the VLAN the desks are in 20 On SW-Access: show running-config contains the line(s) matching ip dhcp snooping vlan 1.
2 The port toward the real DHCP server is trusted 20 On SW-Access: show running-config contains the line(s) matching interface FastEthernet0/24 … ip dhcp snooping trust.
3 The rogue’s port is NOT trusted 20 On SW-Access: show running-config contains the line(s) matching interface FastEthernet0/2[^!0-9] … ip dhcp snooping trust must not .
4 The victim leased its address from the real server (gateway 10.10.0.1) 25 On Victim: ipconfig output matches Default Gateway[ .]*: 10\.10\.0\.1\b.
5 The switch has a snooping binding for the victim 15 On SW-Access: show ip dhcp snooping binding output matches 10\.10\.0\.\d+.
Stuck? Ask the coach
Tell the coach what you see or what you tried. It gives you a hint, not the answer, the way a senior engineer would. Included with a free trial or any plan.
Ask the coach
Common mistakes
Trusting every port “to make it work” — the rogue is then trusted too
Enabling snooping on a VLAN number the ports are not in (nothing is protected)
Forgetting to trust the uplink, so the real server’s OFFERs are dropped and nobody gets an address
Reference solution
Try it yourself first — the lab checks your work either way. This is one configuration that makes every task pass, device by device:
SW-Access ip dhcp snooping
ip dhcp snooping vlan 1
interface Fa0/24
ip dhcp snooping trust
exit
Victim ipconfig /release
ipconfig /renew
Where this is examined
CCNA 200-301 (security fundamentals), CCNP ENCOR/SCOR (Layer 2 security), Security+ (rogue DHCP, on-path attacks).
This lab practises these topics in the zNetLaB certification courses:
Port security, DHCP snooping, DAI — CCNA · Security Fundamentals
AAA, uRPF, CoPP, IPv6 first-hop security — CCNP Enterprise · ENARSI · Infrastructure Security
CoPP, uRPF, IPv6 FHS, 802.1X, ZBFW — CCIE Enterprise Infrastructure · Infrastructure Security and Services
Attacks and their defences (spoofing, flooding, rogue devices) — CompTIA Network+ · Network Security
Network attacks: spoofing, flooding, rogue devices, VLAN hopping — CompTIA Security+ · Threats, Vulnerabilities and Mitigations
Common threats, vulnerabilities and attack techniques — CCNP Security Core · Security Concepts
Sniffing and man-in-the-middle: rogue DHCP, ARP spoofing — Ethical Hacking (network level) · Network Attacks and Defences
Related labs
Where to start
The lessons are open to everyone, all guided labs are listed by track, and
plans explains what is free and what is not.
CCNA®, CCNP® and Cisco® are trademarks of Cisco Systems, Inc. zNetLaB is not affiliated with or endorsed by Cisco.