Course: NET-101, Week 8
Time: ~90 minutes
Tools: Academy pcap-tools workbench at /pcap-tools/; terminal for dig
Captures: fundamentals-dns-query.pcap, dns-lookup.pcap
Part 1: Dig trace -- the full delegation chain (~30 minutes)
In your terminal, run:
dig +trace A virtuscyberacademy.org
This sends queries step by step through the DNS hierarchy and prints each one.
Exercise 1.1 -- Record the chain:
| Step | Server queried | Response type | What the response said |
|---|---|---|---|
| 1 (root) | NS records for .org | ||
| 2 (.org TLD) | NS records for virtuscyberacademy.org | ||
| 3 (authoritative) | A record |
- How many total DNS queries did
dig +traceissue to resolvevirtuscyberacademy.org? - What are the names of the
.orgTLD servers that responded? - What is the TTL on the final A record answer?
Exercise 1.2 -- Compare cached vs fresh:
Run dig A virtuscyberacademy.org (without +trace) twice, a few seconds apart.
- Does the TTL value change between the first and second query? By how much?
- What does the changing TTL tell you about where this answer is coming from?
Run dig +norecurse A virtuscyberacademy.org @a.root-servers.net (queries a root server directly, without recursion).
- What does the root server return? Is it an A record or a referral?
Part 2: Read DNS records from captures (~30 minutes)
Load fundamentals-dns-query.pcap in pcap-tools.
Apply dns.
Exercise 2.1 -- Message format deep read:
Click the DNS query packet. Expand "Domain Name System (query)."
- Write out the 12-byte DNS header fields: Transaction ID, Flags (as a number), Questions count, Answer RRs count, Authority RRs count, Additional RRs count.
- What is the actual structure of the question section? (Name, Type, Class -- write the values.)
Click the DNS response packet.
- Expand the "Answers" section. What is the full wire format of the answer? (Name, Type, Class, TTL, Data Length, Address -- write all values.)
- Is the answer section compressed using DNS name compression? (Look for a pointer, which appears as
c0 0cin the hex.)
Exercise 2.2 -- Multiple record types:
Load dns-lookup.pcap. Apply dns.
- What record types appear in the answer sections across all DNS packets in this capture?
- Apply
dns.qry.type == 28. Are there any AAAA queries? - Apply
dns.flags.response == 1 and dns.flags.rcode != 0. Are there any error responses? (rcode != 0 means not NOERROR.)
Part 3: DNS record type survey (~20 minutes)
Using dig from your terminal, look up the following for a domain of your choice (you may use google.com):
dig A google.com
dig AAAA google.com
dig MX google.com
dig NS google.com
dig TXT google.com
dig SOA google.com
- For each record type, write: the record type, the value returned, and one sentence explaining what this record is used for.
- What is the SOA record's
MNAME(master name server) for the domain you chose? - What is the negative TTL value in the SOA record? What does this control?
Part 4: Observation and filter (~10 minutes)
- Write a Wireshark display filter that shows only DNS responses where the answer section contains at least one A record:
dns.flags.response == 1 and dns.a. Test it ondns-lookup.pcap. - Write a filter that shows only NXDOMAIN responses (non-existent domain):
dns.flags.rcode == 3. (You may need to generate one yourself:dig nonexistent.virtuscyberacademy.orgto trigger an NXDOMAIN, then check the response.)
Artifact
Create lab-8-1.md in your net-101/ Git repo with:
- The delegation chain table from Exercise 1.1
- All dig outputs (copy-paste the terminal output)
- Answers to all questions
- Your display filters from Part 4
Commit with a meaningful commit message.