260 likes | 313 Views
APPLICATION LAYER. DNS E-MAIL WWW. Domain Name System (DNS). Addressing in the Internet uses 4 bytes (IPv4), commonly represented in dotted decimal notation Nice for machines, impractical for human beings Do you recognize (or could remember) 131.234.25.30 ?
E N D
APPLICATION LAYER • DNS • E-MAIL • WWW
Domain Name System (DNS) • Addressing in the Internet uses 4 bytes (IPv4), commonly represented in dotted decimal notation • Nice for machines, impractical for human beings • Do you recognize (or could remember) 131.234.25.30 ? • More convenient: Mnemonic names for communication peers • E.g., www.kluniversity.in • Domain Name System (DNS) solves this need
DNS – Architecture • DNS maps names to addresses • Actually: maps to resource records • Names are structured hierarchically into a name space • Max. 63 characters per component, max. 255 characters total • Domains, each domain owner controls name space below it • Mapping done by name servers (well known, hierarchical)
One or more entries per host name IP address willing to handle email for a given domain DNS resource records • Resource records: Information about domains, single hosts, … • Structure: • Domain_name: Domain which is described by record (can have multiple) • Time_to_live: Validity, in seconds • Class: For Internet, always “IN” (anything else rarely seen) • Type: See table • Value: Actual value
DNS name servers • Name space divided into zones • Each zone has a primary name server with authoritative information • Also secondary name server for dependability • Each name server knows about • Its own zone • Name servers of all its children zones • Their siblings or about some server that knows about the siblings
DNS query resolution • Queries by an end system are sent to their pre-configured name server (obtained from configuration, DHCP,…) • If possible, that name server answers query • If not, it will forward query to the “most suitable” name server in the zone hierarchy it is aware of • Continues recursively • Answer sent back through intermediate servers • Servers may cache replies (with limited time to live)
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 server, if necessary 3. root name server contacts authoritative name server, dns.umass.edu, if necessary local name server dns.eurecom.fr DNS root name server 2 4 3 5 authoritative name server dns.umass.edu 1 6 requesting host surf.eurecom.fr gaia.cs.umass.edu
Electronic Mail • Architecture and Services • The User Agent • Message Formats • Message Transfer • Final Delivery
Architecture and Services Architecture: Header and Body. Basic functions • Composition (compose) • Transfer (send/recv) • Reporting (whether successfully delivered or not etc) • Displaying • Disposition (delete/save etc) User Agent User Agents deals with providing an interface to the user to perform various functions. For Eg. Outlook Express, Yahoo mail, etc.
Message Formats – RFC 822 RFC 822 header fields related to message transport.
Message Formats – RFC 822 Some fields used in the RFC 822 message header.
Problems with RFC 822 • Messages in languages without NLC alphabet (e.g. Chinese and Japanese) • Messages in languages with accents (e.g. French and German) • Messages in non-Latin alphabets (e.g. Russian) • Messages containing audio and images. Solution: MIME – Multipurpose Internet Mail Extensions: RFC 2045-2049
MIME RFC 822 headers added by MIME.
MIME http://al.mail-list.com/s/al/m/als/l/8607-multipart-alternative-email
Message Transfer • SMTP (Simple Mail Transfer Protocol) • POP3(Post Office Protocol Version 3) • IMAP (Internet Message Access Protocol)
SMTP • An SMTP client (running on the sender’s mail server) establishes a TCP connection at port 25 with SMTP server (running on receiver’s mail server). • SMTP server is continuously listening to port 25. • If the server is ready to accept mail from the client it informs else try later. • Once the connection is established, client announces whom the mail is coming from and whom is it meant for. • If such a recipient exists at the server’s side it gives a go-ahead. • Client sends the message and the server acknowledges. • Send more if required else connection is released. Drawback Receiver was expected to be online all the time.
POP3 In SMTP how does the user get the e-mail from the ISP's message transfer agent if NOT Online ? The solution to this problem is to create another protocol that allows user transfer agents (on client PCs) to contact the message transfer agent (on the ISP's machine) and allow e-mail to be copied from the ISP to the user. One such protocol is POP3 (Post Office Protocol Version 3).
Final Delivery (a)Sending and reading mail when the receiver has a permanent Internet connection and the user agent runs on the same machine as the message transfer agent. (b) Reading e-mail when the receiver has a dial-up connection to an ISP.
POP 3 • POP3 begins when the user starts the mail reader. • The mail reader calls up the ISP (unless there is already a connection) and establishes a TCP connection with the message transfer agent at port 110. • Once the connection has been established, the POP3 protocol goes through three states in sequence: 1. Authorization. 2. Transactions. 3. Update. • The authorization state deals with having the user log in. • The transaction state deals with the user collecting the e-mails and marking them for deletion from the mailbox. • The update state actually causes the e-mails to be deleted
Problems with POP3 • Once the receiver downloaded the message, it was erased from the mailbox at the ISP. • The only copy was at the user’s hard disk and if it crashes all the mails are gone.
IMAP • INTERNET MESSAGE ACCESS PROTOCOL • Unlike POP3, which basically assumes that the user will clear out the mailbox on every contact and work off-line after that, IMAP assumes that all the e-mail will remain on the server indefinitely in multiple mailboxes. • Using IMAP messages will not be transferred to the user's computer for permanent storage. • IMAP provides mechanisms for creating, destroying, and manipulating multiple mailboxes on the server. • In this way a user can maintain a mailbox for each correspondent and move messages there from the inbox after they have been read.
IMAP A comparison of POP3 and IMAP.