Overview
This lecture introduces DNS (Domain Name System), its role in networks, basic operations, related commands, and how to configure DNS on Cisco devices for the CCNA exam.
Purpose and Function of DNS
- DNS resolves (translates) human-readable domain names like google.com into IP addresses.
- Computers communicate using IP addresses, but DNS allows users to remember and use names instead.
- DNS is essential for accessing resources on the internet without memorizing IP addresses.
How DNS Works
- A DNS client (like a PC) sends a DNS query to its configured DNS server to resolve a domain name.
- The DNS server responds with the corresponding IP address.
- DNS servers can be manually configured or automatically assigned via DHCP.
- Standard DNS lookups usually use UDP port 53; TCP is used for messages over 512 bytes.
DNS Records and Commands
- âAâ records map hostnames to IPv4 addresses.
- âAAAAâ (quadruple A) records map hostnames to IPv6 addresses.
- âCNAMEâ records (canonical names) map one name to another domain name.
- Windows command
IPCONFIG /ALL shows the DNS server configuration.
NSLOOKUP <domain> queries the DNS server for a domain's IP.
IPCONFIG /DISPLAYDNS shows the DNS cache; /FLUSHDNS clears it.
DNS Caching and Hosts File
- Devices store DNS responses in a local DNS cache to reduce repetitive queries.
- The Windows hosts file allows manual hostname-to-IP mappings, serving as an alternative to DNS in small networks.
DNS Configuration on Cisco IOS
- By default, routers just forward DNS packets and don't need DNS configuration.
- To configure a Cisco router as a DNS server: use
ip dns server and ip host <name> <IP>.
- Set an external DNS server for the router using
ip name-server <IP>.
- Enable DNS lookup with
ip domain-lookup (default enabled).
- Assign a default domain with
ip domain name <domain>.
- Use
show hosts to display learned and configured host entries.
Practice Quiz Review
IPCONFIG /ALL and NSLOOKUP display the system's DNS server.
- DNS âAâ records map names to IPv4; âAAAAâ to IPv6 addresses.
- Cisco routers can function as both DNS clients and servers.
- Routers usually do not need DNS config to forward DNS packets.
show hosts on Cisco IOS shows cached and configured DNS mappings.
- DHCP can assign DNS servers to clients automatically.
Key Terms & Definitions
- DNS â Resolves domain names to IP addresses.
- A record â Maps a hostname to an IPv4 address.
- AAAA record â Maps a hostname to an IPv6 address.
- CNAME â Maps one domain name to another.
- DNS cache â Stores resolved domain names and IPs locally.
- DHCP â Dynamically assigns IP and DNS server information to clients.
- Hosts file â Local text file mapping names to IP addresses.
Action Items / Next Steps
- Review Windows and Cisco CLI DNS-related commands.
- Practice hands-on DNS configuration with Packet Tracer lab (next video).
- Study provided flashcards for DNS concepts.
- Watch for upcoming DHCP lesson.