Chapter 4 · CCNA 200-301 Study Guide · Based on the CCNA 200-301 v2.0 exam blueprint (effective February 2027)

Chapter 4: IP Services

Routers and switches forward packets, but a usable network needs more than forwarding. Somebody has to hand out IP addresses, turn names into addresses, share one public address among many private hosts, keep every clock in agreement, monitor device health, prioritize a voice call over a file download, and move IOS images around. Those jobs belong to the IP services: DHCP, DNS, NAT, NTP, SNMP, QoS, FTP, and TFTP. The 200-301 exam tests all of them, usually with scenario questions. This chapter teaches each service the way it behaves on a real network, with the CLI you will use on the job.

4.1 DHCP — Automatic Address Assignment

Hand-configuring addresses works for a dozen servers, not for a thousand laptops and phones that come and go. DHCP automates it: the client asks, the server answers, and the client receives an IP address, subnet mask, default gateway, DNS servers, and lease length in one exchange.

The DORA Process

A new client completes a four-message exchange with the server. Know each message's name, order, and direction:

  1. Discover — The client has no address, so it broadcasts from 0.0.0.0 to 255.255.255.255 (UDP: client port 68, server port 67). "Is there a DHCP server out there?"
  2. Offer — Each server that hears the Discover replies with an available address and lease terms.
  3. Request — The client picks one offer and announces its choice — as a broadcast, so the servers it did not pick can recycle their offered addresses.
  4. Acknowledge — The chosen server confirms the lease.
Key point

DORA = Discover, Offer, Request, Acknowledge. Discover and Request are broadcasts; Offer and Acknowledge are normally unicast. The exchange runs over UDP, ports 67 (server) and 68 (client).

Exam tip

Cisco loves asking why the Request is broadcast. Answer: so the servers whose offers were declined hear the decision and can put those addresses back in the pool.

Leases expire. The client tries to renew at 50% of the lease (T1 timer) by unicasting to the original server, and enters rebinding at 87.5% (T2), broadcasting to any server if the original never answered. Total silence means starting over at Discover.

DHCP Relay and the Helper Address

The Discover is a broadcast, and routers do not forward broadcasts — so how does a client reach a server three subnets away? The local router acts as a relay agent. Configure ip helper-address on the client-facing interface, pointing at the server's unicast address. The router converts the broadcast to unicast (stamping the client's subnet in the GIADDR field so the server picks the right pool) and relays the reply back.

Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip helper-address 10.1.1.5
Key point

Without ip helper-address, a DHCP broadcast dies at the router. One helper address also forwards other UDP broadcasts (TFTP, DNS, NTP) — a favorite exam detail.

Building a DHCP Pool on a Router

A Cisco router can be the server. Exclude addresses that must stay static (router interfaces, servers, printers), then define the pool:

Router(config)# ip dhcp excluded-address 192.168.10.1 192.168.10.10
Router(config)# ip dhcp pool OFFICE-LAN
Router(dhcp-config)# network 192.168.10.0 255.255.255.0
Router(dhcp-config)# default-router 192.168.10.1
Router(dhcp-config)# dns-server 8.8.8.8 8.8.4.4
Router(dhcp-config)# lease 7

Verify with show ip dhcp binding and show ip dhcp pool.

Worked calculation

DHCP pool sizing. A branch LAN uses 192.168.20.0/24. The router is .1, two servers use .2–.3, and printers keep .240–.249. How many addresses can DHCP hand out?

Step 1: A /24 holds 2^8 = 256 addresses. Step 2: Subtract network (.0) and broadcast (.255): 256 − 2 = 254 usable. Step 3: Subtract static addresses: .1 + .2–.3 + .240–.249 = 13. Step 4: 254 − 13 = 241.

Final answer: 241 addresses (exclude 192.168.20.1–192.168.20.3 and 192.168.20.240–192.168.20.249).

Try it yourself

A workstation's lease shows 4 hours, but the pool is configured with lease 7. Give one likely reason.

Show solution

lease 7 means 7 days, not hours — the pool is fine. The 4-hour lease probably came from a different DHCP server (a rogue server, or a second pool the client reached first), or the lease length was changed after this client bound and it has not renewed yet. Remember: lease takes days, hours, minutes — lease 0 4 0 is 4 hours.

DHCP Snooping: Stopping Rogue Servers

Any device can claim to be a DHCP server — an attacker, or a misconfigured home router someone plugged in — and hand out a bogus gateway to redirect traffic. DHCP snooping is the Layer 2 defense. The switch marks each port trusted (facing the real server) or untrusted (facing users; the default). DHCP server messages (Offer, Acknowledge) arriving on an untrusted port are dropped.

Snooping also builds a binding table — MAC, IP, lease time, VLAN, interface per client — which Dynamic ARP Inspection and IP Source Guard reuse to catch spoofing.

Switch(config)# ip dhcp snooping
Switch(config)# ip dhcp snooping vlan 10
Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# ip dhcp snooping trust
Exam tip

Clients get nothing after snooping is enabled? The classic cause is forgetting to mark the uplink toward the DHCP server as trusted. Untrusted is the default on every port.

close-up of a Cisco switch front panel with Ethernet cables in numbered ports
close-up of a Cisco switch front panel with Ethernet cables in numbered portsPhoto: Brett Sayles via https://www.pexels.com/photo/2881232/

4.2 DNS — Names Into Addresses

DNS translates human names into IP addresses through a distributed hierarchy. Your PC sends a recursive query to its resolver ("do the work, bring me the answer"); the resolver walks the tree iteratively: root servers → TLD servers → the domain's authoritative server. Every level caches, so the second lookup is instant. DNS normally uses UDP port 53, switching to TCP 53 for zone transfers and oversized responses.

Record Types You Must Know

RecordPurpose
AHostname → IPv4 address
AAAAHostname → IPv6 address
CNAMEAlias: one name → another name
MXMail exchanger for a domain
PTRReverse lookup: IP → hostname
NS / SOAName servers and zone authority
Key point

A = IPv4, AAAA = IPv6, CNAME = alias, MX = mail, PTR = reverse. A question about email delivery points at MX almost every time.

Enterprises run internal DNS for private names and forward internet queries upstream. Cisco devices use DNS too: ip name-server 8.8.8.8 lets you ping hostnames from the CLI (lookup is on by default via ip domain-lookup). If the router hangs "resolving" every typo, break out with Ctrl+Shift+6 — or disable lookup in the lab with no ip domain-lookup.

Try it yourself

A spam filter rejects incoming mail, logging "no PTR record for sender." The mail admin insists the MX record is correct. Who is right?

Show solution

Both, about different things. The MX record routes mail to the domain — it can be perfect. The PTR record is the reverse lookup (IP → hostname) of the sending server's IP, which receivers check to fight spam. The fix belongs to whoever owns the sending IP block: create the PTR record there. Lesson: MX is forward mail routing; PTR is reverse identity.

4.3 NAT — Stretching IPv4

Public IPv4 addresses ran out years ago. NAT lets a whole private network share one (or a few) public addresses. Private ranges — 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 — are not routable on the internet, so the edge router rewrites addresses at the boundary.

The Four NAT Terms

TermMeaning
Inside localPrivate address as the internal host knows itself (192.168.1.10)
Inside globalPublic address representing that host to the outside (203.0.113.5)
Outside localExternal host's address as seen from inside (usually its real address)
Outside globalExternal host's real public address (198.51.100.77)
Key point

"Inside/outside" = which side of your router the host sits on. "Local/global" = whether you view the address from inside your network or from the internet. Inside local is the only private one in a basic setup.

Static NAT, Dynamic NAT, and PAT

TypeMappingUse case
Static NATOne private ↔ one public, permanent, bidirectionalA web server outsiders must reach at a fixed public IP
Dynamic NATPrivate ↔ a pool of public addresses, one-to-one but temporarySeveral public IPs shared by fewer simultaneous users
PAT (overload)Many private → one public address, separated by port numbersA branch router sharing a single ISP address

PAT is the home-router trick: TCP/UDP conversations are unique by port, so the router multiplexes hundreds of inside hosts onto one public IP. Hosts 192.168.1.10:53421 and 192.168.1.11:53421 both leave as 203.0.113.5, rewritten to 203.0.113.5:1024 and 203.0.113.5:1025. Return traffic is demultiplexed by port.

Worked calculation

PAT walkthrough. A branch router's outside address is 203.0.113.9. Three inside hosts open web sessions at once. Build the table:

Step 1: Host A (10.1.1.5:49152) → router picks unused global port 1024: 10.1.1.5:49152 → 203.0.113.9:1024. Step 2: Host B (10.1.1.6:49152) → must differ: port 1025: 10.1.1.6:49152 → 203.0.113.9:1025. Step 3: Host B opens a second tab (10.1.1.6:49153) → port 1026: 10.1.1.6:49153 → 203.0.113.9:1026. Step 4: Return traffic to 203.0.113.9:1025 is rewritten to 10.1.1.6:49152 via the table in reverse.

Final answer: three conversations share 203.0.113.9, kept distinct by global ports 1024–1026. Port-multiplexing is the entire trick of PAT.

NAT Order of Operations

Exam tip

Inside-to-outside: NAT first, then route — the source must become the inside global address before the forwarding decision. Outside-to-inside: route first, then NAT — the router forwards on the public destination, then rewrites it to the inside local address. Cisco asks "which happens first" about NAT more than anything else in this topic.

Configuring NAT and PAT

Mark each interface's role, then define the rule:

Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip nat inside
Router(config-if)# interface GigabitEthernet0/1
Router(config-if)# ip nat outside
Router(config)# access-list 1 permit 192.168.1.0 0.0.0.255
Router(config)# ip nat inside source list 1 interface GigabitEthernet0/1 overload

That last line is the workhorse: everything matching ACL 1 is PAT-translated to the outside interface's address. For a pool, add ip nat pool PUBLIC 203.0.113.10 203.0.113.20 netmask 255.255.255.0 and reference it (with overload for PAT, without for dynamic NAT). Static NAT is one line: ip nat inside source static 192.168.1.10 203.0.113.5. Verify with show ip nat translations and show ip nat statistics.

Try it yourself

show ip nat translations shows tcp 203.0.113.5:80 192.168.1.10:80 and tcp 203.0.113.5:443 192.168.1.11:443. Static, dynamic, or PAT — and how do you know?

Show solution

Static NAT. PAT multiplexes many hosts onto one address with ephemeral, varying ports; dynamic NAT draws from a pool. Here one public IP maps fixed service ports (80, 443) to fixed inside servers — a permanent one-to-one service mapping, i.e., static NAT port-forwarding to publish internal servers.

4.4 NTP — One Clock for the Whole Network

Reconstructing an incident from five devices' logs is fiction if their clocks disagree. NTP synchronizes clocks network-wide over UDP port 123. Time sources form strata: stratum 0 is the reference clock itself (atomic clock, GPS — never on the network); stratum 1 syncs directly to it, stratum 2 to stratum 1, down to 15. Stratum 16 means unsynchronized. Clients always sync to a lower (more authoritative) stratum number.

Router(config)# ntp server 10.1.1.1
Router(config)# ntp master 3

The first line points at a server; the second makes this router a server advertising stratum 3. Check with show ntp status and show ntp associations.

Key point

Beyond logging, drifting clocks silently break certificate validation, Kerberos logins, and scheduled jobs. "Nobody can log in and nothing changed" is a time problem more often than beginners expect.

4.5 SNMP — Monitoring the Network

SNMP lets one station watch hundreds of devices. Three roles: the manager (NMS) polls and receives alerts; the agent (software on each device) answers; the MIB (Management Information Base) is the agent's database of manageable objects — interface counters, CPU, temperature — each addressed by an OID. Routine polling uses UDP 161; urgent agent-initiated alerts (traps) go to the manager on UDP 162.

SNMP Versions

v1v2cv3
AuthenticationCommunity string, plaintextCommunity string, plaintextUsername + auth (MD5/SHA)
EncryptionNoneNonePrivacy (DES/AES)
Bulk retrievalNoYes (GetBulk)Yes
Security levels——noAuthNoPriv / authNoPriv / authPriv
Exam tip

The exam contrast is always the same: v1/v2c use community strings ("public"/"private") in cleartext; v3 adds real authentication and encryption, and authPriv is the only acceptable "secure" answer. Acknowledged notifications are informs (v2c/v3), not traps.

Router(config)# snmp-server group NETADMIN v3 priv
Router(config)# snmp-server user monitor1 NETADMIN v3 auth sha AuthPass!23 priv aes 128 PrivPass!23
Router(config)# snmp-server host 192.168.100.50 version 3 priv monitor1
Router(config)# snmp-server enable traps
network operations center with a wall of monitors showing device dashboards
network operations center with a wall of monitors showing device dashboardsPhoto: Brett Sayles via https://www.pexels.com/photo/5408005/

4.6 QoS Concepts — Treating Traffic Unequally (On Purpose)

Best-effort delivery treats every packet alike — fine for email, fatal for voice, where 200 ms of extra delay, variation in delay (jitter), or dropped packets (loss) ruins a call. QoS prioritizes traffic that cannot wait.

Classification and Marking

First recognize traffic classes (classification), then label packets so downstream devices honor the decision without re-classifying (marking):

Marking happens at the trust boundary — typically the access switch, which trusts an IP phone's markings but re-marks anything from a PC port.

Key point

Classification = identifying traffic. Marking = labeling it (DSCP at Layer 3, CoS at Layer 2). The exam swaps these two words to see if you notice.

Congestion Management vs. Avoidance

MechanismJobExamples
Congestion management (queuing)Which packet goes next when the link is fullFIFO, Priority Queuing, WFQ, CBWFQ, LLQ
Congestion avoidanceDrops packets early so TCP senders slow down before the queue overflowsRED, WRED

LLQ is the voice answer: a strict-priority queue for EF-marked voice on top of CBWFQ — voice jumps the line without starving everything else. WRED drops lower-priority TCP packets randomly before the queue fills; the randomness prevents global synchronization, where all TCP flows back off and surge in lockstep.

Policing vs. Shaping

PolicingShaping
Excess trafficDropped (or remarked down)Buffered and delayed
Extra memory neededNoYes
Adds delayNoYes
Exam tip

One-word discriminator: policing drops, shaping delays. A buffer holding packets for later = shaping. Packets disappearing or marked down = policing.

Try it yourself

Voice stutters on a 10 Mbps branch link whenever a file transfer starts. The engineer guarantees voice transmits first and caps the transfer at 6 Mbps by discarding anything above it. Name the mechanisms.

Show solution

LLQ (priority queue for EF-marked voice) plus policing on the file-transfer class — the excess is discarded, and discarding is policing's signature; shaping would have queued it. DSCP classification underpins both.

4.7 FTP and TFTP — Moving Files Around

Engineers constantly move IOS images and config files. Two protocols do the hauling:

Key point

No OS loaded yet (bootloader, PXE)? The answer is TFTP — FTP's login cannot work there. Credentials or large reliable transfers? FTP.

server room aisle with racks of equipment and bundled cabling
server room aisle with racks of equipment and bundled cablingPhoto: Brett Sayles via https://www.pexels.com/photo/5408005/

End-of-Chapter Test

Q1 A DHCP client has received an Offer and wants to accept it. Which message does it send, and why is it a broadcast?

Q2 Clients on 192.168.5.0/24 need addresses from a DHCP server at 10.10.10.10 on another subnet. What goes on the client-facing interface?

Q3 After enabling DHCP snooping, wired clients stop getting addresses; wireless clients on another switch work fine. Most likely cause?

Q4 Which DNS record must exist for a company to receive email for its domain?

Q5 Translations show tcp 203.0.113.8:23110 10.4.4.4:443 and tcp 203.0.113.8:23111 10.4.4.9:443. Which is true?

Q6 For inside-to-outside traffic, what is the correct order of NAT and routing?

Q7 show ntp status reports stratum 16. What does it mean?

Q8 Monitoring credentials must never cross the wire in cleartext and polled data must be encrypted. Which meets the requirement?

Q9 Excess HTTP traffic should be buffered and sent later, smoothing bursts toward a slower WAN link. Which mechanism?

Q10 A switch must download an IOS image while running only its bootloader, with no username database. Which protocol and port?

---

ANSWERS

Answer key

Q1: B — The client sends a Request to accept. Broadcast lets every offering server hear the decision so the losers recycle their addresses. Discover (A) starts the exchange; the Acknowledge (C) comes from the server.
Q2: B — Routers do not forward broadcasts, so ip helper-address 10.10.10.10 on the client-facing interface makes the router a relay agent. A uses the wrong (server-side) network; C excludes an address; D is a snooping command.
Q3: B — Snooping drops DHCP server messages (Offer/Ack) on untrusted ports, and untrusted is the default — the uplink to the legitimate server must be trusted. Pool exhaustion (A) would hit every switch equally.
Q4: D — MX records direct incoming mail for a domain. A maps names to IPv4, PTR is reverse lookup, CNAME is an alias.
Q5: B — Two inside hosts share one global address (203.0.113.8), distinguished by ports 23110/23111: textbook PAT . 203.0.113.8 is the inside global address (D wrong); static NAT shows fixed service-port mappings (A wrong).
Q6: B — Inside-to-outside: NAT first, then route . (Outside-to-inside is the mirror: route on the public destination, then translate.)
Q7: C — Stratum 16 = unsynchronized . Valid strata run 0–15, lower = more authoritative.
Q8: B — Only SNMPv3 authPriv gives authentication and encryption. v1/v2c community strings are cleartext (A, D); GetBulk (C) is a retrieval feature, not security.
Q9: B — Shaping queues excess traffic for later instead of dropping it. Policing (A) drops; WRED (C) drops early; priority queuing (D) reorders.
Q10: B — TFTP on UDP 69 : no authentication, tiny footprint — it works from a bootloader. FTP (A) needs credentials; SNMP (C) and NTP (D) do not transfer files.