All exams← All Cisco CCNA Practice notes

IP services (DHCP, NAT, NTP): Cisco CCNA Practice revision notes

Revision notes

DHCP

DHCP (Dynamic Host Configuration Protocol) automatically hands out IP addresses, subnet masks, default gateways and DNS servers to hosts, saving manual configuration.

The process is DORA:

  • Discover - client broadcasts DHCPDISCOVER (destination 255.255.255.255)
  • Offer - server replies DHCPOFFER with a proposed lease
  • Request - client broadcasts DHCPREQUEST asking to accept that offer
  • Acknowledge - server confirms with DHCPACK

If a client roams back onto a subnet where it already has a valid lease, it can skip straight to Request/Acknowledge (a shortened exchange).

When the DHCP server sits on a different subnet from the client, a router does not forward broadcasts by default, so you configure the ip helper-address command on the client-side interface. This turns the broadcast into a unicast and forwards it to the DHCP server, also relaying DNS, TFTP and other UDP broadcast services.

On IOS routers you can build a small DHCP server with ip dhcp pool NAME, then network, default-router and dns-server sub-commands. Use ip dhcp excluded-address to stop the pool handing out addresses reserved for statics like gateways and servers - do this before defining the pool or the router will hand those addresses out first.

Common mistake: forgetting the excluded-address statement, causing an IP conflict with the gateway.

NAT

NAT (Network Address Translation) maps private IP addresses (RFC 1918: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to a public address so multiple internal hosts can share limited public IPs and reach the internet.

  • Static NAT - one-to-one, permanent mapping, good for servers that need a fixed public address
  • Dynamic NAT - pool of public addresses matched to a pool of private addresses, first-come first-served
  • PAT (NAT overload) - many private addresses share one public address, differentiated by source port number; this is what most home and small business routers use

Key terms: inside local (private address as seen inside), inside global (public address as seen outside). Interfaces must be marked ip nat inside or ip nat outside or translation will not happen.

Common mistake: configuring the NAT pool/ACL correctly but forgetting the inside/outside interface commands.

NTP

NTP (Network Time Protocol) synchronises device clocks across a network, which matters for accurate logging, certificate validation and troubleshooting timelines.

NTP uses a stratum hierarchy: stratum 0 devices are reference clocks (atomic/GPS), stratum 1 servers are directly connected to them, and each hop away adds one to the stratum number, up to a maximum of stratum 15 (stratum 16 means unsynchronised).

Devices can operate in client mode (ntp server IP) or peer mode (ntp peer IP) for mutual synchronisation between equals. Check sync state with show ntp status and show ntp associations - look for the sys.peer indicated by an asterisk.

Common mistake: assuming NTP works instantly - convergence can take several minutes as the client gradually steps or slews its clock.

Key facts

Flashcards

What does DORA stand for in the DHCP process?
Discover, Offer, Request, Acknowledge
tap to reveal
What command relays DHCP broadcasts across a router to a remote DHCP server?
ip helper-address, configured on the client-side interface
tap to reveal
Why must ip dhcp excluded-address be set before creating the DHCP pool?
So the router does not lease out reserved addresses (like the default gateway) to clients
tap to reveal
Name the three RFC 1918 private address ranges.
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
tap to reveal
What is PAT and what does it use to distinguish hosts?
NAT overload; it uses unique source port numbers to let many private hosts share one public IP
tap to reveal
What is the difference between static and dynamic NAT?
Static NAT is a fixed one-to-one mapping; dynamic NAT assigns addresses from a pool on a first-come first-served basis
tap to reveal
What two interface commands are required for NAT to actually translate traffic?
ip nat inside and ip nat outside
tap to reveal
Define inside local and inside global addresses.
Inside local is the private address as seen inside the network; inside global is the translated public address as seen outside
tap to reveal
What is an NTP stratum 0 device?
A reference clock source such as an atomic clock or GPS receiver
tap to reveal
What does NTP stratum 16 mean?
The device is unsynchronised
tap to reveal
What is the difference between ntp server and ntp peer commands?
ntp server configures client mode (one-way sync from a server); ntp peer configures mutual peer synchronisation between equals
tap to reveal
How do you check which NTP source a router is currently synchronised to?
show ntp associations - the sys.peer is marked with an asterisk
tap to reveal
What is the maximum useful NTP stratum number before a device is considered unsynchronised?
15 (stratum 16 means unsynchronised)
tap to reveal
Practice questions

IP services (DHCP, NAT, NTP): 5 practice questions

Q1. Which four messages make up the standard DHCPv4 client-server exchange, in order, when a client first obtains an address?
  • A.  Offer, Discover, Acknowledgement, Request
  • B.  Request, Discover, Offer, Acknowledgement
  • C.  Discover, Offer, Request, Acknowledgement
  • D.  Discover, Request, Offer, Acknowledgement
Show answer & explanation
✓ Answer: C. Discover, Offer, Request, Acknowledgement
The DORA sequence is Discover (client broadcasts to find a server), Offer (server proposes an address), Request (client formally asks for that offer, broadcast so other servers see it was declined), and Acknowledgement (server confirms the lease). Reversing Offer and Request breaks the process because a server cannot offer before a client asks.
Q2. On a Cisco IOS router, which command excludes the first ten addresses of a DHCP pool from being assigned to clients?
  • A.  ip dhcp excluded-address 192.168.1.1 192.168.1.10
  • B.  exclude-address 192.168.1.1 192.168.1.10
  • C.  ip dhcp reserved-address 192.168.1.1 192.168.1.10
  • D.  ip dhcp pool exclude 192.168.1.1 192.168.1.10
Show answer & explanation
✓ Answer: A. ip dhcp excluded-address 192.168.1.1 192.168.1.10
The global configuration command ip dhcp excluded-address defines a range the DHCP server will never lease out, typically used to reserve addresses for routers, servers, or printers. It is entered outside the pool configuration, not inside it, which rules out the exclude sub-command option.
Q3. A DHCP client on one subnet needs to obtain an address from a DHCP server located on a different subnet, and the router between them cannot run a DHCP server. What must be configured on the router's client-facing interface?
  • A.  ip helper-address pointing to the DHCP server
  • B.  ip forward-protocol udp 67 with no other command
  • C.  ip dhcp relay enable globally only
  • D.  ip dhcp pool referencing the remote server
Show answer & explanation
✓ Answer: A. ip helper-address pointing to the DHCP server
The ip helper-address command turns the router interface into a DHCP relay agent, converting the client's broadcast into a unicast forwarded to the specified server. Without it, DHCP broadcasts never cross the router boundary, so the remote server never sees the request.
Q4. Which UDP port number does a DHCP server listen on for client requests?
  • A.  67
  • B.  53
  • C.  69
  • D.  68
Show answer & explanation
✓ Answer: A. 67
DHCP servers listen on UDP port 67, while clients listen on UDP port 68 for replies. Port 69 is TFTP and port 53 is DNS, both unrelated to DHCP address assignment.
Q5. A network engineer wants a Cisco router's Fast Ethernet interface to obtain its IP address automatically from a DHCP server instead of using a static address. Which interface command achieves this?
  • A.  ip dhcp client enable
  • B.  ip address dynamic
  • C.  dhcp client-id enable
  • D.  ip address dhcp
Show answer & explanation
✓ Answer: D. ip address dhcp
The ip address dhcp interface command tells the router to act as a DHCP client and request an address for that interface. The other options are not valid Cisco IOS syntax for enabling DHCP client behaviour on an interface.
Test yourself
See the Cisco CCNA Practice page

More Cisco CCNA Practice topics