Loopback Cert Guide
Lab 4.6DHCP and relay

Discover, Offer, Request, Ack.

Two LANs, a DHCP and DNS server two hops away, and an ISP that leases R1 its outside address. Add the relay, renew the PCs, and watch each DORA message cross the network, or stop dead at the router.

  • 4.3Explain the role of DHCP and DNS within the network
  • 4.6Configure and verify DHCP client and relay
01Live network

Broadcasts stop at the router.

R1's ports show H where a helper is set and D on its DHCP-client interface. Click a PC to renew, release, read ipconfig and ping by name; R1 to set helpers and the client interface; R2 to see pools, leases and DNS.

Live network · DHCP · simulated
  • ip helper-address
  • ip address dhcp
  • No helper
  • Shut down

Simulated: the routers, PCs, MAC addresses and output are Loopback's simulation of IOS routers and Windows clients. Addresses: 10.x.x.x is private space (RFC 1918); 203.0.113.0/29 and 198.51.100.1 are documentation ranges (RFC 5737). R2 is preconfigured as the DHCP and DNS server.

02Tasks

Solve the task and the network checks your work.

Each task loads its own starting point onto the network. Solve it from the console or with clicks; the checks tick live, and you see one model answer when you're done.

    03What happens if

    Predict the result, then watch it happen.

    Eight DHCP and DNS situations: no relay, a helper on the wrong side, a server with no way back, APIPA, a router as a client, names without DNS. Pick what happens, then load it on the network.

      04Drills

      A new question every round, so nothing is memorized.

      DORA and its ports, where the helper goes, client commands and output, and what DHCP and DNS each do. Build a streak.

      05Recall sheet

      The whole topic on one sheet.

      The numbers, orders and commands the network runs on. Cover a column and say it before you look.

      DORA

      1. Discover: client, broadcast, UDP 68 to 67.
      2. Offer: server proposes an address.
      3. Request: client, still broadcast, asks for that address.
      4. Ack: server confirms. The lease starts.

      A lease carries address, mask, default gateway, DNS servers and lease time.

      Relay

      • Routers don't forward broadcasts, so a server on another subnet never hears the Discover.
      • ip helper-address on the interface facing the clients forwards it as a unicast.
      • The relay fills in giaddr with that interface's address. The server leases from the pool containing it and replies to it.
      • The server needs a route back to the client subnets.

      Router as a client

      • ip address dhcp under the interface.
      • The gateway in the lease becomes S* 0.0.0.0/0 [254/0].
      • Check it with show dhcp lease and show ip interface brief (Method DHCP).

      DNS

      • Turns names into addresses: A records for IPv4, AAAA for IPv6.
      • Queries use UDP 53 (TCP 53 for large answers).
      • No DNS server: everything still works by address, nothing by name.

      When it fails

      • Windows with no offer: APIPA, 169.254.0.0/16, no gateway.
      • Wrong gateway in the pool: local traffic works, nothing beyond.
      • ipconfig /all shows the DHCP server, the gateway and the DNS servers.

      Commands

      Relay

      interface gi0/0
       ip helper-address 10.9.9.2
      show ip interface gi0/0

      Client

      interface gi0/3
       ip address dhcp
      show dhcp lease
      show ip route
      ipconfig /renew   (Windows)

      Server (R2)

      ip dhcp excluded-address 10.1.10.1 10.1.10.99
      ip dhcp pool LAN-A
       network 10.1.10.0 255.255.255.0
       default-router 10.1.10.1
       dns-server 10.9.9.2
      show ip dhcp binding

      All of these work in the R1 and R2 consoles, along with ?, Tab and do. The PCs' commands are buttons on each PC.

      Jump to a page

      1. Gi0/1HomeconnectedHow the exam works and a sample of every station
      2. Gi0/2Practice Testsconnected18 tests by domain, every answer explained
      3. Gi0/3Flashcardsconnected401 cards on every objective, plus your own
      4. Gi0/4CLI LabconnectedCommand drills and config tasks, checked like IOS
      5. Gi0/5Concept LabsconnectedYou're in Lab 4.6 DHCP and relay. All labs.
      6. Gi0/6Study PlanconnectedAll 53 objectives, graded from your progress