Upload
amber-houston
View
212
Download
0
Tags:
Embed Size (px)
Citation preview
1
Application LayerApplication LayerLecture 6Lecture 6
Imran AhmedImran AhmedUniversity of Management & TechnologyUniversity of Management & Technology
2
Agenda
• Principles of network applications
• Web and HTTP
• FTP
• Electronic Mail– SMTP, POP3, IMAP
• DNS
3
DNS: Domain Name System
• Computers use addresses.
• Humans cannot remember IP addresses – need names.
• Simplest solution: Each computer has a unique name and has a build in table of name to address translation.
• Problem: Not scalable.
• Solution: DNS (adopted in 1983)
Domain Name System:• distributed database
implemented in hierarchy of many name servers.
• application-layer protocol host, routers, name servers to communicate to resolve names (address/name translation).– note: core Internet function,
implemented as application-layer protocol
– complexity at network’s “edge”
4
Domain Name System (DNS)
• In the Internet, the domain name space (tree) is divided into three different sections:-– Generic domains– Country domains– Inverse domains
5
DNS in the Internet
6
Domain Name System (DNS)
• Generic domains:– It defines registered hosts according to their
generic behavior.– Each node in a tree defines a domain, which is
an index to the domain name space database.
7
Generic Domains
8
DNS• Country Domain:
– It follows the same format as the generic domains but uses two-character country abbreviations (e.g., “pk” or Pakistan) in place of the three-character organizational abbreviations at the first level.
• Inverse Domain:– It is used to map an address to a name.– This may happen, for example, when a server has received a
request from a client to do a task.– Whereas the server has a file that contains a list of authorized
clients, the server lists only the IP address of the client (extracted from the received IP packet).
– To determine, if the client is on the authorized list, it can send a query to the DNS server and ask for a mapping of address to name.
9
Country Domains
10
Inverse Domain
11
DNS Name Servers
• Local Name Servers:– Each ISP, company has local (default) name
server.– Host DNS query first goes to local name server.
• Authoritative Name Server:– For a host – stores that host’s IP address, name.– It can perform name/address translation for that
host’s name.
12
DNS Name Servers
• Root Name Servers:– It contacts authoritative name server, if name
mapping is not known.– Gets mapping and returns to local name server.
13
14
Simple DNS Example
• Host surf.eurecom.fr wants IP address of gaia.cs.umass.edu.
1. Contacts its local DNS server, dns.eurecom.fr
2. dns.eurecom.fr contacts root name servers, if necessary
3. Root name server contacts authoritative name server, dns.umass.edu, if necessary
15
DNS Example
16
DNS Example (Cont.)
• Root Name Server:– May not know authoritative name server– May know intermediate name server – who to
contact to find authoritative name server
17
18
DNS Queries
• Recursive query:– Puts burden of name resolution on contacted
name server– Heavy load?
• Iterated query:– Contacted server replies with name of server to
contact– “I don’t know this name, but ask this server”
19
20
DNS: Cashing & Updating Records
• Once (any) name server learns mapping, it caches mapping.– Cache entries timeout (disappear) after some
time.
• Update/notify mechanisms under design by IETF.– RFC 2136– http://www.ietf.org/html.charters/dnsind-sharter.html
21
DNS Records• Distributed db storing resource
records (RR)• Type=A
– Name is hostname– Value is IP address
• Type=NS– Name is domain (e.g., foo.com)– Value is IP address of authoritative
name server for this domain• Type=CNAME
– Name is alias name for some “cannonical” (the real) name (e.g., ww.ibm.com is real & servereasr.backup2.ibm.com is cannonical)
– Value is cannonical name• Type=MX
– Value is name of mailserver associated with name