Learn / Walkthrough

Following a DNS lookup

Every connection to a named server starts with DNS. This capture shows a successful lookup, a misspelled name, and a lookup answered from the resolver's cache.

  1. The question

    Packet 1

    The laptop asks for the A record of api.shop.example. A records hold IPv4 addresses.

    Think about it: Which transport protocol does this DNS query use?

    UDP, to port 53. DNS queries are small, so UDP's speed wins.

  2. The answer

    Packet 2

    The resolver answers in 21 ms with the address and a time to live, which says how long the answer can be cached.

  3. A small typo

    Packet 3

    Two seconds later the laptop asks for api.shpo.example. Notice the swapped letters.

  4. That name doesn't exist

    Packet 4

    The resolver answers NXDOMAIN: no such name. The app that asked will show an error, often a vague one.

    Think about it: Where would you look to fix this?

    In whatever setting or link contains the misspelled name. The network itself is fine.

  5. Faster the second time

    Packet 6

    The correct name is asked again and answered in 2 ms, because the resolver kept the earlier answer in its cache.