DNS (BIND) and DHCP services
Name resolution, record types and handing out addresses.
Level 201 · 19 lessons · 15 practice labs
Lessons
Authoritative DNS with BIND
- Installing BIND and the named service: You learn to install the BIND DNS server in your lab and see that the named service runs and what it does.
- Zone declarations and zone files in BIND: You will understand what a zone is, the part of a domain a server is responsible for, and how a zone file is put together.
- BIND record types: SOA, NS, A, CNAME: You learn what the SOA, NS, A and CNAME records each do and how they are written in a zone file.
- Checking and reloading a zone in BIND: You learn to check a zone file for mistakes before reloading and to apply a change safely.
- Reverse zones and PTR records in BIND: You will define a reverse zone and PTR records in BIND so an IP address resolves back to a name, and check it with dig.
- Short task: set up the forward and reverse zones for an office
Resolution and diagnosis
- BIND: the caching resolver and forwarders: You learn how a caching resolver speeds up answers and how to forward queries on to an upstream server.
- Diagnosing DNS with dig, and reverse lookups: You learn to inspect name queries with dig, read the answers, and check records with reverse lookups from address to name.
- Seeing a client’s DNS server and cache with resolvectl: You will see which DNS server a client uses and whether it is serving an old answer from cache, using resolvectl.
- Separating internal and external DNS answers with BIND views: You will build a split DNS setup with BIND views that answers the same name differently for internal and external clients.
- Moving a service to a new IP address: A records and TTL: You learn how to plan the A record and TTL so a service keeps its name and moves to a new address without downtime.
- mDNS with Avahi: announcing services on the local network: You learn to make a local service discoverable by name without a DNS server using Avahi, and see how it looks in network traffic.
- Short task: find out why some clients still go to the old address
DHCP
- Installing a DHCP server: You learn to install a DHCP server, which hands out addresses to devices automatically, in your lab and check that it works.
- DHCP subnet scope and address pools: You learn to define a scope for a subnet and set the pool of addresses to hand out so that nothing overlaps by accident.
- DHCP fixed address reservations and lease times: You will learn to give devices such as printers and servers the same address every time, and understand what a lease time means.
- DHCP: DORA and troubleshooting: You learn the four-step DORA exchange of DHCP and how to find the problem when a device cannot get an address.
- Short task: give the printers fixed addresses and check the leases
Wrap-up
- Capstone: DNS and DHCP for an office network: In a small task for a fictional company's office network you set up and test DNS and DHCP services that resolve names and hand out addresses.
Practice labs
- Add records for new servers: Add two A records and one CNAME to the existing BIND zone, bump the serial, reload the zone and show the result with dig.
- The zone file won’t load: Follow the named-checkzone errors to fix the syntax and missing-dot mistakes in the zone file, and prove the records are answered.
- The secondary server doesn’t update: Find why a change on the primary never reaches the secondary (serial, allow-transfer, notify), fix it and show both servers return the same serial.
- No reverse records: only IPs in the logs: Add the PTR records to the missing reverse zone and show with dig -x that names come back.
- Forward and reverse records don’t match: Write a short script that compares a zone’s A and PTR records, fix the mismatches and rerun the script to get a clean result.
- Mail is rejected: PTR and HELO don’t match: Find the reverse-record and name mismatch that gets the mail server rejected, make forward and reverse records consistent and show the check with dig.
- Set up a caching resolver: Turn BIND into a caching server that forwards outside names to the given forwarder, and show with query times that the second query is served from cache.
- Internal names leak outside: Find the mistake in the BIND view configuration and prove with dig from two different sources that internal records are only answered to internal clients.
- An open resolver: Show that the lab DNS server accepts recursive queries from the outside network, close it with allow-recursion and confirm internal clients are unaffected.
- The client remembers the old address: Inspect the client’s DNS server and cache with resolvectl, flush the cache and show the new address arrives.
- TTL groundwork for migration night: Lower the TTL before moving a service, publish the new address and work out the latest time clients may still see the old address under the old TTL.
- A shared service is invisible on the network: mDNS: Find why a service that Avahi should announce is not visible, fix the service file and prove with avahi-browse that it appears.
- Newcomers can’t get an address: Spot the exhausted DHCP pool from the lease records, enlarge the pool and show that a new client gets an address.
- An address arrives, but no internet: Show on a client that the DHCP server hands out the wrong gateway and DNS options, fix them and prove the correct values by renewing the lease.
- A second DHCP server on the network: In your own lab network, find the second DHCP server handing out wrong addresses from a DORA capture, identify its MAC address and show clients get correct leases after you shut it down.
About this course
Name resolution, record types and handing out addresses.
What you will learn
- Authoritative DNS with BIND
- Resolution and diagnosis
- DHCP
- Wrap-up
Prerequisites
Finishing the level 101 courses of the same path, or knowing those topics, is enough.
Lab environment
Lessons run in your own Kali Linux terminal in the browser, connected to a private lab network. Nothing to install.
Frequently asked questions
- Is this course right for my level?
- The course is at level 201; it assumes you know the topics of the lower-level courses.
- Is there anything to install?
- No. Every lesson runs in your own lab environment that opens in the browser.
- How do lessons work?
- Each lesson has 8 to 10 steps and a short quiz. Early steps show the command to type, later steps give less help; if two attempts fail, the solution opens.
- Can I try it for free?
- Yes. The first three lessons of every course are free.