Professional Documents
Culture Documents
Last Lecture
Todays Lecture
Electronic mail (Email)
SMTP Domain Name System (DNS)
First Line of HTTP request message The request line has three fields Method field can take on several values GET,POST, PUT, DELETE etc Majority of HTTP request messages use GET URL field HTTP version field Header Lines Host: Host on which the object resides User-agent: Identifies the client program e.g. Mozilla/4.0 Connection: Shows whether the connection should be closed or not Accept-language: Shows the language the client prefers
GET method Used with the POST method Web page often includes form input Input is sent to server in body
PUT method: To upload objects to web server DELETE method Allows a user or an application to delete an object on web server
Header Line Connection: Shows whether the connection should be closed or not Date and time: When the HTTP response was created Server: Analogous to user-agent in request message Last-modified: When the Object was last created or modified Content-length: Number of bytes in object being sent Content-Type: Indicates the object type (HTML text etc.)
200 OK
Request succeeded and information is returned in response Requested object moved, new location specified later in this message (Location:) Request message not understood by server Requested document not found on this server
Electronic Mail
Asynchronous Communication Medium Three major components:
User Agents Mail Servers Simple Mail Transfer Protocol: SMTP
user agent mail server
user agent
mail server
user agent
User Agent a.k.a. mail reader composing, editing, reading mail messages e.g., Eudora, Outlook, Mozilla Thunderbird Sends message to the mail server
user agent
Electronic Mail
Mail Servers Each recipient has a mailbox located in one of the mail servers Mailbox manages and maintains the mail messages that have been sent to server him. Message queue of outgoing (to be sent) mail messages SMTP Simple Mail Transfer Protocol (SMTP) between mail servers to send email messages mail Client and Server server Both client and sever sides of SMTP run on every mail server. Runs on TCP at port 25. user agent RFC 5321
user agent user agent mail server user agent
SMTP
SMTP
user agent
user agent
1 user agent 2
mail server 3
mail server 4 5 6
user agent
Can send all of the messages over the same TCP connection
Someone loads information on a web server and users use HTTP to pull this info TCP connection is initiated by the machine that wants to receive the file Sending mail sever pushes the file to the receiving mail server TCP connection is initiated by the machine that wants to send the file
SMTP: push
SMTP
access protocol
user agent
SMTP: delivery/storage to receivers server Mail access protocol: retrieval from server
POP: Post Office Protocol [RFC 1939] IMAP: Internet Mail Access Protocol [RFC 1730] HTTP: Gmail, Hotmail, Yahoo! Mail, etc. User agent is ordinary web browser HTTP to send email to web server HTTP to access mail box
SSN, name, passport # IP address (32 bit) name, e.g., ww.yahoo.com - used by humans
Internet hosts:
implemented in hierarchy of many DNS servers An application-layer protocol that allows hosts to query the distributed database DNS uses UDP over port number 53. RFC 1034 and RFC 1035
Distributed Database
DNS
Simple design would have one DNS server that contains all the mappings Why not centralize DNS? Single point of failure Traffic volume Distant centralized database Maintenance
A centralized database in a single DNS server doesnt scale!
Client wants IP for www.amazon.com: Client first queries a root server The root server returns the IP addresses for TLD servers for the top level domain com The client then contacts one of the TLD servers which returns the IP address of an authoritative server for amazon.com The authoritative server then returns the IP address for the host name www.amazon.com
k RIPE London (also 16 other locations) i Autonomica, Stockholm (plus 28 other locations) m WIDE Tokyo (also Seoul, Paris, SF)
That maps the names of those hosts to IP addresses Authoritative DNS servers houses these DNS records
Each company, university has one. Also called default name server
When host makes DNS query, query is sent
Iterated query:
Contacted server replies with name of server to contact I dont know this name, but ask this server
requesting host
cis.poly.edu
gaia.cs.umass.edu
Cache entries timeout (disappear) after some time TLD servers typically cached in local name servers Thus root name servers not often visited
8
authoritative DNS server dns.cs.umass.edu
requesting host
cis.poly.edu
gaia.cs.umass.edu