First, the essential ideas
- DNS and resolver
- The Domain Name System stores typed records about names. A resolver asks DNS questions; an authoritative server answers from the zone data it controls.
- Record and zone
- A resource record has an owner name, type, time to live and data. A zone is an administered portion of the DNS namespace, not necessarily every name below a domain.
- A and AAAA
- An A record supplies an IPv4 address. An AAAA record supplies an IPv6 address. The address family in the answer need not match the transport used to ask the question.
- CNAME
- A canonical-name record makes one name an alias of another name. It is not an HTTP redirect and normally cannot coexist with other ordinary record types at the same owner.
- MX and NS
- A mail-exchanger record identifies a mail server name with a preference value; lower values are preferred. A name-server record identifies an authoritative server name for a zone.
- PTR and reverse lookup
- A pointer record associates a reverse-DNS name with a target name. IPv4 reverse names reverse the octets under in-addr.arpa. Forward and reverse records are maintained separately.
- TTL and cache
- Time to live is a cache lifetime in seconds, not a propagation guarantee. A cache retains a received answer temporarily, including certain negative answers.
- Response status
- NOERROR means the query was processed without a DNS error, but it may contain no requested record. NXDOMAIN means the queried name does not exist. SERVFAIL means resolution failed; timeout means no usable reply arrived.
- Console, shell and port
- Open a node's Console to reach its text window. Linux commands are entered at its shell prompt. An application port, such as UDP/TCP 53 or this lab's 1053, is not an Ethernet cable socket.
Start with the question being asked: a name and a record type. The lab uses a private zone named lab.test and explicit queries to a private server. Names and addresses in its answers are records for inspection; no web server, mail server or IPv6 network is created.
See the idea
DNS records answer different questions
Addresses, aliases, mail destinations, authority and reverse names are different relationships.
Ask for an address
A and AAAA return different address families. Check the requested type and answer without claiming the destination service is running.
What this model leaves out: This is a record comparison, not a network wiring diagram. Returned web and mail addresses are fixture data, not working application servers.
Full visual explanation and references
Six records compare A with IPv4, AAAA with IPv6, CNAME with an alias target, MX with a mail target, NS with authority and PTR with a reverse name.
This is a record comparison, not a network wiring diagram. Returned web and mail addresses are fixture data, not working application servers.
- Ask for an address
A and AAAA return different address families. Check the requested type and answer without claiming the destination service is running.
www.rfc-editor.orgwww.rfc-editor.org - Follow the target name
CNAME points to an alias target. MX identifies a mail target and preference. Resolve the relevant target address before testing its service.
www.rfc-editor.org - Check separate records
NS identifies authoritative servers. PTR supplies a reverse name; editing an A record does not automatically update its PTR.
www.rfc-editor.org
One idea at a time
Start with something familiar.
Read one DNS answer like a labeled database row. First identify the requested name and record type. Then inspect status and the server that replied. Only after that interpret the returned value; a plausible-looking address can still be wrong.
Why learn this?
A browser, mail sender and reverse lookup ask different questions. Replacing a resolver or flushing a cache without understanding the failed question can hide evidence while leaving the underlying record unchanged.
An everyday comparison
A directory may contain a person's telephone number, an alternate name and the office responsible for a department. Asking for an office does not return the same kind of information as asking for a telephone number.
What happens in a network
DNS record types label different relationships. Address records identify addresses, aliases identify another name, and mail records identify a mail destination name plus preference.
Where the comparison stopsDNS is distributed and cached. A directory analogy does not imply instant global updates, prove identity or mean that the application at an address will answer.
Follow one worked example
- Ask specifically for the web address.
The A query for web.lab.test returns the fixture's IPv4 address. The AAAA query asks independently for its IPv6 address.
Why: Success for one address family cannot establish the other family's data or reachability.
- Follow a name rather than treating it as an address.
www.lab.test has a CNAME pointing to web.lab.test. The MX for lab.test points to mail.lab.test, whose A record must be checked separately.
Why: An alias target and a mail target are names; neither is itself the numeric connection destination.
- Separate records from the services they describe.
The fixture returns 192.0.2.80 and 192.0.2.25 even though neither endpoint exists in this two-node project.
Why: This deliberately demonstrates that DNS data is not evidence of a running web or mail application.
- Compare a wrong answer with no answer.
A changed A record can produce a successful reply containing the wrong value. Querying an absent name produces a different status, while an unreachable port produces a timeout.
Why: Different observations require different repairs; changing routing will not correct a valid but wrong zone record.
Your first small task
On paper, match these questions to record types: IPv4 address of web.lab.test; IPv6 address of that name; mail destination for lab.test; reverse name for 192.0.2.80. Then identify the extra lookup needed after an MX answer.
Show a hint
Ask whether the expected data is an address, a name or a preference plus a name.
Check the expected result
Use A, AAAA, MX and PTR respectively. Resolve the MX target name with A or AAAA before attempting a mail connection.
Pause and explain it in your own words
An A query works but the mail server cannot be reached. Is DNS completely ruled out?
Show a hint
Mail delivery may start with an MX query and then resolve the selected target name.
Show the explanation
No. The successful A query may concern a different name. Check the domain's MX, its preference and its target's address records, then test mail-service reachability separately.
Short answer
What should you understand today?
DNS answers typed questions about names. Ask for the record type the application needs, check the responding server and status, then verify the record's target. An A answer does not prove the AAAA record, mail route or reverse lookup is correct. A valid DNS answer also does not establish that a web or mail service is running at the returned address.
Before you begin
Learning targets
- Recall IPv4 /24 addressing and that an IPv6 address is a separate address family.
- Use two disposable Ubuntu 24.04 LTS virtual machines in GNS3 2.2.55; install BIND 9.18 and dnsutils before disconnecting them.
- Know how to open a node Console and use a text editor; nano controls are explained in the setup.
- Choose A, AAAA, CNAME, MX, NS or PTR for a specific diagnostic question.
- Read status, answer data, responding server and cache lifetime without inferring application health.
- Follow an alias or mail-server name to its address record.
- Build a private authoritative fixture and repair one wrong A record.
- Explain why forward and reverse answers may disagree and why cached answers can differ.
- Diagnose separate AAAA, MX and NS tickets, correct only the responsible record and repeat the relevant questions.
Words you will meet
Open a word when you need its meaning. You do not need to memorize the whole list before reading.
DNS and resolver
The Domain Name System stores typed records about names. A resolver asks DNS questions; an authoritative server answers from the zone data it controls.
Record and zone
A resource record has an owner name, type, time to live and data. A zone is an administered portion of the DNS namespace, not necessarily every name below a domain.
A and AAAA
An A record supplies an IPv4 address. An AAAA record supplies an IPv6 address. The address family in the answer need not match the transport used to ask the question.
CNAME
A canonical-name record makes one name an alias of another name. It is not an HTTP redirect and normally cannot coexist with other ordinary record types at the same owner.
MX and NS
A mail-exchanger record identifies a mail server name with a preference value; lower values are preferred. A name-server record identifies an authoritative server name for a zone.
PTR and reverse lookup
A pointer record associates a reverse-DNS name with a target name. IPv4 reverse names reverse the octets under in-addr.arpa. Forward and reverse records are maintained separately.
TTL and cache
Time to live is a cache lifetime in seconds, not a propagation guarantee. A cache retains a received answer temporarily, including certain negative answers.
Response status
NOERROR means the query was processed without a DNS error, but it may contain no requested record. NXDOMAIN means the queried name does not exist. SERVFAIL means resolution failed; timeout means no usable reply arrived.
Console, shell and port
Open a node's Console to reach its text window. Linux commands are entered at its shell prompt. An application port, such as UDP/TCP 53 or this lab's 1053, is not an Ethernet cable socket.
Ask a name and a type, not whether DNS works
A DNS request is more precise than the phrase DNS works. It names an owner and asks for a record type. A successful A lookup for web.lab.test tells you about IPv4 data for that name at that server and time. It says nothing by itself about an AAAA record, reverse lookup or mail destination. A fully qualified name ends at the DNS root; a trailing dot makes that explicit in zone data.
- Record the exact question and responding server in your notes.
- A name can have multiple address records; this fixture uses one of each family.
Addresses and aliases answer different questions
A maps a name to an IPv4 address; AAAA maps it to IPv6. CNAME points an alias to another name, which can then be resolved. A CNAME does not send an HTTP redirect response, move a browser to a new URL or change certificate requirements. Avoid ordinary records at a CNAME owner; an alias is not a convenient place to combine unrelated data.
- Inspect the alias and target when only one service name fails.
- An address answer identifies data; verify the actual destination service separately.
Mail and authority records contain names
MX identifies a mail-exchanger hostname and a preference number. Lower preference values are tried ahead of higher values according to mail delivery behavior; they are not probabilities. NS identifies the authoritative server names for a zone. Their names need usable address resolution. An authoritative answer comes from a server responsible for the zone; a recursive resolver can collect and cache answers for clients.
- Do not put a raw IPv4 address where an MX or NS target name belongs.
- A single local NS fixture is not a resilient production DNS design.
Reverse DNS is a separate relationship
A PTR query asks for a name through the reverse namespace. For IPv4, 192.0.2.80 becomes 80.2.0.192.in-addr.arpa. The reverse zone in this exercise is 2.0.192.in-addr.arpa, with owner 80. IPv6 reverse names use reversed hexadecimal nibbles under ip6.arpa; this chapter explains that format but does not configure an IPv6 reverse zone.
- Forward and reverse lookups can be independently wrong or absent.
- PTR absence does not mean the numeric IP address cannot exchange traffic.
Distinguish status, empty answers and no response
NXDOMAIN indicates that the queried name does not exist. NOERROR with no answer of the requested type can indicate that the name exists but lacks that record. SERVFAIL indicates a server-side resolution failure, which needs more diagnosis. A timeout is not a negative DNS answer at all. TTL controls cache use; negative answers can also be cached, so a correction may not immediately appear through every resolver.
- Do not call an empty answer an unreachable DNS server.
- Compare authoritative data with resolver data before blaming propagation.
Repair the record that the failing question uses
A wrong A record can return NOERROR and still direct a client to an unintended address. Compare the record with the approved address plan, change only the lab record, validate zone syntax, restart the isolated server and repeat the identical query. Keep the original file and stop condition. Do not flush every cache as the first response to uncertain data.
- An authoritative wrong value needs a data repair, not a random resolver change.
- Repeat all six record questions after repair to catch accidental collateral edits.
Tickets A6 and MX1: diagnose independent target data
These observations are synthetic, not captured output. A6 expected: web A 192.0.2.80 and AAAA 2001:db8:39::80. Observed: A is correct, but AAAA is 2001:db8:39::81 with NOERROR. A healthy IPv4 answer does not repair IPv6 data. For optional replay, change only web IN AAAA to ::81 with SOA serial 4; restore web IN AAAA 2001:db8:39::80 with serial 5. Do not put an IPv4 literal into AAAA or disable IPv6 to hide the discrepancy. MX1 expected: lab.test MX 10 mail.lab.test. and mail A 192.0.2.25. Observed: MX is 10 web.lab.test., which resolves successfully to the web fixture's .80 and ::80. The resolvable but wrong target is the fault, not its preference. Replay that MX with serial 6; restore @ IN MX 10 mail.lab.test. with serial 7, leaving both target address records untouched.
- Finish one ticket's correction and re-query before introducing another fault.
- A correct address family or resolvable MX target is insufficient unless it matches the approved plan.
Ticket NS1: separate the authority record from delegation
Synthetic NS1 expected: lab.test NS ns.lab.test., with ns A 192.0.2.53. Observed: lab.test NS mail.lab.test., with mail A 192.0.2.25; direct queries to .53 still answer authoritatively. The NS target is wrong even though the explicitly addressed server hosts the zone. Optional replay changes only @ IN NS mail.lab.test. with serial 8; correction restores @ IN NS ns.lab.test. with serial 9. Leave ns A .53 and the listener unchanged. NS targets identify DNS servers, not mail exchangers, and must not be aliases. For the separate paper delegation case, imagine a parent referral still naming mail.lab.test. while the child's own NS is correct: changing only the child cannot repair that parent. Its authorized owner must replace that referral with lab.test. NS ns.lab.test. and any required in-bailiwick glue with ns.lab.test. A 192.0.2.53.
- Correct the record at the zone that owns the fault; a child answer does not prove its parent referral.
- Record DNS correctness separately from HTTP availability, TLS identity and SMTP delivery.
Real-world walkthrough
The alias works, but points to the wrong destination
In a fictional maintenance window, an operator changes web.lab.test to the wrong IPv4 address. The public-facing alias remains spelled correctly, and its CNAME query succeeds. A learner concludes DNS cannot be involved because a name was returned. The useful next question is what address that target name resolves to, not whether the alias text exists.
- Record the exact name, requested type, responding server and time. Preserve the full answer rather than reporting only that the command succeeded.
- Follow the CNAME to the target's A and AAAA records; compare each value with the approved plan instead of assuming both families changed together.
- Inspect the direct authoritative response separately from cached resolver data. A stale cached value and a wrong authoritative value require different interventions.
- Restore the one wrong A record, validate the private zone, restart its isolated server and repeat the original alias and target queries.
- Retain the PTR and mail-record checks as independent evidence. State that this fixture did not test HTTP, TLS, SMTP or IPv6 forwarding.
Guided GNS3 lab
Private DNS records with one reversible wrong address
Use a nonrecursive BIND fixture to inspect six record types and repair A data, then diagnose synthetic AAAA/MX/NS tickets with an optional private replay. No runtime was executed; DNS answers do not establish web, mail or IPv6 service health.
Addressing plan
| Device | Interface | Address | Purpose |
|---|---|---|---|
| DNS1 | ens3 | 192.0.2.53/24 | Actual private authoritative server. |
| Client1 | ens3 | 192.0.2.10/24 | Actual query origin; no default gateway. |
| Zone fixture | web / mail | 192.0.2.80 / 192.0.2.25 | Records only; no corresponding endpoint nodes. |
| Zone fixture | web AAAA | 2001:db8:39::80 | Record only; IPv6 forwarding is not configured. |
Set up the lab
- Install BIND 9.18, dnsutils and nano in disposable Ubuntu images before isolating them. Record exact package versions with named -v and dig -v. No paid software or Cisco image is required.
- Use fresh nodes whose sole lab NIC is ens3 and is not managed by DHCP or a competing network service. If the NIC differs, map it explicitly before substituting its name.
- In nano, type the provided file text exactly, use Ctrl+O then Enter to save, and Ctrl+X to exit. Preserve dollar signs and trailing dots.
- Create /tmp/qcs39 only for this lab. Run named in the foreground at the ordinary nonroot shell on unprivileged port 1053. Stop with Ctrl+C in DNS1's Console before editing; do not kill another system service.
- Paper alternative: read the six fixture records and predict responses without starting BIND. Mark syntax and runtime checks unperformed; a worksheet does not verify a DNS daemon.
Prepare the DNS interface
In GNS3, right-click DNS1 and choose Console before typing. At the Linux shell, confirm ens3 and use only this disposable node. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
ip -br address
sudo ip address add 192.0.2.53/24 dev ens3
sudo ip link set ens3 up
named -v
mkdir /tmp/qcs39What each command means
ip -br address- Inspect interface names and existing addresses before selecting ens3.
sudo ip address add 192.0.2.53/24 dev ens3- Add the private DNS node address to the specified lab interface.
sudo ip link set ens3 up- Enable ens3 without creating a default route.
named -v- Record the installed BIND version; these instructions target the 9.18 series.
mkdir /tmp/qcs39- Create a new disposable directory; stop if an existing directory needs ownership review.
- What you should see
- DNS1 has the planned address and a writable new fixture directory.
- Why this step matters
- Avoiding system configuration files and standard port 53 keeps the exercise bounded.
Prepare the query client
In GNS3, right-click Client1 and choose Console before typing. At the Linux shell, inspect its interface and configure only the lab link. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
ip -br address
sudo ip address add 192.0.2.10/24 dev ens3
sudo ip link set ens3 up
dig -v
ping -c 3 192.0.2.53What each command means
ip -br address- Check that ens3 is the isolated cable interface.
sudo ip address add 192.0.2.10/24 dev ens3- Assign the client's distinct /24 address on the same subnet.
sudo ip link set ens3 up- Enable the client interface for the local cable.
dig -v- Record the available DNS query tool version.
ping -c 3 192.0.2.53- Send three ICMP tests to DNS1; this tests IP reachability, not DNS answers.
- What you should see
- DNS1 should reply; no Internet route is needed.
- Why this step matters
- A failed basic local path should be repaired before interpreting a DNS timeout.
Create the authoritative server configuration
In GNS3, right-click DNS1 and choose Console before typing. At DNS1's Bash shell, enter the complete multiline command below, including the closing QCS_FILE_END on its own unindented line. This here-document sends only the lines between its opening and closing markers into the named file. Keep the quotes around the opening marker so $TTL stays literal. A continuation prompt while entering these lines is normal; do not type the prompt. Enter no explanatory prose into the file. Use only the newly created private lab directory. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
cat > /tmp/qcs39/named.conf <<'QCS_FILE_END'
options { directory "/tmp/qcs39"; recursion no; listen-on port 1053 { 192.0.2.53; }; listen-on-v6 { none; }; pid-file "/tmp/qcs39/named.pid"; session-keyfile "/tmp/qcs39/session.key"; dnssec-validation no; }; controls {}; zone "lab.test" { type primary; file "forward"; }; zone "2.0.192.in-addr.arpa" { type primary; file "reverse"; };
QCS_FILE_ENDWhat each command means
cat > /tmp/qcs39/named.conf <<'QCS_FILE_END' options { directory "/tmp/qcs39"; recursion no; listen-on port 1053 { 192.0.2.53; }; listen-on-v6 { none; }; pid-file "/tmp/qcs39/named.pid"; session-keyfile "/tmp/qcs39/session.key"; dnssec-validation no; }; controls {}; zone "lab.test" { type primary; file "forward"; }; zone "2.0.192.in-addr.arpa" { type primary; file "reverse"; }; QCS_FILE_END- Create only the new lab named.conf. The redirection writes the bounded file text, without the delimiter lines. Its options disable recursion, bind the private listener and name the two zone files; no system configuration is changed.
- What you should see
- The shell prompt returns after QCS_FILE_END; the file names match the next two fixtures. No system named.conf is changed.
- Why this step matters
- Explicit private zones and an unprivileged port avoid depending on a public resolver or competing service.
Write the forward fixture
In GNS3, right-click DNS1 and choose Console before typing. At DNS1's Bash shell, enter the complete multiline command below, including the closing QCS_FILE_END on its own unindented line. This here-document sends only the lines between its opening and closing markers into the named file. Keep the quotes around the opening marker so $TTL stays literal. A continuation prompt while entering these lines is normal; do not type the prompt. Enter no explanatory prose into the file. Use only the newly created private lab directory. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
cat > /tmp/qcs39/forward <<'QCS_FILE_END'
$TTL 60
@ IN SOA ns.lab.test. admin.lab.test. (1 60 60 600 60)
@ IN NS ns.lab.test.
ns IN A 192.0.2.53
web IN A 192.0.2.80
web IN AAAA 2001:db8:39::80
www IN CNAME web.lab.test.
@ IN MX 10 mail.lab.test.
mail IN A 192.0.2.25
QCS_FILE_ENDWhat each command means
cat > /tmp/qcs39/forward <<'QCS_FILE_END' $TTL 60 @ IN SOA ns.lab.test. admin.lab.test. (1 60 60 600 60) @ IN NS ns.lab.test. ns IN A 192.0.2.53 web IN A 192.0.2.80 web IN AAAA 2001:db8:39::80 www IN CNAME web.lab.test. @ IN MX 10 mail.lab.test. mail IN A 192.0.2.25 QCS_FILE_END- Write the quoted multiline forward zone verbatim. $TTL remains literal and sets 60 seconds; SOA supplies timers; NS, A, AAAA, CNAME and MX declare records. QCS_FILE_END is a shell delimiter, not a DNS record.
- What you should see
- The shell prompt returns; the file ends with mail IN A 192.0.2.25 on its own line, with no instruction prose appended.
- Why this step matters
- The code block preserves each record's line boundary and trailing dots; separating prose prevents invalid extra fields.
Write the reverse fixture and validate
In GNS3, right-click DNS1 and choose Console before typing. At DNS1's Bash shell, enter the complete multiline command below, including the closing QCS_FILE_END on its own unindented line. This here-document sends only the lines between its opening and closing markers into the named file. Keep the quotes around the opening marker so $TTL stays literal. A continuation prompt while entering these lines is normal; do not type the prompt. Enter no explanatory prose into the file. Use only the newly created private lab directory. After the closing marker returns the ordinary prompt, run each validation command separately. Stop on any validation error before copying the baseline. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
cat > /tmp/qcs39/reverse <<'QCS_FILE_END'
$TTL 60
@ IN SOA ns.lab.test. admin.lab.test. (1 60 60 600 60)
@ IN NS ns.lab.test.
80 IN PTR web.lab.test.
QCS_FILE_END
named-checkconf /tmp/qcs39/named.conf
named-checkzone lab.test /tmp/qcs39/forward
named-checkzone 2.0.192.in-addr.arpa /tmp/qcs39/reverse
cp /tmp/qcs39/forward /tmp/qcs39/forward.baselineWhat each command means
cat > /tmp/qcs39/reverse <<'QCS_FILE_END' $TTL 60 @ IN SOA ns.lab.test. admin.lab.test. (1 60 60 600 60) @ IN NS ns.lab.test. 80 IN PTR web.lab.test. QCS_FILE_END- Write only the reverse-zone text between the markers. Owner 80 expands beneath 2.0.192.in-addr.arpa; the markers are not stored in the file.
named-checkconf /tmp/qcs39/named.conf- Check server configuration syntax; silence with successful exit is expected, not proof of running service.
named-checkzone lab.test /tmp/qcs39/forward- Validate the forward zone and report parsing errors before starting the service.
named-checkzone 2.0.192.in-addr.arpa /tmp/qcs39/reverse- Validate the independent reverse zone against its declared origin.
cp /tmp/qcs39/forward /tmp/qcs39/forward.baseline- Only after all checks succeed, keep the exact working forward fixture for later bounded restoration.
- What you should see
- Both zones should validate; stop and correct actual reported errors.
- Why this step matters
- A correct text file is necessary but must still be loaded by the intended running process.
Start the private DNS service
In GNS3, right-click DNS1 and choose Console before typing. At the ordinary nonroot shell, start the foreground server. Leave this Console occupied while using Client1. Stop on permission or listener errors. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
named -g -c /tmp/qcs39/named.confWhat each command means
named -g -c /tmp/qcs39/named.conf- Run this exact BIND configuration in the foreground and print diagnostics; no system service is replaced.
- What you should see
- Diagnostics should show both zones loaded and the private listener active. Do not invent a successful startup if errors appear.
- Why this step matters
- Keeping the process visible makes its stop action unambiguous: Ctrl+C in this same Console.
Inspect every record relationship
In GNS3, right-click Client1 and choose Console before typing. At the Linux shell, retain complete answers including status and the responding server. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
dig @192.0.2.53 -p 1053 web.lab.test. A
dig @192.0.2.53 -p 1053 web.lab.test. AAAA
dig @192.0.2.53 -p 1053 www.lab.test. CNAME
dig @192.0.2.53 -p 1053 lab.test. MX
dig @192.0.2.53 -p 1053 mail.lab.test. A
dig @192.0.2.53 -p 1053 lab.test. NS
dig @192.0.2.53 -p 1053 -x 192.0.2.80What each command means
dig @192.0.2.53 -p 1053 web.lab.test. A- Ask DNS1 explicitly on lab port 1053 for the IPv4 address.
dig @192.0.2.53 -p 1053 web.lab.test. AAAA- Ask for IPv6 data over the same IPv4 query path.
dig @192.0.2.53 -p 1053 www.lab.test. CNAME- Inspect the alias target rather than assuming it is an address.
dig @192.0.2.53 -p 1053 lab.test. MX- Inspect the preference and mail-target name.
dig @192.0.2.53 -p 1053 mail.lab.test. A- Resolve the MX target to its separate fixture address.
dig @192.0.2.53 -p 1053 lab.test. NS- Inspect the authoritative server name.
dig @192.0.2.53 -p 1053 -x 192.0.2.80- Construct and query the IPv4 reverse PTR name automatically.
- What you should see
- Answers should match the fixture; the responding server is .53#1053. Neither web nor mail services exist.
- Why this step matters
- All named endpoints are data relationships, not hidden working servers omitted from the topology.
Compare three failure signatures
In GNS3, right-click Client1 and choose Console before typing. At the Linux shell, compare each test with the same functioning authoritative server. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
dig @192.0.2.53 -p 1053 absent.lab.test. A
dig @192.0.2.53 -p 1053 web.lab.test. MX
dig @192.0.2.53 -p 1054 web.lab.test. A +time=1 +tries=1What each command means
dig @192.0.2.53 -p 1053 absent.lab.test. A- Ask for an absent name; expect NXDOMAIN from this fixture.
dig @192.0.2.53 -p 1053 web.lab.test. MX- Ask for a missing type at an existing name; expect NOERROR without an MX answer.
dig @192.0.2.53 -p 1054 web.lab.test. A +time=1 +tries=1- Ask an unused port with one one-second attempt; timeout or refusal differs from a DNS negative answer.
- What you should see
- The first two are DNS responses; the unused-port test does not supply a valid DNS answer.
- Why this step matters
- A status code and a network failure are different evidence and should not be collapsed into one error label.
Introduce one wrong A value
In GNS3, right-click DNS1 and choose Console before typing. Press Ctrl+C in the foreground DNS Console first. At the restored shell, change only web's A from 192.0.2.80 to 192.0.2.81 and SOA serial 1 to 2; save and exit. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
nano /tmp/qcs39/forward
named-checkzone lab.test /tmp/qcs39/forward
named -g -c /tmp/qcs39/named.confWhat each command means
nano /tmp/qcs39/forward- Edit the single A record and advance the zone serial; leave AAAA, CNAME and mail data unchanged.
named-checkzone lab.test /tmp/qcs39/forward- Reject syntax errors before loading the deliberate, syntactically valid wrong value.
named -g -c /tmp/qcs39/named.conf- Restart only the foreground lab service using the changed fixture.
- What you should see
- The server should load the modified zone even though its A value is intentionally wrong.
- Why this step matters
- Syntax validation cannot know the organization's approved destination address.
Observe and classify the wrong answer
In GNS3, right-click Client1 and choose Console before typing. At the Linux shell, use the same question and server as the recorded baseline. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
dig @192.0.2.53 -p 1053 web.lab.test. A
dig @192.0.2.53 -p 1053 www.lab.test. A
dig @192.0.2.53 -p 1053 -x 192.0.2.80What each command means
dig @192.0.2.53 -p 1053 web.lab.test. A- Compare the now-wrong .81 answer with the approved .80 baseline.
dig @192.0.2.53 -p 1053 www.lab.test. A- Follow the alias in an address query to inspect its target's changed data.
dig @192.0.2.53 -p 1053 -x 192.0.2.80- Show that the independent PTR was not automatically rewritten by the A change.
- What you should see
- NOERROR can accompany the wrong A data; the original PTR remains unchanged.
- Why this step matters
- A successful protocol response can still carry an operationally incorrect record.
Restore and reload the original record
In GNS3, right-click DNS1 and choose Console before typing. Press Ctrl+C in the running server Console. At the shell restore the baseline file, set its SOA serial to 3, then validate and restart. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
cp /tmp/qcs39/forward.baseline /tmp/qcs39/forward
nano /tmp/qcs39/forward
named-checkzone lab.test /tmp/qcs39/forward
named -g -c /tmp/qcs39/named.confWhat each command means
cp /tmp/qcs39/forward.baseline /tmp/qcs39/forward- Restore the exact lab forward data without touching other files.
nano /tmp/qcs39/forward- Change only the restored SOA serial from 1 to 3 so revision numbering moves forward.
named-checkzone lab.test /tmp/qcs39/forward- Validate the restored zone before serving it.
named -g -c /tmp/qcs39/named.conf- Start the private server with restored records and the newer serial.
- What you should see
- The authoritative A should again be .80; the alias, AAAA, MX, NS and PTR retain their original relationships.
- Why this step matters
- Restoration is completed by a query from the client, not by accepting a file-copy command.
Replay and repair one additional ticket
In GNS3, right-click DNS1 and choose Console before typing. First repeat the baseline queries in Client1's Console to verify the A repair, then return to DNS1. Ticket observations are synthetic. Optional replay follows serial 3 restoration: A6 uses serials 4 fault/5 corrected, MX1 6/7, NS1 8/9. Before each edit press Ctrl+C in this foreground server Console. Change only that ticket's specified record and SOA serial. Run these commands, perform the next client step, then repeat this step with the exact corrected line and next step again. Finish the pair before moving on; no parent delegation or application server is created. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
nano /tmp/qcs39/forward
named-checkzone lab.test /tmp/qcs39/forward
named -g -c /tmp/qcs39/named.confWhat each command means
nano /tmp/qcs39/forward- Apply only the selected ticket's explicit fault or correction and its serial; preserve all unrelated records.
named-checkzone lab.test /tmp/qcs39/forward- Validate the one edited zone; stop on a real error rather than serving an invalid fixture.
named -g -c /tmp/qcs39/named.conf- Restart only this private foreground service with the chosen ticket revision.
- What you should see
- Each corrected trial must restore the approved AAAA, MX or NS data before the next trial; author observations remain unexecuted.
- Why this step matters
- Independent fault/repair pairs reveal which record matters and avoid combining three faults into one ambiguous result.
Re-query the ticket and its dependencies
In GNS3, right-click Client1 and choose Console before typing. At the shell, run these explicit questions before and after each optional ticket correction. For MX1 also inspect web's A/AAAA when the bad target is web; for NS1 inspect mail's A when the bad target is mail. Preserve status, AA flag, server and serial. On paper predict the differences instead of claiming execution. Type each line without the prompt and press Enter. Stop on a syntax error; retain the console for recovery.
dig @192.0.2.53 -p 1053 web.lab.test. AAAA
dig @192.0.2.53 -p 1053 web.lab.test. A
dig @192.0.2.53 -p 1053 lab.test. MX
dig @192.0.2.53 -p 1053 mail.lab.test. A
dig @192.0.2.53 -p 1053 mail.lab.test. AAAA
dig @192.0.2.53 -p 1053 lab.test. NS
dig @192.0.2.53 -p 1053 ns.lab.test. A
dig @192.0.2.53 -p 1053 lab.test. SOA +norecurse
dig @192.0.2.53 -p 1053 lab.test. SOA +norecurse +tcpWhat each command means
dig @192.0.2.53 -p 1053 web.lab.test. AAAA- A6 checks the independent IPv6 record against ::80, not merely a successful A lookup.
dig @192.0.2.53 -p 1053 web.lab.test. A- Check A6's unchanged .80 data and MX1's incorrectly selected web target.
dig @192.0.2.53 -p 1053 lab.test. MX- Check both preference and target; MX1 must return 10 mail.lab.test. after repair.
dig @192.0.2.53 -p 1053 mail.lab.test. A- Resolve the correct mail target to .25; also expose NS1's wrong server target address.
dig @192.0.2.53 -p 1053 mail.lab.test. AAAA- Distinguish an existing mail name without IPv6 data from an absent name.
dig @192.0.2.53 -p 1053 lab.test. NS- Check NS1 restores ns.lab.test. as the server name.
dig @192.0.2.53 -p 1053 ns.lab.test. A- Verify the intended NS target resolves to the real DNS1 address .53.
dig @192.0.2.53 -p 1053 lab.test. SOA +norecurse- Check the directly addressed authoritative zone and expected serial without requesting recursion.
dig @192.0.2.53 -p 1053 lab.test. SOA +norecurse +tcp- Repeat the same direct authority check using TCP; this still does not test parent delegation.
- What you should see
- Corrected values match the ticket plan; mail AAAA remains absent. A direct authoritative response is not an HTTP, SMTP or recursive-delegation success.
- Why this step matters
- The repeated question and dependent name lookups distinguish bad family data, a wrong MX target and misleading NS information.
Repeat the baseline and stop cleanly
In Client1's Console repeat every command from Inspect every record relationship and compare values. Then press Ctrl+C in DNS1's Console to stop only this foreground service. Stop both GNS3 nodes and retain the notes.
- What you should see
- All six record questions should match the planned data; record discrepancies and do not report application success.
- Why this step matters
- The final comparison checks collateral changes and keeps predicted behavior distinct from measured results.
Verify
- Compare name, type, status, answer and responding server for all six record types.
- Confirm the wrong A produces a valid DNS response with wrong data, while PTR remains independent.
- Distinguish NXDOMAIN, missing-type NOERROR and an unused-port timeout or refusal.
- After restoration repeat alias, address, mail, authority and reverse questions, not only the edited A query.
- For A6, MX1 and NS1 record synthetic expected/observed data, the exact corrected line and repeat queries; label optional replay unexecuted unless actually performed.
- Explain why direct NS/SOA success does not prove parent delegation, and why correct DNS still needs separately prepared HTTP/TLS or SMTP service checks.
Troubleshoot
- named fails to start: inspect its actual diagnostics, directory ownership, AppArmor policy and listener conflicts. Do not disable host security globally; use an approved disposable image or the paper alternative.
- Timeout on every query: confirm both ens3 addresses, server process and UDP/TCP 1053 reachability. A valid zone file does not prove a listener exists.
- Wrong expanded target name: inspect trailing dots and the zone origin before changing the resolver or route.
- Different answers through a caching resolver: compare direct authority and TTLs; this direct-query fixture does not reproduce public cache expiration.
GNS3 does not provide Cisco software images. Use Cisco images only when the applicable license or entitlement permits this environment. Do not share or redistribute image files. Cisco Modeling Labs is an official alternative; its supplied reference images are licensed for CML, not automatically for export to GNS3. Use the labeled paper alternative when authorized software is unavailable. No emulator execution is claimed by this lesson.
- Stop the foreground named process with Ctrl+C in DNS1's Console and verify it exits.
- Stop or discard the two disposable nodes; never copy the private test zone into a public DNS service.
Practice set
Answer before you reveal
01Which type returns an IPv6 address?
The query can travel over IPv4 or IPv6 independently of the address family returned. An IPv6 answer does not configure IPv6 connectivity.
02What additional check follows an MX answer?
MX supplies a preference and a hostname. The sending application still needs a usable target address and a working mail service.
03A web A is correct at .80, but .80 PTR returns old.lab.test. What owns the repair?
In the private reverse file, correct only that PTR and advance its SOA serial, validate the reverse zone, restart the private server and repeat dig -x against .53:1053 plus the forward A. Do not change a correct A to match a wrong PTR.
04Why can NOERROR still be a problem?
A protocol status does not compare an address with your approved plan or prove the corresponding application is healthy.
05Why keep the server address in the evidence?
A comparison without the responding server loses the context needed to distinguish authoritative data from caching or split configuration.
06What does the .81 fault actually test?
It does not measure a web outage because neither .80 nor .81 is a web endpoint in the private two-node topology.
07A6 returns the right A but AAAA ::81 instead of planned ::80. What changes?
Validate and reload the private zone with a newer serial. Do not disable IPv6 or overwrite the correct A. A repaired answer still does not establish an IPv6 route or web listener.
08MX1 points to web.lab.test, which resolves. Why can mail still be misdirected?
Repeat MX and the returned target's A/AAAA after validation and reload. In this fixture mail has A .25 only; a real SMTP connection and controlled delivery remain separate, unperformed checks.
09NS1's direct .53 answer works but NS names mail.lab.test. What must be corrected?
Re-query NS, server address and authoritative SOA over UDP/TCP. A separate stale parent referral belongs to the parent owner and is not repaired or exercised by this direct-query lab.
10www's CNAME is changed to absent.lab.test while web A remains correct. What next?
The broken alias can produce failure despite a healthy web A. Validate the corrected zone and repeat CNAME, www A and web AAAA using the same private authority; HTTP behavior remains untested.
Knowledge check
Quiz: prove the reasoning
Keep these
Technical takeaways
- Choose the record type that answers the actual diagnostic question.
- Follow alias and mail-target names to their address records.
- Treat forward and reverse data as independently maintained.
- Preserve status and responding server as well as answer values.
- A correct DNS answer does not demonstrate a working application.
