Linux for network engineers lab 6 of 14

DNS and DHCP services on Linux

A Linux box takes over DNS and DHCP for the depot. You run two DHCP scopes, one through a router's relay, serve names with a small DNS server, and learn what `dig`, `getent` and `/etc/hosts` each really tell you.

Run this lab

It needs Lite: its 5 nodes are set to 5 vCPU and 3,072 MB in total. That fits the free demo too.

In your workspace: Shared, then Linux for network engineers guided labs, then 06 - DNS and DHCP services on Linux

Try it free for 30 minutesRun it on Lite from £3 a day

The free demo needs no card and no email. Every lab plan includes every guided lab.

Level
Intermediate
Time
About 70 minutes
Nodes need
5 vCPU, 3,072 MB
Smallest plan
Lite

The scenario

The Wakefield depot's old Windows server is being retired, and SVC, a small Linux box, has to take over its two jobs: naming and addressing. It serves the office LAN directly. The warehouse is behind router R1, so its DHCP has to come through a relay. Everything is in the kestrel.lab domain.

DeviceInterfaceAddressRole
SVCeth010.6.1.10/24DNS and DHCP for the office
SVCeth110.6.9.2/30the warehouse scope listens here
R1Gi0/0, Gi0/1, Gi0/210.6.1.1/24, 10.6.20.1/24, 10.6.9.1/30office, warehouse, link to SVC
WSeth010.6.1.50/24your workstation; also the tracker web server
H1eth0DHCP, reserved 10.6.1.99office client
H2eth0DHCP, 10.6.20.100 upwarehouse client
DeviceRunsHow to log in
WSUbuntu 22.04 desktop containerIts console is a remote desktop: root / eve. Open a terminal there.
H1, H2Alpine Linux 3.20root, no password.
R1Cisco IOSv 15.9The console opens at >; enable has no password.
SVCAlpine Linux 3.16 with iptables and iproute2Opens on a menu: press 5, then Enter, for a root shell.

What you’ll practise

  • Serve A and reverse records with a small DNS server
  • Run DHCP scopes with options and a reservation
  • Read a DHCP exchange and a lease file
  • Serve a remote subnet through an IOS relay
  • Use dig, getent and the resolver files to tell DNS faults from local overrides
  • Point a router at a Linux name server

The tasks

  1. Start the Linux nodes
  2. Answer names with dnsd
  3. Hand out addresses on the LAN
  4. See the conversation and the lease
  5. Serve the warehouse through a relay
  6. Query like an engineer
  7. Point the router at it

The Lab Tasks pane has the scenario, these tasks, the checks to run, hints and the full solution.

Topology and devices

The network as it opens in EVE-NG, drawn from the lab’s own canvas, and the image each node runs.

Topology of DNS and DHCP services on Linux5 nodes and 1 network, 6 links. Every link is listed as text below the diagram.WSH1H2R1SVCLANeth0Gi0/0eth0eth1Gi0/2Gi0/1eth0eth0
5 nodes and 1 network, with the interface names each link uses. On a narrow screen, scroll the diagram sideways.
Nodes in DNS and DHCP services on Linux, with the image each runs and the vCPU and RAM it’s set to
NodeDeviceImage in Add NodeSet to
WSEVE-NG GUI server (Docker)eve-gui-server:latest1 vCPU, 1,024 MB
H1Alpine Linuxclbalpinebase-alpine-base-3-20-31 vCPU, 512 MB
H2Alpine Linuxclbalpinebase-alpine-base-3-20-31 vCPU, 512 MB
R1Cisco IOSvvios-adventerprisek9-m.spa.159-3.m91 vCPU, 512 MB
SVCAlpine WAN emulatorclbalpinewanem-alpine-3-16-2-wanem1 vCPU, 512 MB

How to open this lab

  1. Sign in to your workspace at lab.cloudlabbox.com.

  2. In File Manager, open Shared, then the folder Linux for network engineers guided labs.

  3. Open 06 - DNS and DHCP services on Linux and start its nodes, then open Lab Tasks for the scenario and the steps.

The lab is read-only. You can start the nodes and configure the devices, but changes to the topology can’t be saved. To change it, rebuild it in your own folder.

More Linux for network engineers labs

All Linux for network engineers labs

Related labs in other courses

CloudLabBox is independent of Cisco, CompTIA, the Linux Foundation and the Linux Professional Institute. The lab follows exam topics and isn’t vendor training material; vendor names identify the exams and the images in the workspace.