Names, zones, and records
On this page
You have been typing 10.77.20.80 to reach the lab web server. The course began with a name. Find the address for the lab’s name, then ask questions that an address alone cannot answer.
Before you start
Section titled “Before you start”Finish Getting Network Settings Automatically. Use the Ubuntu VM from Installing the lab. Exit any machine shells. Earlier modules left their modes off. If netlab status shows dhcp or nat on, turn it off with netlab mode <name> off.
Update the lab tool
Section titled “Update the lab tool”If you installed netlab 1.0, run these commands on the Ubuntu VM. The checksum should pass before you unpack the download. Use your Ubuntu password when prompted.
wget https://rootvolt.dev/downloads/netlab-1.1.tar.gzwget https://rootvolt.dev/downloads/netlab-1.1.tar.gz.sha256sha256sum -c netlab-1.1.tar.gz.sha256tar -xzf netlab-1.1.tar.gzsudo sh netlab-1.1/install.shnetlab resetVersion 1.1 lets you look up a name from an address and observe a stored answer after a record changes. The installer and reset complete the upgrade. From the VM prompt, check the version, turn on the mode, and reset to start with a clean lab. Keep this mode on throughout the module.
learner@rootvolt:~$ netlab versionnetlab 1.1 (cast f4462821f3d4)learner@rootvolt:~$ netlab mode dns on[sudo] password for learner: Mode dns is on: dns and ns run; lab machines use 10.77.20.53.learner@rootvolt:~$ netlab resetLab is back in its starting state (modes on: dns).learner@rootvolt:~$ Steps (12)
- Type
netlab version - Press Enter
- Output:
netlab 1.1 (cast f4462821f3d4) - Type
netlab mode dns on - Press Enter
- Output:
[sudo] password for learner: - Type the password (the terminal shows nothing)
- Press Enter
- Output:
Mode dns is on: dns and ns run; lab machines use 10.77.20.53. - Type
netlab reset - Press Enter
- Output:
Lab is back in its starting state (modes on: dns).
Ask about the web server
Section titled “Ask about the web server”Run netlab shell laptop from the VM and then dig web.lab.test on laptop. The dig program asks a question using the Domain Name System (DNS), the system that stores and answers questions about names.
learner@laptop:~$ dig web.lab.test
; <<>> DiG 9.18.39-0ubuntu0.24.04.9-Ubuntu <<>> web.lab.test
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46190
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;web.lab.test. IN A
;; ANSWER SECTION:
web.lab.test. 300 IN A 10.77.20.80
;; AUTHORITY SECTION:
lab.test. 300 IN NS ns.lab.test.
;; Query time: 4 msec
;; SERVER: 10.77.20.53#53(10.77.20.53) (UDP)
;; WHEN: Sun Nov 29 13:42:27 UTC 2026
;; MSG SIZE rcvd: 90learner@laptop:~$ Steps (3)
- Type
dig web.lab.test - Press Enter
- Output:
; <<>> DiG 9.18.39-0ubuntu0.24.04.9-Ubuntu <<>> web.lab.test ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46190 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ;; QUESTION SECTION: ;web.lab.test. IN A ;; ANSWER SECTION: web.lab.test. 300 IN A 10.77.20.80 ;; AUTHORITY SECTION: lab.test. 300 IN NS ns.lab.test. ;; Query time: 4 msec ;; SERVER: 10.77.20.53#53(10.77.20.53) (UDP) ;; WHEN: Sun Nov 29 13:42:27 UTC 2026 ;; MSG SIZE rcvd: 90
Find QUESTION SECTION and ANSWER SECTION. The first says what was asked. By default this command asks for an IPv4 address. The second gives the result. The SERVER line near the bottom tells you who replied. Step through the excerpt to match each part to its job.
Read a DNS question and answer
;web.lab.test. IN A
;; ANSWER SECTION:
web.lab.test. 300 IN A 10.77.20.80web.lab.test.300INA10.77.20.80Reading the output
Pick a step to match a marked part of the output to the picture.
Steps (6)
- Question. Question: ;web.lab.test. IN A. Shown on laptop's eth0 as: laptop. The client asks for an IPv4 address for this name.
- Name. Name: web.lab.test.. Shown on laptop's eth0 as: Name. The record is about this name.
- Seconds. Seconds: 300. Shown on laptop's eth0 as: Seconds. Caching and TTLs explains this count.
- Class. Class: IN. Shown on laptop's eth0 as: Class. IN is the Internet class.
- Type. Type: A. Shown on laptop's eth0 as: Type. A means this record gives an IPv4 address.
- Data. Data: 10.77.20.80. Shown on laptop's eth0 as: Data. This is the IPv4 address in the answer.
Read the name from right to left
Section titled “Read the name from right to left”A domain name is a sequence of labels separated by dots that names a place in DNS. The final dot in web.lab.test. marks the root. Start there, move down to test, then to lab, then to web. You can leave the final dot off in these commands.
A record is one fact about a name. Its type tells you what kind of fact it holds. The answer shows A for the type and 10.77.20.80 for the data. The number before IN is in seconds. Caching and TTLs explains it. The class IN means Internet.
Read the zone
Section titled “Read the zone”A zone is the part of the name hierarchy whose records a server holds and serves. Here ns holds the zone lab.test, with names such as web, www, dns, and ns beneath it.
@10.77.20.54 sends the question straight to ns, the machine that holds the zone. A lookup without @ uses the usual server. The next lesson explains the difference. AXFR asks for a copy of the zone. The options +noall +answer hide the usual output sections and show the answer records.
learner@laptop:~$ dig @10.77.20.54 lab.test AXFR +noall +answerlab.test. 300 IN SOA ns.lab.test. hostmaster.ns.lab.test. 1795959777 1200 180 1209600 300
lab.test. 300 IN NS ns.lab.test.
lab.test. 300 IN MX 10 web.lab.test.
lab.test. 300 IN TXT "RootVolt networking lab"
www.lab.test. 300 IN CNAME web.lab.test.
phone.lab.test. 300 IN A 10.77.10.11
web.lab.test. 300 IN A 10.77.20.80
web.lab.test. 300 IN AAAA fd85:b2a8:3761:20:77:20ff:fe00:80
dns.lab.test. 300 IN A 10.77.20.53
ns.lab.test. 300 IN A 10.77.20.54
laptop.lab.test. 300 IN A 10.77.10.10
router.lab.test. 300 IN A 10.77.20.1
lab.test. 300 IN SOA ns.lab.test. hostmaster.ns.lab.test. 1795959777 1200 180 1209600 300learner@laptop:~$ Steps (3)
- Type
dig @10.77.20.54 lab.test AXFR +noall +answer - Press Enter
- Output:
lab.test. 300 IN SOA ns.lab.test. hostmaster.ns.lab.test. 1795959777 1200 180 1209600 300 lab.test. 300 IN NS ns.lab.test. lab.test. 300 IN MX 10 web.lab.test. lab.test. 300 IN TXT "RootVolt networking lab" www.lab.test. 300 IN CNAME web.lab.test. phone.lab.test. 300 IN A 10.77.10.11 web.lab.test. 300 IN A 10.77.20.80 web.lab.test. 300 IN AAAA fd85:b2a8:3761:20:77:20ff:fe00:80 dns.lab.test. 300 IN A 10.77.20.53 ns.lab.test. 300 IN A 10.77.20.54 laptop.lab.test. 300 IN A 10.77.10.10 router.lab.test. 300 IN A 10.77.20.1 lab.test. 300 IN SOA ns.lab.test. hostmaster.ns.lab.test. 1795959777 1200 180 1209600 300
Ask individual questions to find the same kinds of information without reading the whole zone. Specify the type after the name. An A record gives an IPv4 address. An AAAA record gives an IPv6 address. A CNAME record points an alias to another name. An MX record names a mail server for a domain and gives its preference number.
learner@laptop:~$ dig web.lab.test A +noall +answerweb.lab.test. 300 IN A 10.77.20.80learner@laptop:~$ dig web.lab.test AAAA +noall +answerweb.lab.test. 300 IN AAAA fd85:b2a8:3761:20:77:20ff:fe00:80learner@laptop:~$ dig www.lab.test CNAME +noall +answerwww.lab.test. 300 IN CNAME web.lab.test.learner@laptop:~$ Steps (9)
- Type
dig web.lab.test A +noall +answer - Press Enter
- Output:
web.lab.test. 300 IN A 10.77.20.80 - Type
dig web.lab.test AAAA +noall +answer - Press Enter
- Output:
web.lab.test. 300 IN AAAA fd85:b2a8:3761:20:77:20ff:fe00:80 - Type
dig www.lab.test CNAME +noall +answer - Press Enter
- Output:
www.lab.test. 300 IN CNAME web.lab.test.
Predict. Which record type would you ask for to find where mail for lab.test goes?
learner@laptop:~$ dig lab.test MX +noall +answerlab.test. 300 IN MX 10 web.lab.test.learner@laptop:~$ Steps (3)
- Type
dig lab.test MX +noall +answer - Press Enter
- Output:
lab.test. 300 IN MX 10 web.lab.test.
Check your answer
Ask for MX. The answer gives preference 10 and the host web.lab.test..
A TXT record holds text. An NS record names a server for the zone. An SOA (start of authority) record opens the zone. It names the zone’s main server, a contact name, and numbers that control timing. One of them, the serial number, changes in this lab every time the lab starts. A PTR record can map an address back to a name. Use dig -x with an address to ask that reverse question.
learner@laptop:~$ dig lab.test TXT +noall +answerlab.test. 300 IN TXT "RootVolt networking lab"learner@laptop:~$ dig lab.test NS +noall +answerlab.test. 300 IN NS ns.lab.test.learner@laptop:~$ dig lab.test SOA +noall +answerlab.test. 300 IN SOA ns.lab.test. hostmaster.ns.lab.test. 1795959882 1200 180 1209600 300learner@laptop:~$ dig -x 10.77.20.80 +noall +answer80.20.77.10.in-addr.arpa. 300 IN PTR web.lab.test.learner@laptop:~$ Steps (12)
- Type
dig lab.test TXT +noall +answer - Press Enter
- Output:
lab.test. 300 IN TXT "RootVolt networking lab" - Type
dig lab.test NS +noall +answer - Press Enter
- Output:
lab.test. 300 IN NS ns.lab.test. - Type
dig lab.test SOA +noall +answer - Press Enter
- Output:
lab.test. 300 IN SOA ns.lab.test. hostmaster.ns.lab.test. 1795959882 1200 180 1209600 300 - Type
dig -x 10.77.20.80 +noall +answer - Press Enter
- Output:
80.20.77.10.in-addr.arpa. 300 IN PTR web.lab.test.
The PTR answer comes from a separate zone for reverse lookups. The zone copy above covers the forward names under lab.test.
| Record type | What it answers | Example from the lab |
|---|---|---|
A |
IPv4 address | 10.77.20.80 |
AAAA |
IPv6 address | fd85:b2a8:3761:20:77:20ff:fe00:80 |
CNAME |
Target name of an alias | web.lab.test. |
MX |
Mail server and preference | 10 web.lab.test. |
TXT |
Text for a name | RootVolt networking lab |
NS |
Server for the zone | ns.lab.test. |
SOA |
Basic zone information | ns.lab.test. and a serial number |
PTR |
Name for an address | web.lab.test. for 10.77.20.80 |
Mistakes to recognize
Section titled “Mistakes to recognize”“A name is an address.” The address replay shows two addresses for web.lab.test, one under each address type.
“One name, one machine.” The alias www.lab.test and the mail record for lab.test both point to web.lab.test. Read the type before deciding what that relationship means.
Good to know
Section titled “Good to know”.test is a top-level name reserved for testing under RFC 6761. That is why the lab uses it. A lab name such as web.lab.test can never collide with a public site.
Try it yourself
Section titled “Try it yourself”On laptop, choose a type for each question and run the lookup. Use the short output options. For the address-to-name case, use the reverse form you tried above.
- What IPv4 address does
phone.lab.testhave? - Which name goes with
10.77.10.10? - What does a question for an IPv6 address at
www.lab.testreturn? - Which server holds
lab.test?
Solution
Use A, PTR, AAAA and NS in that order. In the third lookup, read both lines. The alias gives you the name to which the IPv6 address belongs.
learner@laptop:~$ dig phone.lab.test A +noall +answerphone.lab.test. 300 IN A 10.77.10.11learner@laptop:~$ dig -x 10.77.10.10 +noall +answer10.10.77.10.in-addr.arpa. 300 IN PTR laptop.lab.test.learner@laptop:~$ Steps (6)
- Type
dig phone.lab.test A +noall +answer - Press Enter
- Output:
phone.lab.test. 300 IN A 10.77.10.11 - Type
dig -x 10.77.10.10 +noall +answer - Press Enter
- Output:
10.10.77.10.in-addr.arpa. 300 IN PTR laptop.lab.test.
learner@laptop:~$ dig www.lab.test AAAA +noall +answerwww.lab.test. 300 IN CNAME web.lab.test.
web.lab.test. 300 IN AAAA fd85:b2a8:3761:20:77:20ff:fe00:80learner@laptop:~$ dig lab.test NS +noall +answerlab.test. 300 IN NS ns.lab.test.learner@laptop:~$ Steps (6)
- Type
dig www.lab.test AAAA +noall +answer - Press Enter
- Output:
www.lab.test. 300 IN CNAME web.lab.test. web.lab.test. 300 IN AAAA fd85:b2a8:3761:20:77:20ff:fe00:80 - Type
dig lab.test NS +noall +answer - Press Enter
- Output:
lab.test. 300 IN NS ns.lab.test.
- Read a name from the root down toward the most specific label.
- Ask for the type that matches the fact you need.
- Compare the data and type when one name has several records.
Next, Resolvers and authoritative servers follows the question across the lab.