Domain Name System (DNS) Flashcards
Naming & Addressing
- Names & Addresses
– To call someone, you need to ask for his/her phone number
– To mail someone, you need to get their address - How does naming and addressing work in the
Internet?
– If you need to reach Google do you need their IP
* Does anyone know Google’s IP?
– Problem:
* People can’t remember IP addresses
* Need human-readable names that map to IP addresses
Internet Names & Addresses
- IP Addresses, e.g. 148.88.2.80
– Computer usable labels for machines
– Conform to structure of the network - Names, e.g. www.lancaster.ac.uk
– Human usable labels for machines
– Conform to organizational structure - How do you map from one to the other?
-> Domain Name System (DNS)
Internet Names & Addresses
(Indirection)
- Indirection is the ability to reference objects (such as data) using a name (identity) instead of the value of the object (such as an address).
- Quite simply, it means not direct.
– If there is a direct connection between two things, indirection means that something is placed in the middle so that another level of indirection is created.
History
- Before DNS, all mappings were in hosts.txt
- /etc/hosts on Linux
- C:\Windows\System32\drivers\etc\hosts on Windows
- Process
- Centralized, manual system
- Changes were submitted
- Machines periodically FTP new copies of hosts.txt
- Administrators could pick names at their discretion
- Any name was allowed
- You could name your server as:
- “best_server_in_the_world”
- You could name your server as:
The Need for Something Better
- System administrators had to update hosts file on every machine to include every host their users might access
- Any machine not in hosts file could only be accessed using IP address
Hosts Files Today
- Used mainly to bypass DNS
- … not suited to Internet scale
- Error prone
- No trigger for updates
- Name to IP mappings change
- No guarantee of network wide consistency
- No trigger for updates
- Can ‘guarantee’ access to important local servers
- Beware over use due to above problems
From host.txt to DNS
- host.txt
- Not scalable
-> need for scalable system
- SRI cannot handle load - Hard to enforce uniqueness of names
-> need for unique naming system
- e.g. UCL
= University College London
= Universite Catholique de Louvain - Many machines had inaccurate copies of hosts.txt
-> need for real-time system
- Stanford-Research-Insitute: Network-Information-Center (NIC) updated hosts.txt periodically
- Not scalable
- Hence, DNS was born
- Paul Mockapteris released the first version in 1984
- RFCs 882 and 883
- Superseeded by 1034 and 1035
DNS: domain name system
- People: many identifiers:
– Name, passport #, National Insurance Number, etc. - Internet hosts, routers:
– IP address (32 bit) - used for addressing datagrams
– “name”, e.g., www.yahoo.com - used by
humans
Q: how to map between IP address and name, and vice versa?
- Domain Name System:
– Distributed database implemented as a hierarchy of many name servers
– Application-layer protocol: hosts, name servers communicate to resolve names (address/name translation)- Note: core Internet function, implemented as application layer protocol
- Complexity at network’s “edge
DNS: services, structure
- DNS services
– Hostname to IP address translation
– Host aliasing
* Alias namesècanonical
– Mail server aliasing
– Load distribution
* Replicated Web servers: many IP addresses correspond to one name - Why not centralize DNS?
– Single point of failure
– Traffic volume
– Distant centralized database
– Maintenance
Answer: it wouldn’t scale! DNS handles billions of queries per day!
- Host aliasing:
- www.lancaster.ac.uk -> www.lancs.ac.uk
DNS: a distributed, hierarchical database
- Client wants IP for www.amazon.com; 1st approximation:
– Client queries root server to find com DNS server
– Client queries .com DNS server to get amazon.com DNS server
– Client queries amazon.com DNS server to get IP address for www.amazon.com
Internet Domain Names
Subdomains
One domain is a subdomain of another if
its domain name ends in the other’s domain name
– So comp.lancs.ac.uk is a subdomain of
* lancs.ac.uk
which is sub-domain of
* ac.uk
which is sub-domain of
* uk
Fully Qualified Domain Names (FQDN)
- FQDNs end with a dot
– Implies rooted at top of DNS hierarchy
– No further resolution needed
– cs-lab.co.uk. - Names without a dot can be extended toward root
DNS: root name servers
- Contacted by local name server that can not resolve name
- Root name server:
– Contacts authoritative name server if name mapping not known
– Gets mapping
– Returns mapping to local name server
‘13’ Root Servers
- Updated twice a day from non-public registry file server*
- Each server has a redundant backup
- They are also replicated across globe
– More than 13 physical machines!
– Get records for closest servers
– Addresses for one of each server hard-coded into resolvers etc