Beruflich Dokumente
Kultur Dokumente
Lecture No. 42
Todays topic
Applications, with focus on their protocols
3
Levels of hierarchy
Each capable of arbitrary number AS implements beyond two levels
6
Name Translation
2 cs.princeton.edu
Name Server 192.12.69.5 3 User 1 user@cs.princeton.edu Mail Program 192.12.69.5 TCP 192.12.69.5 IP 5 4
mil mit
edu uiuc
gov
pk edu
fr inria
cupidon
yahoo
cs
ee
case
8
mil
edu
gov uiuc
pk
fr inria
cupidon
mit
yahoo cs ee
edu
case
Example zones
9
10
1: penguins.cs.princeton.edu
Client
10: 128.112.155.166
6: pengu
ins.cs.pr inceton.e du .cs.prin ceton.ed Princeton u, 128.1 12.136. Name 8: p 10 engu ins.c Server s.pr 9: 1 ince 28.1 ton. 12.1 edu 55 . 1 66
CS Name Server
16
www.dept.univ.edu
Client
131.126.150.25
Traditional Applications
Directly invoked by users Employ the request/reply paradigm
Own RPC-like mechanism on top of TCP/UDP
19
Electronic Mail
One of the most successful application of the Internet Understanding how email works requires to distinguish
The user interface from underlying message transfer protocol, i.e. mail reader from SMTP The transfer protocol and a companion protocol that defines format of messages being exchanged, i.e. SMTP from RFC 822 + MIME
20
Message header is a series of lines containing type and value separated by a colon
Some fields are filled by user (e.g. To: ), other are filled by the mail delivery system (e.g. Date: )
Format of an Email
Envelope Header Header Block Header Block
Body
22
Email Address
23
MIME
Second piece is definitions for a set of content types and sub-types
image/gif, image/jpeg text/plain, text/richtext (marked up text with fonts, etc.) application/postscript, application/msword
Multipart type defines how message carrying different data types is structured
Each piece has its own header line describing the type
25
MIME
Third piece is a way to encode various data types
After encoding, whole message is an ASCII text Message passes through a number of gateways that assume all email is ASCII
MIME uses base64 encoding of binary data into the ASCII character set
Map every three bytes of original binary data into four ASCII characters Grouping data into 24-bit pieces, then to four 6-bit pieces which maps to one of 64 valid ASCII characters
26
MIME
27
MIME Header
28
Base 64
29
Quoted-printable
30
Mail Gateways
Mail reader
Mail gateway
Mail reader
Mail daemon
33
Mail Gateways
Why are mail gateways necessary?
Recipient does not want to include his hosts name in his email address Recipients machine may not always be up
SMTP client posts a command and the server responds with a code
34
35
36
Email Delivery
37
Mail reader uses mail access protocol to retrieve messages from the server
Internet Message Access Protocol (IMAP) Post Office Protocol (POP)
38
POP3
39
Connection established
Server greeting (1) Not authenticated (7) (4) Authenticated (7) (5) Selected (7) Logout (6) (2) (3)
40
41
Embedded URLs may be followed by opening a new connection to retrieve and display the object Object fetched using text-oriented protocol HTTP
Request/response messages with options and parameters
43
HTTP Transaction
44
Request Message
45
Request Line
HTTP request message specifies operation to be performed, web page the operation should be performed on, and the HTTP version E.g. GET http://www.univ.edu.pk HTTP/1.1
46
Response Message
47
Status Line
Response message begins with the status line specifying the version of HTTP, 3-digit code indicating success or not, and the text string giving the reason E.g. HTTP/1.1 202 Accepted
48