14 DNS : The Domain Name System
14 Introduction - Problem Computers are used to work with numbers Humans are used to work with names ==> IP addresses are NUMBERS :-/ ?
14 Introduction Hosts.txt Distributed Database Mapping between IP-address and Hostnames Mail routing Client-Server Resolver - Name servers
14 Naming convention Hierarchical wwwsnmp.cs.utwente.nl [0..9,a..z,A..Z,-] Not case sensitive hostname domain wwwsnmp cs utwente nl. Geography IP Subnet No Relation ?
14 DNS Tree. arpacomdenlbeorgnetmilintgoveduin-addr groeptmonsantoea country domainsgeneric domains TLD Root in-addr.arpa.FQDN
14 Basics Delegation by zone Primary Name Server Root Name Server
14 1. Connection initiated from web-browser or other service to request the name. RESOLVER Internet DNS Server Forward Lookup
14 Internet DNS Server 1. Connection initiated from web-browser or other service to request the ip address. RESOLVER 2. DNS replies with ip address Forward Lookup
14 Internet DNS Server 1. Connection initiated from web-browser or other service to request the ip address. RESOLVER 2. DNS replies with ip address 3. Web browser requests page using the ip address Forward Lookup
14 Internet DNS Server 1. Connection initiated from web-browser or other service to request the ip address. RESOLVER 2. DNS replies with ip address 3. Web browser requests page using the ip address 4. Web server replies with webpage Forward Lookup
14 Lookup to Internet groept.be Resolver issues a recursive lookup 2. Local nameserver issues an itterative lookup to root name server for.com Root name server.com..cisco.com. recursive itterative
14 Lookup to Internet groept.be Resolver issues a recursive lookup 2. Local nameserver issues an itterative lookup to root name server for.com Root name server.com..cisco.com. recursive itterative
14 Lookup to Internet groept.be Resolver issues a recursive lookup 2. Local nameserver issues an itterative lookup to root name server for.com Root name server.com..cisco.com. recursive itterative
14 Lookup to Internet groept.be Resolver issues a recursive lookup 2. Local nameserver issues an itterative lookup to root name server for.com 3. Local nameserver answers with the IP address Root name server.com..cisco.com. recursive itterative
14 Lookup to Internet groept.be Resolver issues a recursive lookup 2. Local nameserver issues an itterative lookup to root name server for.com 3. Local nameserver answers with the IP address 4. Browser request the page using the IP address Root name server.com..cisco.com. recursive itterative
14 Sequential Lookup to Internet groept.be Second machine issues the same recursive lookup Root name server.com..cisco.com. recursive
14 Sequential Lookup to Internet groept.be Second machine issues the same recursive lookup 2. Local nameserver provides a cached answer Root name server.com..cisco.com. recursive
14 Sequential Lookup to Internet groept.be Second machine issues the same recursive lookup 2. Local nameserver provides a cached answer 3. Browser request the page using the IP address Root name server.com..cisco.com. recursive
14 Name server types Root name server Primary name server Secondary name server Caching-only name server Slave servers – forwarding server
14 NSLOOKUP – Your tool ! Forward Lookup nslookup gateway.pharmacia.com Name: gateway.pharmacia.com Address: Reverse Lookup nslookup Name: gateway.pharmacia.com Address:
14 New developments DNS dynamic updates using Secure DNS Prompt notification of zone changes Incremental zone transfers
14 Resource records SOA-record NS-record A-record CNAME-record HINFO-record PTR-record MX-record
14 SOA-record # nslookup Default Server: bebrump001.bebru.eu.pnu.com Address: > set type=SOA > monsanto.com Server: bebrump001.bebru.eu.pnu.com Address: Non-authoritative answer: monsanto.com origin = srvsn0.monsanto.com mail addr = hostmaster.srvsn0.monsanto.com serial = refresh = 3600 (1H) retry = 1800 (30M) expire = (5D) minimum ttl = (1D) Authoritative answers can be found from: srvsn0.monsanto.com internet address =
14 NS-Record > set type=NS > groept.be Server: bebrump001.bebru.eu.pnu.com Address: Non-authoritative answer: groept.be nameserver = mail.groept.be groept.be nameserver = ns.eu.net groept.be nameserver = dns.eunet.be Authoritative answers can be found from: mail.groept.be internet address = ns.eu.net internet address = dns.eunet.be internet address = >
14 A-record > set type=A > Server: bebrump001.bebru.eu.pnu.com Address: Name: Address: > A
14 CNAME-record IN A chekov.Belgium.EU.net IN A relay.eunet.beIN CNAMEchekov.Belgium.EU.net > relay.eunet.be Server: bebrump001.bebru.eu.pnu.com Address: Name: relay.eunet.be Addresses: , ,
14 HINFO-record chekov.Belgium.EU.net IN HINFO“SUN E 450” “Solaris”
14 PTR-record > set type=PTR > Server: bebrump001.bebru.eu.pnu.com Address: in-addr.arpa name = jupiter.Belgium.EU.net in-addr.arpa nameserver = dns.eunet.be in-addr.arpa nameserver = ns.EU.net dns.eunet.be internet address = > in-addr.arpa IN PTR jupiter.Belgium.EU.net
14 MX-record > set type=MX > pharmacia.com Server: bebrump001.bebru.eu.pnu.com Address: Non-authoritative answer: pharmacia.com preference = 100, mail exchanger = gateway.pharmacia.com pharmacia.com preference = 200, mail exchanger = gateway3.pharmacia.com pharmacia.com preference = 100, mail exchanger = ns3.pharmacia.com Authoritative answers can be found from: gateway.pharmacia.com internet address = gateway3.pharmacia.com internet address = > pharmacia.com IN MX100 gateway.pharmacia.com pharmacia.com IN MX100 ns3.pharmacia.com pharmacia.com IN MX200 gateway3.pharmacia.com
14 DNS Message Format identification flags QR opcode AA TC RD RA zero rcode number of questions questions answers (variable number of resource records) number of answer RRs number of authority RRsnumber of additional RRs authority (variable number of resource records) additional information (variable number of resource records) 12 bytes
14 Question Portion of DNS Query Message query name query typequery class