TTR Networks

What is DNS?

Domain Name System

DNS (Domain Name System) is the internet's distributed directory that turns names like www.example.com into IP addresses, and answers other name queries.

DNS is a hierarchy. The root servers know who runs each top-level domain such as .com or .au; those servers know who is authoritative for each domain beneath them; and the authoritative servers hold the actual records. A device rarely does that walk itself. It asks a recursive resolver (run by an ISP, an organisation or a public service), which follows the referrals from the root down, caches each answer for as long as the record's TTL allows, and returns the result. Queries normally use UDP port 53, falling back to TCP port 53 for large responses and zone transfers. Common record types are A (IPv4 address), AAAA (IPv6 address), CNAME (alias), MX (mail server), NS (name server) and PTR (reverse lookup, address to name).

Many "the network is down" reports turn out to be name resolution problems, so it's worth checking DNS separately from connectivity: if ping 192.0.2.10 works but ping server.example doesn't, look at DNS first. On Linux, applications resolve through /etc/nsswitch.conf, which usually checks /etc/hosts before DNS, using the servers listed in /etc/resolv.conf. dig queries DNS directly, while getent hosts resolves the same way applications do, so comparing the two narrows down where the fault is. An NXDOMAIN answer means the name doesn't exist, which is different from a timeout or SERVFAIL. The Linux Network Connectivity lesson covers DNS troubleshooting on a real lab, and Office gateway: DHCP, DNS and VRRP on VyOS sets up a DNS forwarder for an office.

Lessons that use DNS

  • Linux Network ConnectivityTeaches this term · Beginner · 80 min

    Find out why a Linux machine can't reach something, layer by layer: interfaces and addresses, routes and ip route get, ARP and the neighbour table, ping and traceroute, DNS, and listening sockets — with real output from a three-host lab.

  • Office gateway: DHCP, DNS and VRRP on VyOSBeginner · 40 min

    Two VyOS routers serving one office LAN: VRRP for a gateway that survives a router failure, DHCP with split pools and a printer reservation, and DNS forwarding. Then a real failover, the DNS outage it exposed, and the fix.

  • IPv6 on VyOS: setup and routingBeginner · 55 min

    Number a site from an ISP's /48 on VyOS: WAN and blackhole routes, SLAAC with Router Advertisements, handing a /56 to a downstream router statically and with DHCPv6 prefix delegation, and the forward firewall IPv6 needs because there's no NAT. Every output comes from a real two-router VyOS lab.

  • Setting up VyOS with NATBeginner · 45 min

    A VyOS router with a NAT interface for a private LAN and a public interface for a routed public subnet: plain routing, source NAT, port forwarding and the forward firewall that NAT isn't. Every output comes from a real VyOS lab.

  • Packets That Never Come BackIntermediate · 75 min

    Advanced packet capture with tcpdump, and how to find where packets die on a VyOS network: missing NAT and return routes, asymmetric routing through a stateful firewall, and MTU black holes, all diagnosed on a real VyOS router.

Related terms