SlideShare a Scribd company logo
1 of 277
Download to read offline
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 21
File Transfer:
FTP
and
TFTP
1
TCP/IP Protocol Suite
OBJECTIVES:
 To discuss FTP and two connections used in this protocol:
control connection and data connection.
 To discuss six classes of commands sent by the client to establish
communication with the server.
 To explain three types of file transfer transferred by FTP.
 To show some user-friendly commands used by some FTP
interfaces.
 To discuss anonymous FTP and its application.
 To discuss how file transfer can be done using a secure channel.
 To discuss TFTP as a simple file transfer protocol without the
complexities and sophistication of FTP.
2
TCP/IP Protocol Suite
OBJECTIVES (continued):
 To discuss five types of TFTP messages and their applications.
 To discuss the sorcerer’s apprentice bug related to TFTP’s flow-
and error-control mechanisms.
 To show how TFTP can be used in conjunction with DHCP to
initialize devices by downloading configuration files.
3
TCP/IP Protocol Suite
Chapter
Outline
21.1 FTP
21.2 TFTP
4
TCP/IP Protocol Suite
21-1 FTP
File Transfer Protocol (FTP) is the standard
mechanism provided by TCP/IP for copying a file from
one host to another. Although transferring files from
one system to another seems simple and
straightforward, some problems must be dealt with
first. For example, two systems may use different file
name conventions. Two systems may have different
ways to represent text and data. Two systems may
have different directory structures. All of these
problems have been solved by FTP in a very simple
and elegant approach.
5
TCP/IP Protocol Suite
Topics Discussed in the Section
 Connections
 Communication
 Command Processing
 File Transfer
 Anonymous FTP
 Security for FTP
 The sftp Program
6
TCP/IP Protocol Suite
FTP uses the services of TCP.
It needs two TCP connections. The well-
known port 21 is used for the control
connection and the well-known
port 20 for the data connection.
Note
7
TCP/IP Protocol Suite
Figure 21.1 FTP
8
TCP/IP Protocol Suite
Figure 21.2 Opening the control connection
9
TCP/IP Protocol Suite
Figure 21.3 Creating the data connection
10
TCP/IP Protocol Suite
Figure 21.4 Using the control connection
11
TCP/IP Protocol Suite
Figure 21.5 Using the data connection
12
TCP/IP Protocol Suite
Figure 21.6 Command processing
13
TCP/IP Protocol Suite
14
TCP/IP Protocol Suite
15
TCP/IP Protocol Suite
16
TCP/IP Protocol Suite
17
TCP/IP Protocol Suite
18
TCP/IP Protocol Suite
19
TCP/IP Protocol Suite
20
TCP/IP Protocol Suite
21
TCP/IP Protocol Suite
Figure 21.7 File transfer
22
TCP/IP Protocol Suite
Figure 21.8 shows an example of using FTP for retrieving a list
of items in a directory.
Example 21.1
23
TCP/IP Protocol Suite
Figure 21.8 Example 21.1
220 (Service ready)
USER forouzan
LIST /usr/user/forouzan/reports
PASS xxxxxx
125 (Data connection OK)
331 (User name OK. Password?)
PORT 8888
150 (Data connection opens shortly)
230 (User login OK)
1
2
3
4
5
6
7
8
9
List of files or directories
List of files or directories
10
11
QUIT
226 (Closing data connection)
221 (Service closing)
12
13
14
DATA
TRANSFER
24
TCP/IP Protocol Suite
The following shows an actual FTP session that parallels
Example 21.1. The colored lines show the responses from the
server control connection; the black lines show the commands
sent by the client. The lines in white with black background
show data transfer.
Example 21.2
25
TCP/IP Protocol Suite
Figure 21.9 shows an example of how an image (binary) file is
stored.
Example 21.3
26
TCP/IP Protocol Suite
Figure 21.9 Example 21.3
220 (Service ready)
USER forouzan
TYPE EBCDIC
STRU R
STOR/usr/user/forouzan/reports/file1
PASS xxxxxx
200 (OK)
200 (OK)
250 (OK)
331 (User name OK. Password?)
PORT 1267
150 (Data connection opens shortly)
230 (User login OK)
1
2
3
4
5
6
7
8
9
10
11
12
13
DATA
TRANSFER
Records of file ..........
Records of file ..........
15
14
QUIT
226 (Closing data connection)
221 (Service closing)
16
17
18
27
TCP/IP Protocol Suite
We show an example of anonymous FTP. We assume that
some public data are available at internic.net.
Example 21.4
28
TCP/IP Protocol Suite
21-2 TFTP
There are occasions when we need to simply copy a
file without the need for all of the features of the FTP
protocol. For example, when a diskless workstation
or a router is booted, we need to download the
bootstrap and configuration files. Here we do not
need all of the sophistication provided in FTP. We
just need a protocol that quickly copies the files.
29
TCP/IP Protocol Suite
Topics Discussed in the Section
 Messages
 Connection
 Data Transfer
 UDP Ports
 TFTP Example
 TFTP Options
 Security
 Applications
30
TCP/IP Protocol Suite
TFTP uses the services of UDP on the
well-known port 69.
Note
31
TCP/IP Protocol Suite
Figure 21.10 Message categories
32
TCP/IP Protocol Suite
Figure 21.11 RRQ format
33
TCP/IP Protocol Suite
Figure 21.12 WRQ format
34
TCP/IP Protocol Suite
Figure 21.13 Data Format
35
TCP/IP Protocol Suite
Figure 21.14 ACK format
36
TCP/IP Protocol Suite
Figure 21.15 ERROR format
37
TCP/IP Protocol Suite
38
TCP/IP Protocol Suite
Figure 21.16 Connection establishment
39
TCP/IP Protocol Suite
Figure 21.17 Server’s apprentice bug
40
TCP/IP Protocol Suite
Figure 21.18 UDP port numbers used by TFTP
41
TCP/IP Protocol Suite
Figure 21.19 TFTP example
42
TCP/IP Protocol Suite
Figure 21.20 Use of TFTP with DHCP
1
2
3
4
5
43
TCP/IP Protocol Suite
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 22
World Wide
Web
and
HTTP
44
TCP/IP Protocol Suite
OBJECTIVES:
 To discuss the architecture of WWW and describe the concepts
of hypertext and hypermedia.
 To describe Web clients and Web servers and their components.
 To define URL as a tool to identify a Web server.
 To introduce three different Web documents: static document,
dynamic document, and active document.
 To discuss HTTP and its transactions.
 To define and list the fields in a request message.
45
TCP/IP Protocol Suite
OBJECTIVES (continued):
 To define non-persistent and persistent connections in HTTP.
 To introduce cookies and their applications in HTTP.
 To discuss Web caching, its application, and the method used to
update the cache.
46
TCP/IP Protocol Suite
Chapter
Outline
22.1 Architecture
22.2 Web Document
22.3 HTTP
47
TCP/IP Protocol Suite
22-1 ARCHITECTURE
The WWW today is a distributed client-server
service, in which a client using a browser can access
a service using a server. However, the service
provided is distributed over many locations called
sites. Each site holds one or more documents,
referred to as Web pages. Each Web page,
however, can contain some links to other Web pages
in the same or other sites. In other words, a Web
page can be simple or composite.
48
TCP/IP Protocol Suite
Topics Discussed in the Section
 Hypertext and Hypermedia
 Web Client (Browser)
 Web Server
 Uniform Resource Locator (URL)
49
TCP/IP Protocol Suite
Assume we need to retrieve a Web page that contains the
biography of a famous character with some pictures, which are
embedded in the page itself. Since the pictures are not stored
as separate files, the whole document is a simple Web page. It
can be retrieved using one single request/ response transaction,
as shown in Figure 22.1.
Example 22.1
50
TCP/IP Protocol Suite
Figure 22.1 Example 22.1
Request
1
Response 2
51
TCP/IP Protocol Suite
Now assume we need to retrieve a scientific document that
contains one reference to another text file and one reference to
a large image. Figure 22.2 shows the situation. The main
document and the image are stored in two separate files in the
same site (file A and file B); the referenced text file is stored in
another site (file C). Since we are dealing with three different
files, we need three transactions if we want to see the whole
document. The first transaction (request/response) retrieves a
copy of the main document (file A), which has a reference
(pointer) to the second and the third files.
Example 22.2
52
TCP/IP Protocol Suite
Figure 22.2 Example 22.2
Request 1
1
Response 1 2
Request 2
3
Response 2 4
Request 3
5
Response 3 6
53
TCP/IP Protocol Suite
A very important point we need to remember is that file A, file B,
and file C in Example 22.2 are independent Web pages, each
with independent names and addresses. Although references to
file B or C are included in file A, it does not mean that each of
these files cannot be retrieved independently. A second user
can retrieve file B with one transaction. A third user can retrieve
file C with one transaction.
Example 22.3
54
TCP/IP Protocol Suite
Figure 22.3 Browser
55
TCP/IP Protocol Suite
Figure 22.4 URL
56
TCP/IP Protocol Suite
22-2 WEB DOCUMENTS
The documents in the WWW can be grouped into
three broad categories: static, dynamic, and active.
The category is based on the time the contents of
the document are determined.
57
TCP/IP Protocol Suite
Topics Discussed in the Section
 Static Documents
 Dynamic Documents
 Active Documents
58
TCP/IP Protocol Suite
Figure 22.5 Static document
Request
1
Static document
2
59
TCP/IP Protocol Suite
HTML, XML, XSL, and XHTML are
discussed in Appendix E.
Note
60
TCP/IP Protocol Suite
Figure 22.6 Dynamic document using CGI
Request
1
Dynamic document
2
61
TCP/IP Protocol Suite
Figure 22.7 Dynamic document using server-site script
Request
1
Dynamic document
2
62
TCP/IP Protocol Suite
Dynamic documents are sometimes
referred to as server-site dynamic
documents.
Note
63
TCP/IP Protocol Suite
Figure 22.8 Active document using Java applet
Request
1
Result
Run the applet
to get the result
Active document
2
Applet
64
TCP/IP Protocol Suite
Figure 22.9 Active document using client-site script
Request
1
Run the JavaScript
(JS) to get the result
Result
2
JavaScript
JS
65
TCP/IP Protocol Suite
Active documents are sometimes
referred to as client-site dynamic
documents.
Note
66
TCP/IP Protocol Suite
22-3 HTTP
The Hypertext Transfer Protocol (HTTP) is a protocol
used mainly to access data on the World Wide Web.
HTTP functions like a combination of FTP (Chapter
21) and SMTP (Chapter 23). It is similar to FTP
because it transfers files and uses the services of
TCP. However, it is much simpler than FTP because
it uses only one TCP connection. There is no
separate control connection; only data are
transferred between the client and the server.
67
TCP/IP Protocol Suite
Topics Discussed in the Section
 HTTP Transaction
 Conditional Request
 Persistence
 Cookies
 Web Caching: Proxy Server
 HTTP Security
68
TCP/IP Protocol Suite
HTTP uses the services of TCP on well-
known port 80.
Note
69
TCP/IP Protocol Suite
Figure 22.10 HTTP transaction
1
Request message
Request line
Headers
Body
A blank line
2
Response message
Status line
Headers
Body
A blank line
70
TCP/IP Protocol Suite
Figure 22.11 Format of the request message
71
TCP/IP Protocol Suite
72
TCP/IP Protocol Suite
73
TCP/IP Protocol Suite
Figure 22.12 Format of the response message
74
TCP/IP Protocol Suite
75
TCP/IP Protocol Suite
76
TCP/IP Protocol Suite
This example retrieves a document (see Figure 22.13). We use
the GET method to retrieve an image with the path
/usr/bin/image1. The request line shows the method (GET), the
URL, and the HTTP version (1.1). The header has two lines that
show that the client can accept images in the GIF or JPEG
format. The request does not have a body. The response
message contains the status line and four lines of header. The
header lines define the date, server, MIME version, and length
of the document. The body of the document follows the header.
Example 22.4
77
TCP/IP Protocol Suite
Figure 22.13 Example 22.4
78
TCP/IP Protocol Suite
In this example, the client wants to send data to the server. We
use the POST method. The request line shows the method
(POST), URL, and HTTP version (1.1). There are four lines of
headers. The request body contains the input information. The
response message contains the status line and four lines of
headers. The created document, which is a CGI document, is
included as the body (see Figure 22.14).
Example 22.5
79
TCP/IP Protocol Suite
Figure 22.14 Example 22.5
80
TCP/IP Protocol Suite
HTTP uses ASCII characters. The following shows how a client
can directly connect to a server using TELNET, which logs into
port 80.
Example 22.6
81
TCP/IP Protocol Suite
The following shows how a client imposes the modification data
and time condition on a request.
Example 22.7
The status line in the responds shows the file is not modified
after the defined point of time. The body of the response
message is also empty.
82
TCP/IP Protocol Suite
Figure 22.15 shows an example of a nonpersistent connection.
The client needs to access a file that contains two links to
images. The text file and images are located on the same
server.
Example 22.8
83
TCP/IP Protocol Suite
Figure 22.15 Example 22.8
84
TCP/IP Protocol Suite
HTTP version 1.1 specifies a persistent
connection by default.
Note
85
TCP/IP Protocol Suite
Figure 22.16 shows the same scenario as Example 22.8, but
using persistent connection.
Example 22.9
86
TCP/IP Protocol Suite
Figure 22.16 Example 22.9
87
TCP/IP Protocol Suite
Figure 22.17 shows a scenario in which an electronic store can
benefit from the use of cookies. Assume a shopper wants to buy
a toy from an electronic store named BestToys. The shopper
browser (client) sends a request to the BestToys server.
Example 22.10
88
TCP/IP Protocol Suite
Figure 22.17 Example 22.10
A customer file is
created with ID: 12343
Request
GET BestToys.com HTTP/1.1
1
Response
HTTP/1.1 200 OK
Set-Cookie: 12343
Page Representing the Toys
2
A vendor file is created
with cookie: 12343
Update
3
Request
GET image HTTP/1.1
Response
Cookie: 12343
Cookie
4
HTTP/1.1 200 OK
Page Representing the price
Update
5
Request
GET image HTTP/1.1
Cookie: 12343
Information about the payment
Cookie
6
Response
HTTP/1.1 200 OK
Order confirmation
Update
89
TCP/IP Protocol Suite
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 23
Electronic
Mail:
SMTP, POP
IMAP, and
MIME
90
TCP/IP Protocol Suite
OBJECTIVES:
 To explain the architecture of electronic mail using four
scenarios.
 To explain the user agent (UA), services provided by it, and two
types of user agents.
 To explain the mechanism of sending and receiving e-mails.
 To introduce the role of a message transfer agent and Simple
Mail
 Transfer Protocol (SMTP) as the formal protocol that handles
MTA.
 To explain e-mail transfer phases.
 To discuss two message access agents (MAAs): POP and IMAP.
91
TCP/IP Protocol Suite
OBJECTIVES (continued):
 To discuss MIME as a set of software functions that transforms
non-ASCII data to ASCII data and vice versa.
 To discuss the idea of Web-based e-mail.
 To explain the security of the e-mail system.
92
TCP/IP Protocol Suite
Chapter
Outline
23.1 Architecture
23.2 User Agent
23.3 Message Transfer Agent
23.4 Message Access Agent
23.5 MIME
23.6 Web-Based Mail
23.7 Electronic Mail Security
93
TCP/IP Protocol Suite
23-1 ARCHITECTURE
To explain the architecture of e-mail, we give four
scenarios. We begin with the simplest situation and
add complexity as we proceed. The fourth scenario
is the most common in the exchange of e-mail.
94
TCP/IP Protocol Suite
Topics Discussed in the Section
 First Scenario
 Second Scenario
 Third Scenario
 Fourth Scenario
95
TCP/IP Protocol Suite
Figure 23.1 First scenario
1
2
96
TCP/IP Protocol Suite
When the sender and the receiver of an
e-mail are on the same mail server,
we need only two user agents.
Note
97
TCP/IP Protocol Suite
Figure 23.2 Second scenario
1
2 3 4
5
98
TCP/IP Protocol Suite
When the sender and the receiver of an
e-mail are on different mail servers,
we need two UAs and a pair of MTAs
(client and server).
Note
99
TCP/IP Protocol Suite
Figure 23.3 Third scenario
1
2
3
4
5 6
7
100
TCP/IP Protocol Suite
When the sender is connected to the
mail server via a LAN or a WAN, we
need two UAs and two pairs of MTAs
(client and server).
Note
101
TCP/IP Protocol Suite
Figure 23.4 Fourth scenario
1
2
3
4
5
6
8
9
102
TCP/IP Protocol Suite
When both sender and receiver are
connected to the mail server via a LAN
or a WAN, we need two UAs, two pairs of
MTAs (client and server), and a pair of
MAAs (client and server). This is the
most common situation today.
Note
103
TCP/IP Protocol Suite
Figure 23.5 Push versus pull
104
TCP/IP Protocol Suite
23-2 USER AGENT
The first component of an electronic mail system is
the user agent (UA). It provides service to the user to
make the process of sending and receiving a
message easier.
105
TCP/IP Protocol Suite
Topics Discussed in the Section
 Services Provided by a User Agent
 User Agent Types
 Sending Mail
 Receiving Mail
 Addresses
 Mailing List or Group List
106
TCP/IP Protocol Suite
Some examples of command-driven
user agents are mail, pine, and elm.
Note
107
TCP/IP Protocol Suite
Some examples of GUI-based user
agents are Eudora, Outlook,
And Netscape.
Note
108
TCP/IP Protocol Suite
Figure 23.6 Format of an email
109
TCP/IP Protocol Suite
Figure 23.7 E-mail address
110
TCP/IP Protocol Suite
23-3 MESSAGE TRANSFER AGENT
The actual mail transfer is done through message
transfer agents (MTAs). To send mail, a system must
have the client MTA, and to receive mail, a system
must have a server MTA. The formal protocol that
defines the MTA client and server in the Internet is
called Simple Mail Transfer Protocol (SMTP). As we
said before, two pairs of MTA client-server programs
are used in the most common situation (fourth
scenario). Figure 23.8 shows the range of the SMTP
protocol in this scenario.
111
TCP/IP Protocol Suite
Topics Discussed in the Section
 Commands and Responses
 Mail Transfer Phases
112
TCP/IP Protocol Suite
Figure 23.8 SMTP range
113
TCP/IP Protocol Suite
Figure 23.9 Commands and responses
114
TCP/IP Protocol Suite
115
TCP/IP Protocol Suite
116
TCP/IP Protocol Suite
Figure 23.10 Connection establishment
220 service ready 1
HELO: deanza.edu
2
250 OK 3
117
TCP/IP Protocol Suite
Figure 23.11 Message transfer
118
TCP/IP Protocol Suite
Figure 23.12 Connection termination
1 QUIT
2
221 service closed
119
TCP/IP Protocol Suite
Let us see how we can directly use SMTP to send an e-mail and
simulate the commands and responses we described in this
section. We use TELNET to log into port 25 (the well-known port
for SMTP). We then use the commands directly to send an e-
mail. In this example, forouzanb@adelphia.net is sending an e-
mail to himself. The first few lines show TELNET trying to
connect to the adelphia mail server.
Example 23.1
After connection, we can type the SMTP commands and then
receive the responses as shown below. We have shown the
commands in black and the responses in color. Note that we
have added for clarification some comment lines, designated by
the “=” sign. These lines are not part of the e-mail procedure.
120
TCP/IP Protocol Suite
Example 19.1 Continued
121
TCP/IP Protocol Suite
23-4 MESSAGE ACCESS AGENT
The first and the second stages of mail delivery use
SMTP. However, SMTP is not involved in the third
stage because SMTP is a push protocol; it pushes
the message from the client to the server. In other
words, the direction of the bulk data (messages) is
from the client to the server. On the other hand, the
third stage needs a pull protocol; the client must pull
messages from the server. The direction of the bulk
data are from the server to the client. The third stage
uses a message access agent.
122
TCP/IP Protocol Suite
Topics Discussed in the Section
 POP3
 IMAP4
123
TCP/IP Protocol Suite
Figure 23.13 Pop3 and IMAP4
124
TCP/IP Protocol Suite
Figure 23.14 Pop3
125
TCP/IP Protocol Suite
23-5 MIME
Electronic mail has a simple structure. Its simplicity,
however, comes with a price. It can send messages
only in NVT 7-bit ASCII format. In other words, it has
some limitations. Multipurpose Internet Mail Extensions
(MIME) is a supplementary protocol that allows non-
ASCII data to be sent through e-mail. MIME transforms
non-ASCII data at the sender site to NVT ASCII data
and delivers it to the client MTA to be sent through the
Internet. The message at the receiving site is
transformed back to the original data.
126
TCP/IP Protocol Suite
Topics Discussed in the Section
 MIME Headers
127
TCP/IP Protocol Suite
Figure 23.15 MIME
128
TCP/IP Protocol Suite
Figure 23.16 MIME header
129
TCP/IP Protocol Suite
130
TCP/IP Protocol Suite
131
TCP/IP Protocol Suite
Figure 23.17 Base64
132
TCP/IP Protocol Suite
133
TCP/IP Protocol Suite
Figure 23.18 Quoted printable
134
TCP/IP Protocol Suite
23-6 WEB-BASED MAIL
E-mail is such a common application that some
websites today provide this service to anyone who
accesses the site. Three common sites are Hotmail,
Yahoo, and Google. The idea is very simple. Let us
go through two cases:
135
TCP/IP Protocol Suite
Topics Discussed in the Section
 Case I
 Case II
136
TCP/IP Protocol Suite
Figure 23.19 Web-based e-mail, case 1
1
2
3
4
HTTP
transactions
137
TCP/IP Protocol Suite
Figure 23.20 Web-based e-mail, case 2
HTTP
transactions
HTTP
transactions
1 2 3
138
TCP/IP Protocol Suite
23-6 E-MAIL SECURITY
The protocol discussed in this chapter does not
provide any security provisions per se. However, e-
mail exchanges can be secured using two
application-layer securities designed in particular for
e-mail systems. Two of these protocols, Pretty Good
Privacy (PGP) and Secure MIME (SMIME) are
discussed in Chapter 30 after we have discussed the
basic network security.
139
TCP/IP Protocol Suite
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 24
Network
Management:
SNMP
140
TCP/IP Protocol Suite
OBJECTIVES:
 To discuss SNMP as a framework for managing devices in an
internet using the TCP/IP protocol suite.
 To define a manager as a host that runs SNMP client and any
agents as a router or host that runs a server program.
 Discuss SMI and MIB, which are used by SNMP.
 To show how SMI names objects, defines the type of data, and
encodes data.
 To show how data types are defined using ASN.1.
 To show how SMI uses BER to encode data.
 To show the functionality of SNMP using three methods.
141
TCP/IP Protocol Suite
OBJECTIVES:
 To show how SNMP uses two different ports of UDP.
 To show how SNMPv3 has enhanced security features over
previous versions.
142
TCP/IP Protocol Suite
Chapter
Outline
24.1 Concept
24.2 Management Components
24.3 SMI
24.4 MIB
24.5 SNMP
24.6 UDP Ports
24.7 Security
143
TCP/IP Protocol Suite
24-1 CONCEPT
SNMP uses the concept of manager and agent. That
is, a manager, usually a host, controls and monitors
a set of agents, usually routers or servers (see
Figure 24.1).
144
TCP/IP Protocol Suite
Topics Discussed in the Section
 Managers and Agents
145
TCP/IP Protocol Suite
Figure 24.1 SNMP concept
146
TCP/IP Protocol Suite
24-2 MANAGEMENT COMPONENTS
To do management tasks, SNMP uses two other
protocols: Structure of Management Information
(SMI) and Management Information Base (MIB). In
other words, management on the Internet is done
through the cooperation of three protocols: SNMP,
SMI, and MIB, as shown in Figure 24.2.
147
TCP/IP Protocol Suite
Topics Discussed in the Section
 Role of SNMP
 Role of SMI
 Role of MIB
 An Analogy
 An Overview
148
TCP/IP Protocol Suite
Figure 24.2 Companion of network management on the Internet
149
TCP/IP Protocol Suite
SNMP defines the format of packets
exchanged between a manager and an
agent. It reads and changes the status of
objects (values of variables) in SNMP
packets.
Note
150
TCP/IP Protocol Suite
SMI defines the general rules for naming
objects, defining object types (including
range and length), and showing how to
encode objects and values.
Note
151
TCP/IP Protocol Suite
MIB creates a collection of named
objects, their types, and their
relationships to each other in an entity
to be managed.
Note
152
TCP/IP Protocol Suite
Figure 24.3 Comparing computer programming and network management
153
TCP/IP Protocol Suite
Figure 24.4 Management overview
1
2
3
Get Request
SNMP packet
4
Response
SNMP packet
5
6
154
TCP/IP Protocol Suite
24-3 SMI
The Structure of Management Information is a
component for network management. Its functions
are:
1. To name objects.
2. To define the type of data that can be stored in an
object.
3. To show how to encode data for transmission
over the network.
SMI is a guideline for SNMP. It emphasizes three
attributes to handle an object: name, data type, and
encoding method.
155
TCP/IP Protocol Suite
Topics Discussed in the Section
 Name
 Type
 Encoding Method
156
TCP/IP Protocol Suite
Figure 24.5 Object identifier
157
TCP/IP Protocol Suite
All objects managed by SNMP are given
an object identifier.
The object identifier always starts with
1.3.6.1.2.1.
Note
158
TCP/IP Protocol Suite
159
TCP/IP Protocol Suite
Figure 24.6 Conceptual data types
160
TCP/IP Protocol Suite
Figure 24.7 Encoding format
161
TCP/IP Protocol Suite
162
TCP/IP Protocol Suite
Figure 24.8 shows how to define INTEGER 14. Note that we
have used both binary representation and hexadecimal
representation for the tag. The size of the length field is from
Table 24.1.
Example 24.1
163
TCP/IP Protocol Suite
Figure 24.8 Example 24.1: INTEGER 14
164
TCP/IP Protocol Suite
Figure 24.9 shows how to define the OCTET STRING “HI.”
Example 24.2
165
TCP/IP Protocol Suite
Figure 24.9 Example 24.2: OCTET STRING “HI”
166
TCP/IP Protocol Suite
Figure 24.10 shows how to define ObjectIdentifier 1.3.6.1
(iso.org.dod.internet).
Example 24.3
167
TCP/IP Protocol Suite
Figure 24.10 Example 24.3: ObjectIndentifier 1.3.6.1
168
TCP/IP Protocol Suite
Figure 24.11 shows how to define IPAddress 131.21.14.8.
Example 24.4
169
TCP/IP Protocol Suite
Figure 24.11 Example 24.4: IPAddress 131.21.14.8
170
TCP/IP Protocol Suite
24-4 MIB
The Management Information Base, version 2
(MIB2) is the second component used in network
management. Each agent has its own MIB2, which is
a collection of all the objects that the manager can
manage. The objects in MIB2 are categorized under
10 different groups: system, interface, address
translation, ip, icmp, tcp, udp, egp, transmission, and
snmp. These groups are under the mib-2 object in
the object identifier tree (see Figure 24.12). Each
group has defined variables and/or tables.
171
TCP/IP Protocol Suite
Topics Discussed in the Section
 Accessing MIB Variables
 Lexicographic Ordering
172
TCP/IP Protocol Suite
Figure 24.12 mib-2
173
TCP/IP Protocol Suite
Figure 24.13 udp group
174
TCP/IP Protocol Suite
Figure 24.14 udp variables and tables
175
TCP/IP Protocol Suite
Figure 24.15 Indexes for udpTable
176
TCP/IP Protocol Suite
Figure 24.16 Lexicographic ordering
177
TCP/IP Protocol Suite
24-5 SNMP
SNMP uses both SMI and MIB in Internet network
management. It is an application program that
allows:
1. A manager to retrieve the value of an object
defined in an agent.
2. A manager to store a value in an object defined in
an agent.
3. An agent to send an alarm message about an
abnormal situation to the manager.
178
TCP/IP Protocol Suite
Topics Discussed in the Section
 PDUs
 Format
 Messages
179
TCP/IP Protocol Suite
Figure 24.17 SNMP PDUs
180
TCP/IP Protocol Suite
Figure 24.18 SNMP PDU format
181
TCP/IP Protocol Suite
182
TCP/IP Protocol Suite
183
TCP/IP Protocol Suite
Figure 24.19 SNMP message
184
TCP/IP Protocol Suite
In this example, a manager station (SNMP client) uses a
message with GetRequest PDU to retrieve the number of UDP
datagrams that a router has received (Figure 24.20). There is
only one VarBind sequence. The corresponding MIB variable
related to this information is udpInDatagrams with the object
identifier 1.3.6.1.2.1.7.1.0. The manager wants to retrieve a
value (not to store a value), so the value defines a null entity.
The bytes to be sent are shown in hexadecimal representation.
Example 24.4
185
TCP/IP Protocol Suite
Figure 24.20 Example 24.5
186
TCP/IP Protocol Suite
Figure 24.21 Actual message sent for Example 24.5
187
TCP/IP Protocol Suite
24-6 UDP PORTS
SNMP uses the services of UDP on two well-known
ports, 161 and 162. The well-known port 161 is used
by the server (agent), and the well-known port 162 is
used by the client (manager).
188
TCP/IP Protocol Suite
Figure 24.2 Port numbers for SNMP
189
TCP/IP Protocol Suite
24-7 SECURITY
SNMPv3 has added two new features to the
previous version: security and remote administration.
SNMPv3 allows a manager to choose one or more
levels of security when accessing an agent. Different
aspects of security can be configured by the
manager to allow message authentication,
confidentiality, and integrity.
SNMPv3 also allows remote configuration of
security aspects without requiring the administrator
to actually be at the place where the device is
located.
190
TCP/IP Protocol Suite
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 25
Multimedia
191
TCP/IP Protocol Suite
OBJECTIVES:
 To show how audio/video files can be downloaded for future use
or broadcast to clients over the Internet. The Internet can also be
used for live audio/video interaction. Audio and video need to be
digitized before being sent over the Internet.
 To discuss how audio and video files are compressed for
transmission through the Internet.
 To discuss the phenomenon called Jitter that can be created on a
packet-switched network when transmitting real-time data.
 To introduce the Real-Time Transport Protocol (RTP) and Real-
Time Transport Control Protocol (RTCP) used in multimedia
applications.
 To discuss voice over IP as a real-time interactive audio/video
application.
192
TCP/IP Protocol Suite
OBJECTIVES (continued):
 To introduce the Session Initiation Protocol (SIP) as an
application layer protocol that establishes, manages, and
terminates multimedia sessions.
 To introduce quality of service (QoS) and how it can be
improved using scheduling techniques and traffic shaping
techniques.
 To discuss Integrated Services and Differential Services and how
they can be implemented.
 To introduce Resource Reservation Protocol (RSVP) as a
signaling protocol that helps IP create a flow and makes a
resource reservation.
193
TCP/IP Protocol Suite
Chapter
Outline
25.1 Introduction
25.2 Digitizing Audio and Video
25.3 Audio/Video Compression
25.4 Streaming Stored
Audio/Video
25.5 Streaming Live
Audio/Video
25.6 Real-Time Interactive
Audio/Video
25.7 RTP
25.8 RTCP 194
TCP/IP Protocol Suite
Chapter
Outline
(continued)
25.9 Voice Over IP
25.10 Quality of Service
25.11 Integrated Services
25.12 Differentiated Services
195
TCP/IP Protocol Suite
25-1 INTRODUCTION
We can divide audio and video services into three
broad categories: streaming stored audio/video,
streaming live audio/video, and interactive
audio/video, as shown in Figure 25.1. Streaming
means a user can listen (or watch) the file after the
downloading has started.
196
TCP/IP Protocol Suite
Figure 25.1 Internet audio/video
197
TCP/IP Protocol Suite
Streaming stored audio/video refers to
on-demand requests for compressed
audio/video files.
Note
198
TCP/IP Protocol Suite
Streaming live audio/video refers to
the broadcasting of radio and TV
programs through the Internet.
Note
199
TCP/IP Protocol Suite
Interactive audio/video refers to the use
of the Internet for interactive
audio/video applications.
Note
200
TCP/IP Protocol Suite
25-2 DIGITIZING AUDIO AND VIDEO
Before audio or video signals can be sent on the
Internet, they need to be digitized. We discuss audio
and video separately.
201
TCP/IP Protocol Suite
Topics Discussed in the Section
 Digitizing Audio
 Digitizing Video
202
TCP/IP Protocol Suite
Compression is needed to send video
over the Internet.
Note
203
TCP/IP Protocol Suite
25-3 AUDIO AND VIDEO COMPRESSION
To send audio or video over the Internet requires
compression. In this section, we first discuss audio
compression and then video compression.
204
TCP/IP Protocol Suite
Topics Discussed in the Section
 Audio Compression
 Video Compression
205
TCP/IP Protocol Suite
Figure 25.2 JPEG gray scale
206
TCP/IP Protocol Suite
Figure 25.3 JPEG process
207
TCP/IP Protocol Suite
Figure 25.4 Case 1: uniform gray scale
208
TCP/IP Protocol Suite
Figure 25.5 Case2: two sections
209
TCP/IP Protocol Suite
Figure 25.6 Case 3 : gradient gray scale
210
TCP/IP Protocol Suite
Figure 25.7 Reading the table
211
TCP/IP Protocol Suite
Figure 25.8 MPEG frames
212
TCP/IP Protocol Suite
Figure 25.9 MPEG frame construction
213
TCP/IP Protocol Suite
25-4 STREAMING STORED
AUDIO/VIDEO
Now that we have discussed digitizing and
compressing audio/video, we turn our attention to
specific applications. The first is streaming stored
audio and video. Downloading these types of files
from a Web server can be different from
downloading other types of files. To understand the
concept, let us discuss three approaches, each with
a different complexity.
214
TCP/IP Protocol Suite
Topics Discussed in the Section
 First Approach: Using a Web Server
 Second Approach: Using a Web Server with Metafile
 Third Approach: Using a Media Server
 Fourth Approach: Using a Media Server and RTSP
215
TCP/IP Protocol Suite
Figure 25.10 Using a Web server
GET: audio/video file
1
RESPONSE
2
Audio/video
file
3
216
TCP/IP Protocol Suite
Figure 25.11 Using a Web server with a metafile
GET: metafile
1
RESPONSE
2
Metafile
3
GET: audio/video file
4
RESPONSE
5
217
TCP/IP Protocol Suite
Figure 25.12 Using a media server
GET: metafile
1
RESPONSE
2
Metafile
3
GET: audio/video file
4
RESPONSE
5
218
TCP/IP Protocol Suite
Figure 25.13 Using a media server and RSTP
GET: metafile
1
RESPONSE
2
Metafile
3
SETUP
4
RESPONSE
5
PLAY
6
RESPONSE
7
Audio/video
Stream
TEARDOWN
8
RESPONSE
9
219
TCP/IP Protocol Suite
25-5 STREAMING LIVE AUDIO/VIDEO
Streaming live audio/video is similar to the
broadcasting of audio and video by radio and TV
stations. Instead of broadcasting to the air, the
stations broadcast through the Internet. There are
several similarities between streaming stored
audio/video and streaming live audio/video. They are
both sensitive to delay; neither can accept
retransmission. However, there is a difference. In the
first application, the communication is unicast and
on-demand. In the second, the communication is
multicast and live.
220
TCP/IP Protocol Suite
25-6 REAL-TIME INTERACTIVE
AUDIO/VIDEO
In real-time interactive audio/video, people
communicate with one another in real time. The
Internet phone or voice over IP is an example of this
type of application. Video conferencing is another
example that allows people to communicate visually
and orally.
221
TCP/IP Protocol Suite
Topics Discussed in the Section
 Characteristics
222
TCP/IP Protocol Suite
Figure 25.14 Time relationship
223
TCP/IP Protocol Suite
Jitter is introduced in real-time data by
the delay between packets.
Note
224
TCP/IP Protocol Suite
Figure 25.15 Jitter
225
TCP/IP Protocol Suite
Figure 25.16 Timestamp
226
TCP/IP Protocol Suite
To prevent jitter, we can timestamp the
packets and separate the arrival time
from the playback time.
Note
227
TCP/IP Protocol Suite
Figure 25.17 Playback buffer
228
TCP/IP Protocol Suite
A playback buffer is required for
real-time traffic.
Note
229
TCP/IP Protocol Suite
A sequence number on each packet is
required for real-time traffic.
Note
230
TCP/IP Protocol Suite
Real-time traffic needs the support of
multicasting.
Note
231
TCP/IP Protocol Suite
Translation means changing the
encoding of a payload to a lower
quality to match the bandwidth
of the receiving network.
Note
232
TCP/IP Protocol Suite
Mixing means combining several
streams of traffic into one stream.
Note
233
TCP/IP Protocol Suite
TCP, with all its sophistication, is not
suitable for interactive multimedia
traffic because we cannot allow
retransmission of packets.
Note
234
TCP/IP Protocol Suite
UDP is more suitable than TCP for
interactive traffic. However, we need
the services of RTP, another
transport layer protocol, to make
up for the deficiencies of UDP.
Note
235
TCP/IP Protocol Suite
25-7 RTP
Real-time Transport Protocol (RTP) is the protocol
designed to handle real-time traffic on the Internet.
RTP does not have a delivery mechanism
(multicasting, port numbers, and so on); it must be
used with UDP. RTP stands between UDP and the
application program. The main contributions of RTP
are timestamping, sequencing, and mixing facilities.
236
TCP/IP Protocol Suite
Topics Discussed in the Section
 RTP Packet Format
 UDP Port
237
TCP/IP Protocol Suite
Figure 25.18 RTP packet header format
238
TCP/IP Protocol Suite
Figure 25.19 RTP packet header format
239
TCP/IP Protocol Suite
240
TCP/IP Protocol Suite
RTP uses a temporary even-numbered
UDP port.
Note
241
TCP/IP Protocol Suite
25-8 RTCP
RTP allows only one type of message, one that
carries data from the source to the destination. In
many cases, there is a need for other messages in a
session. These messages control the flow and
quality of data and allow the recipient to send
feedback to the source or sources. Real-Time
Transport Control Protocol (RTCP) is a protocol
designed for this purpose.
242
TCP/IP Protocol Suite
Topics Discussed in the Section
 Sender Report
 Receiver Report
 Source Description Message
 Bye Message
 Application-Specific Message
 UDP Port
243
TCP/IP Protocol Suite
Figure 25.20 RTCP message types
244
TCP/IP Protocol Suite
RTCP uses an odd-numbered UDP port
number that follows the port number
selected for RTP.
Note
245
TCP/IP Protocol Suite
25-9 VOICE OVER IP
Let us concentrate on one real-time interactive
audio/video application: voice over IP, or Internet
telephony. The idea is to use the Internet as a
telephone network with some additional capabilities.
Instead of communicating over a circuit-switched
network, this application allows communication
between two parties over the packet-switched
Internet. Two protocols have been designed to
handle this type of communication: SIP and H.323.
We briefly discuss both.
246
TCP/IP Protocol Suite
Topics Discussed in the Section
 SIP
 H.323
247
TCP/IP Protocol Suite
Figure 25.21 SIP messages
248
TCP/IP Protocol Suite
Figure 25.22 SIP formats
249
TCP/IP Protocol Suite
Figure 25.23 SIP simple session
INVITE: address, options
OK: address
ACK
Establishing
Communicating Exchanging audio
BYE
Terminating
250
TCP/IP Protocol Suite
Figure 25.24 Tracking the callee
INVITE
Lookup
Reply
INVITE
OK
OK
ACK
ACK
Exchanging audio
BYE
251
TCP/IP Protocol Suite
Figure 25.25 H.323 architecture
252
TCP/IP Protocol Suite
Figure 25.26 H.323 protocols
253
TCP/IP Protocol Suite
Figure 25.27 H.323 example
Find IP address
of gatekeeper
Q.931 message
for setup
RTP for audio exchange
RTCP for management
Q.931 message
for termination
254
TCP/IP Protocol Suite
25-10 QUALITY OF SERVICE
Quality of service (QoS) is an internetworking issue
that has been discussed more than defined. We can
informally define quality of service as something a
flow of data seeks to attain. Although QoS can be
applied to both textual data and multimedia, it is
more an issue when we are dealing with multimedia.
255
TCP/IP Protocol Suite
Topics Discussed in the Section
 Flow Characteristics
 Flow Classes
 Techniques to Improve QoS
 Resource Reservation
 Admission Control
256
TCP/IP Protocol Suite
Figure 25.28 Flow characteristics
257
TCP/IP Protocol Suite
Figure 25.29 FIFO queues
258
TCP/IP Protocol Suite
Figure 25.30 Priority queues
259
TCP/IP Protocol Suite
Figure 25.31 Weighted fair queuing
260
TCP/IP Protocol Suite
Figure 25.32 Leaky bucket
261
TCP/IP Protocol Suite
Figure 25.33 Leaky bucket implementation
262
TCP/IP Protocol Suite
A leaky bucket algorithm shapes bursty
traffic into fixed-rate traffic by
averaging the data rate.
It may drop the packets if the
bucket is full.
Note
263
TCP/IP Protocol Suite
Figure 25.34 Token bucket
264
TCP/IP Protocol Suite
The token bucket allows bursty traffic at
a regulated maximum rate.
Note
265
TCP/IP Protocol Suite
25-11 INTEGRATED SERVICES
IP was originally designed for best-effort delivery.
This means that every user receives the same level
of services. This type of delivery does not guarantee
the minimum of a service, such as bandwidth, to
applications such as real-time audio and video.
Integrated Services, sometimes called IntServ, is a
flow-based QoS model, which means that a user
needs to create a flow, a kind of virtual circuit, from
the source to the destination and inform all routers of
the resource requirement.
266
TCP/IP Protocol Suite
Topics Discussed in the Section
 Signaling
 Flow Specification
 Admission
 Service Classes
 RSVP
 Problems with Integrated Services
267
TCP/IP Protocol Suite
Integrated Services is a flow-based QoS
model designed for IP.
Note
268
TCP/IP Protocol Suite
Figure 25.35 Path messages
269
TCP/IP Protocol Suite
Figure 25.36 Resv messages
270
TCP/IP Protocol Suite
Figure 25.37 Reservation merging
271
TCP/IP Protocol Suite
Figure 25.38 Reservation styles
272
TCP/IP Protocol Suite
25-12 DIFFERENTIATED SERVICES
Differentiated Services (DS or Diffserv) was
introduced by the IETF (Internet Engineering Task
Force) to handle the shortcomings of Integrated
Services.
273
TCP/IP Protocol Suite
Topics Discussed in the Section
 DS Field
274
TCP/IP Protocol Suite
Differentiated Services is a class-based
QoS model designed for IP.
Note
275
TCP/IP Protocol Suite
Figure 25.39 DS field
276
TCP/IP Protocol Suite
Figure 25.40 Traffic conditioner
277
TCP/IP Protocol Suite

More Related Content

Similar to PowerPoint_merge (2).pdf

User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocolMohd Arif
 
Cisco discovery d homesb module 6 - v.4 in english.
Cisco discovery   d homesb module 6 - v.4 in english.Cisco discovery   d homesb module 6 - v.4 in english.
Cisco discovery d homesb module 6 - v.4 in english.igede tirtanata
 
2.4 Write a stream –based echo server and a client sending message t.pdf
2.4 Write a stream –based echo server and a client sending message t.pdf2.4 Write a stream –based echo server and a client sending message t.pdf
2.4 Write a stream –based echo server and a client sending message t.pdfexcellentmobiles
 
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 eraHTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 erapeychevi
 
CCNA RS_NB - Chapter 5
CCNA RS_NB - Chapter 5CCNA RS_NB - Chapter 5
CCNA RS_NB - Chapter 5Irsandi Hasan
 
12 coms 525 tcpip - applications - http - telnet
12   coms 525 tcpip - applications - http - telnet12   coms 525 tcpip - applications - http - telnet
12 coms 525 tcpip - applications - http - telnetPalanivel Kuppusamy
 
TCP/IP Training Basic Concepts.
TCP/IP Training Basic Concepts.TCP/IP Training Basic Concepts.
TCP/IP Training Basic Concepts.Amir Panahi
 
transfer protocols,ftp,smtp,pop,imap
transfer protocols,ftp,smtp,pop,imaptransfer protocols,ftp,smtp,pop,imap
transfer protocols,ftp,smtp,pop,imapAKSHIT KOHLI
 
Protocol Ppt[1]
Protocol Ppt[1]Protocol Ppt[1]
Protocol Ppt[1]anil933
 
1.- Networking Models, Devices.pdf
1.- Networking Models, Devices.pdf1.- Networking Models, Devices.pdf
1.- Networking Models, Devices.pdfOpositorGonzalez1
 

Similar to PowerPoint_merge (2).pdf (20)

Transportlayer.ppt
Transportlayer.pptTransportlayer.ppt
Transportlayer.ppt
 
unit 3 ns.ppt
unit 3 ns.pptunit 3 ns.ppt
unit 3 ns.ppt
 
TCP Vs UDP
TCP Vs UDP TCP Vs UDP
TCP Vs UDP
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocol
 
Chap 11
Chap 11Chap 11
Chap 11
 
Cisco discovery d homesb module 6 - v.4 in english.
Cisco discovery   d homesb module 6 - v.4 in english.Cisco discovery   d homesb module 6 - v.4 in english.
Cisco discovery d homesb module 6 - v.4 in english.
 
Chap 19 ftp & tftp
Chap 19 ftp & tftpChap 19 ftp & tftp
Chap 19 ftp & tftp
 
2.4 Write a stream –based echo server and a client sending message t.pdf
2.4 Write a stream –based echo server and a client sending message t.pdf2.4 Write a stream –based echo server and a client sending message t.pdf
2.4 Write a stream –based echo server and a client sending message t.pdf
 
Chap 13
Chap 13Chap 13
Chap 13
 
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 eraHTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
CCNA RS_NB - Chapter 5
CCNA RS_NB - Chapter 5CCNA RS_NB - Chapter 5
CCNA RS_NB - Chapter 5
 
COMPUTER NETWORKS UNIT 4
COMPUTER NETWORKS UNIT 4COMPUTER NETWORKS UNIT 4
COMPUTER NETWORKS UNIT 4
 
12 coms 525 tcpip - applications - http - telnet
12   coms 525 tcpip - applications - http - telnet12   coms 525 tcpip - applications - http - telnet
12 coms 525 tcpip - applications - http - telnet
 
TCP/IP Training Basic Concepts.
TCP/IP Training Basic Concepts.TCP/IP Training Basic Concepts.
TCP/IP Training Basic Concepts.
 
transfer protocols,ftp,smtp,pop,imap
transfer protocols,ftp,smtp,pop,imaptransfer protocols,ftp,smtp,pop,imap
transfer protocols,ftp,smtp,pop,imap
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Protocol Ppt[1]
Protocol Ppt[1]Protocol Ppt[1]
Protocol Ppt[1]
 
Chap 02
Chap 02Chap 02
Chap 02
 
1.- Networking Models, Devices.pdf
1.- Networking Models, Devices.pdf1.- Networking Models, Devices.pdf
1.- Networking Models, Devices.pdf
 

Recently uploaded

原版定制英国赫瑞瓦特大学毕业证原件一模一样
原版定制英国赫瑞瓦特大学毕业证原件一模一样原版定制英国赫瑞瓦特大学毕业证原件一模一样
原版定制英国赫瑞瓦特大学毕业证原件一模一样AS
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制pxcywzqs
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0APNIC
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样AS
 
一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理
一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理
一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理apekaom
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理F
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样ayvbos
 
一比一原版(Polytechnic毕业证书)新加坡理工学院毕业证原件一模一样
一比一原版(Polytechnic毕业证书)新加坡理工学院毕业证原件一模一样一比一原版(Polytechnic毕业证书)新加坡理工学院毕业证原件一模一样
一比一原版(Polytechnic毕业证书)新加坡理工学院毕业证原件一模一样AS
 
Research Assignment - NIST SP800 [172 A] - Presentation.pptx
Research Assignment - NIST SP800 [172 A] - Presentation.pptxResearch Assignment - NIST SP800 [172 A] - Presentation.pptx
Research Assignment - NIST SP800 [172 A] - Presentation.pptxi191686
 
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书c6eb683559b3
 
一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理SS
 
一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理F
 
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptxA LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptxthinamazinyo
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrHenryBriggs2
 
Washington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers ShirtWashington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers Shirtrahman018755
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样ayvbos
 
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...mikehavy0
 

Recently uploaded (20)

原版定制英国赫瑞瓦特大学毕业证原件一模一样
原版定制英国赫瑞瓦特大学毕业证原件一模一样原版定制英国赫瑞瓦特大学毕业证原件一模一样
原版定制英国赫瑞瓦特大学毕业证原件一模一样
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
 
一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理
一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理
一比一原版桑佛德大学毕业证成绩单申请学校Offer快速办理
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
一比一原版(Polytechnic毕业证书)新加坡理工学院毕业证原件一模一样
一比一原版(Polytechnic毕业证书)新加坡理工学院毕业证原件一模一样一比一原版(Polytechnic毕业证书)新加坡理工学院毕业证原件一模一样
一比一原版(Polytechnic毕业证书)新加坡理工学院毕业证原件一模一样
 
Research Assignment - NIST SP800 [172 A] - Presentation.pptx
Research Assignment - NIST SP800 [172 A] - Presentation.pptxResearch Assignment - NIST SP800 [172 A] - Presentation.pptx
Research Assignment - NIST SP800 [172 A] - Presentation.pptx
 
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
 
一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理
 
一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理
 
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptxA LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Washington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers ShirtWashington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers Shirt
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
 

PowerPoint_merge (2).pdf

  • 1. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 21 File Transfer: FTP and TFTP 1 TCP/IP Protocol Suite
  • 2. OBJECTIVES:  To discuss FTP and two connections used in this protocol: control connection and data connection.  To discuss six classes of commands sent by the client to establish communication with the server.  To explain three types of file transfer transferred by FTP.  To show some user-friendly commands used by some FTP interfaces.  To discuss anonymous FTP and its application.  To discuss how file transfer can be done using a secure channel.  To discuss TFTP as a simple file transfer protocol without the complexities and sophistication of FTP. 2 TCP/IP Protocol Suite
  • 3. OBJECTIVES (continued):  To discuss five types of TFTP messages and their applications.  To discuss the sorcerer’s apprentice bug related to TFTP’s flow- and error-control mechanisms.  To show how TFTP can be used in conjunction with DHCP to initialize devices by downloading configuration files. 3 TCP/IP Protocol Suite
  • 5. 21-1 FTP File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for copying a file from one host to another. Although transferring files from one system to another seems simple and straightforward, some problems must be dealt with first. For example, two systems may use different file name conventions. Two systems may have different ways to represent text and data. Two systems may have different directory structures. All of these problems have been solved by FTP in a very simple and elegant approach. 5 TCP/IP Protocol Suite
  • 6. Topics Discussed in the Section  Connections  Communication  Command Processing  File Transfer  Anonymous FTP  Security for FTP  The sftp Program 6 TCP/IP Protocol Suite
  • 7. FTP uses the services of TCP. It needs two TCP connections. The well- known port 21 is used for the control connection and the well-known port 20 for the data connection. Note 7 TCP/IP Protocol Suite
  • 8. Figure 21.1 FTP 8 TCP/IP Protocol Suite
  • 9. Figure 21.2 Opening the control connection 9 TCP/IP Protocol Suite
  • 10. Figure 21.3 Creating the data connection 10 TCP/IP Protocol Suite
  • 11. Figure 21.4 Using the control connection 11 TCP/IP Protocol Suite
  • 12. Figure 21.5 Using the data connection 12 TCP/IP Protocol Suite
  • 13. Figure 21.6 Command processing 13 TCP/IP Protocol Suite
  • 22. Figure 21.7 File transfer 22 TCP/IP Protocol Suite
  • 23. Figure 21.8 shows an example of using FTP for retrieving a list of items in a directory. Example 21.1 23 TCP/IP Protocol Suite
  • 24. Figure 21.8 Example 21.1 220 (Service ready) USER forouzan LIST /usr/user/forouzan/reports PASS xxxxxx 125 (Data connection OK) 331 (User name OK. Password?) PORT 8888 150 (Data connection opens shortly) 230 (User login OK) 1 2 3 4 5 6 7 8 9 List of files or directories List of files or directories 10 11 QUIT 226 (Closing data connection) 221 (Service closing) 12 13 14 DATA TRANSFER 24 TCP/IP Protocol Suite
  • 25. The following shows an actual FTP session that parallels Example 21.1. The colored lines show the responses from the server control connection; the black lines show the commands sent by the client. The lines in white with black background show data transfer. Example 21.2 25 TCP/IP Protocol Suite
  • 26. Figure 21.9 shows an example of how an image (binary) file is stored. Example 21.3 26 TCP/IP Protocol Suite
  • 27. Figure 21.9 Example 21.3 220 (Service ready) USER forouzan TYPE EBCDIC STRU R STOR/usr/user/forouzan/reports/file1 PASS xxxxxx 200 (OK) 200 (OK) 250 (OK) 331 (User name OK. Password?) PORT 1267 150 (Data connection opens shortly) 230 (User login OK) 1 2 3 4 5 6 7 8 9 10 11 12 13 DATA TRANSFER Records of file .......... Records of file .......... 15 14 QUIT 226 (Closing data connection) 221 (Service closing) 16 17 18 27 TCP/IP Protocol Suite
  • 28. We show an example of anonymous FTP. We assume that some public data are available at internic.net. Example 21.4 28 TCP/IP Protocol Suite
  • 29. 21-2 TFTP There are occasions when we need to simply copy a file without the need for all of the features of the FTP protocol. For example, when a diskless workstation or a router is booted, we need to download the bootstrap and configuration files. Here we do not need all of the sophistication provided in FTP. We just need a protocol that quickly copies the files. 29 TCP/IP Protocol Suite
  • 30. Topics Discussed in the Section  Messages  Connection  Data Transfer  UDP Ports  TFTP Example  TFTP Options  Security  Applications 30 TCP/IP Protocol Suite
  • 31. TFTP uses the services of UDP on the well-known port 69. Note 31 TCP/IP Protocol Suite
  • 32. Figure 21.10 Message categories 32 TCP/IP Protocol Suite
  • 33. Figure 21.11 RRQ format 33 TCP/IP Protocol Suite
  • 34. Figure 21.12 WRQ format 34 TCP/IP Protocol Suite
  • 35. Figure 21.13 Data Format 35 TCP/IP Protocol Suite
  • 36. Figure 21.14 ACK format 36 TCP/IP Protocol Suite
  • 37. Figure 21.15 ERROR format 37 TCP/IP Protocol Suite
  • 39. Figure 21.16 Connection establishment 39 TCP/IP Protocol Suite
  • 40. Figure 21.17 Server’s apprentice bug 40 TCP/IP Protocol Suite
  • 41. Figure 21.18 UDP port numbers used by TFTP 41 TCP/IP Protocol Suite
  • 42. Figure 21.19 TFTP example 42 TCP/IP Protocol Suite
  • 43. Figure 21.20 Use of TFTP with DHCP 1 2 3 4 5 43 TCP/IP Protocol Suite
  • 44. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP 44 TCP/IP Protocol Suite
  • 45. OBJECTIVES:  To discuss the architecture of WWW and describe the concepts of hypertext and hypermedia.  To describe Web clients and Web servers and their components.  To define URL as a tool to identify a Web server.  To introduce three different Web documents: static document, dynamic document, and active document.  To discuss HTTP and its transactions.  To define and list the fields in a request message. 45 TCP/IP Protocol Suite
  • 46. OBJECTIVES (continued):  To define non-persistent and persistent connections in HTTP.  To introduce cookies and their applications in HTTP.  To discuss Web caching, its application, and the method used to update the cache. 46 TCP/IP Protocol Suite
  • 47. Chapter Outline 22.1 Architecture 22.2 Web Document 22.3 HTTP 47 TCP/IP Protocol Suite
  • 48. 22-1 ARCHITECTURE The WWW today is a distributed client-server service, in which a client using a browser can access a service using a server. However, the service provided is distributed over many locations called sites. Each site holds one or more documents, referred to as Web pages. Each Web page, however, can contain some links to other Web pages in the same or other sites. In other words, a Web page can be simple or composite. 48 TCP/IP Protocol Suite
  • 49. Topics Discussed in the Section  Hypertext and Hypermedia  Web Client (Browser)  Web Server  Uniform Resource Locator (URL) 49 TCP/IP Protocol Suite
  • 50. Assume we need to retrieve a Web page that contains the biography of a famous character with some pictures, which are embedded in the page itself. Since the pictures are not stored as separate files, the whole document is a simple Web page. It can be retrieved using one single request/ response transaction, as shown in Figure 22.1. Example 22.1 50 TCP/IP Protocol Suite
  • 51. Figure 22.1 Example 22.1 Request 1 Response 2 51 TCP/IP Protocol Suite
  • 52. Now assume we need to retrieve a scientific document that contains one reference to another text file and one reference to a large image. Figure 22.2 shows the situation. The main document and the image are stored in two separate files in the same site (file A and file B); the referenced text file is stored in another site (file C). Since we are dealing with three different files, we need three transactions if we want to see the whole document. The first transaction (request/response) retrieves a copy of the main document (file A), which has a reference (pointer) to the second and the third files. Example 22.2 52 TCP/IP Protocol Suite
  • 53. Figure 22.2 Example 22.2 Request 1 1 Response 1 2 Request 2 3 Response 2 4 Request 3 5 Response 3 6 53 TCP/IP Protocol Suite
  • 54. A very important point we need to remember is that file A, file B, and file C in Example 22.2 are independent Web pages, each with independent names and addresses. Although references to file B or C are included in file A, it does not mean that each of these files cannot be retrieved independently. A second user can retrieve file B with one transaction. A third user can retrieve file C with one transaction. Example 22.3 54 TCP/IP Protocol Suite
  • 56. Figure 22.4 URL 56 TCP/IP Protocol Suite
  • 57. 22-2 WEB DOCUMENTS The documents in the WWW can be grouped into three broad categories: static, dynamic, and active. The category is based on the time the contents of the document are determined. 57 TCP/IP Protocol Suite
  • 58. Topics Discussed in the Section  Static Documents  Dynamic Documents  Active Documents 58 TCP/IP Protocol Suite
  • 59. Figure 22.5 Static document Request 1 Static document 2 59 TCP/IP Protocol Suite
  • 60. HTML, XML, XSL, and XHTML are discussed in Appendix E. Note 60 TCP/IP Protocol Suite
  • 61. Figure 22.6 Dynamic document using CGI Request 1 Dynamic document 2 61 TCP/IP Protocol Suite
  • 62. Figure 22.7 Dynamic document using server-site script Request 1 Dynamic document 2 62 TCP/IP Protocol Suite
  • 63. Dynamic documents are sometimes referred to as server-site dynamic documents. Note 63 TCP/IP Protocol Suite
  • 64. Figure 22.8 Active document using Java applet Request 1 Result Run the applet to get the result Active document 2 Applet 64 TCP/IP Protocol Suite
  • 65. Figure 22.9 Active document using client-site script Request 1 Run the JavaScript (JS) to get the result Result 2 JavaScript JS 65 TCP/IP Protocol Suite
  • 66. Active documents are sometimes referred to as client-site dynamic documents. Note 66 TCP/IP Protocol Suite
  • 67. 22-3 HTTP The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data on the World Wide Web. HTTP functions like a combination of FTP (Chapter 21) and SMTP (Chapter 23). It is similar to FTP because it transfers files and uses the services of TCP. However, it is much simpler than FTP because it uses only one TCP connection. There is no separate control connection; only data are transferred between the client and the server. 67 TCP/IP Protocol Suite
  • 68. Topics Discussed in the Section  HTTP Transaction  Conditional Request  Persistence  Cookies  Web Caching: Proxy Server  HTTP Security 68 TCP/IP Protocol Suite
  • 69. HTTP uses the services of TCP on well- known port 80. Note 69 TCP/IP Protocol Suite
  • 70. Figure 22.10 HTTP transaction 1 Request message Request line Headers Body A blank line 2 Response message Status line Headers Body A blank line 70 TCP/IP Protocol Suite
  • 71. Figure 22.11 Format of the request message 71 TCP/IP Protocol Suite
  • 74. Figure 22.12 Format of the response message 74 TCP/IP Protocol Suite
  • 77. This example retrieves a document (see Figure 22.13). We use the GET method to retrieve an image with the path /usr/bin/image1. The request line shows the method (GET), the URL, and the HTTP version (1.1). The header has two lines that show that the client can accept images in the GIF or JPEG format. The request does not have a body. The response message contains the status line and four lines of header. The header lines define the date, server, MIME version, and length of the document. The body of the document follows the header. Example 22.4 77 TCP/IP Protocol Suite
  • 78. Figure 22.13 Example 22.4 78 TCP/IP Protocol Suite
  • 79. In this example, the client wants to send data to the server. We use the POST method. The request line shows the method (POST), URL, and HTTP version (1.1). There are four lines of headers. The request body contains the input information. The response message contains the status line and four lines of headers. The created document, which is a CGI document, is included as the body (see Figure 22.14). Example 22.5 79 TCP/IP Protocol Suite
  • 80. Figure 22.14 Example 22.5 80 TCP/IP Protocol Suite
  • 81. HTTP uses ASCII characters. The following shows how a client can directly connect to a server using TELNET, which logs into port 80. Example 22.6 81 TCP/IP Protocol Suite
  • 82. The following shows how a client imposes the modification data and time condition on a request. Example 22.7 The status line in the responds shows the file is not modified after the defined point of time. The body of the response message is also empty. 82 TCP/IP Protocol Suite
  • 83. Figure 22.15 shows an example of a nonpersistent connection. The client needs to access a file that contains two links to images. The text file and images are located on the same server. Example 22.8 83 TCP/IP Protocol Suite
  • 84. Figure 22.15 Example 22.8 84 TCP/IP Protocol Suite
  • 85. HTTP version 1.1 specifies a persistent connection by default. Note 85 TCP/IP Protocol Suite
  • 86. Figure 22.16 shows the same scenario as Example 22.8, but using persistent connection. Example 22.9 86 TCP/IP Protocol Suite
  • 87. Figure 22.16 Example 22.9 87 TCP/IP Protocol Suite
  • 88. Figure 22.17 shows a scenario in which an electronic store can benefit from the use of cookies. Assume a shopper wants to buy a toy from an electronic store named BestToys. The shopper browser (client) sends a request to the BestToys server. Example 22.10 88 TCP/IP Protocol Suite
  • 89. Figure 22.17 Example 22.10 A customer file is created with ID: 12343 Request GET BestToys.com HTTP/1.1 1 Response HTTP/1.1 200 OK Set-Cookie: 12343 Page Representing the Toys 2 A vendor file is created with cookie: 12343 Update 3 Request GET image HTTP/1.1 Response Cookie: 12343 Cookie 4 HTTP/1.1 200 OK Page Representing the price Update 5 Request GET image HTTP/1.1 Cookie: 12343 Information about the payment Cookie 6 Response HTTP/1.1 200 OK Order confirmation Update 89 TCP/IP Protocol Suite
  • 90. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 23 Electronic Mail: SMTP, POP IMAP, and MIME 90 TCP/IP Protocol Suite
  • 91. OBJECTIVES:  To explain the architecture of electronic mail using four scenarios.  To explain the user agent (UA), services provided by it, and two types of user agents.  To explain the mechanism of sending and receiving e-mails.  To introduce the role of a message transfer agent and Simple Mail  Transfer Protocol (SMTP) as the formal protocol that handles MTA.  To explain e-mail transfer phases.  To discuss two message access agents (MAAs): POP and IMAP. 91 TCP/IP Protocol Suite
  • 92. OBJECTIVES (continued):  To discuss MIME as a set of software functions that transforms non-ASCII data to ASCII data and vice versa.  To discuss the idea of Web-based e-mail.  To explain the security of the e-mail system. 92 TCP/IP Protocol Suite
  • 93. Chapter Outline 23.1 Architecture 23.2 User Agent 23.3 Message Transfer Agent 23.4 Message Access Agent 23.5 MIME 23.6 Web-Based Mail 23.7 Electronic Mail Security 93 TCP/IP Protocol Suite
  • 94. 23-1 ARCHITECTURE To explain the architecture of e-mail, we give four scenarios. We begin with the simplest situation and add complexity as we proceed. The fourth scenario is the most common in the exchange of e-mail. 94 TCP/IP Protocol Suite
  • 95. Topics Discussed in the Section  First Scenario  Second Scenario  Third Scenario  Fourth Scenario 95 TCP/IP Protocol Suite
  • 96. Figure 23.1 First scenario 1 2 96 TCP/IP Protocol Suite
  • 97. When the sender and the receiver of an e-mail are on the same mail server, we need only two user agents. Note 97 TCP/IP Protocol Suite
  • 98. Figure 23.2 Second scenario 1 2 3 4 5 98 TCP/IP Protocol Suite
  • 99. When the sender and the receiver of an e-mail are on different mail servers, we need two UAs and a pair of MTAs (client and server). Note 99 TCP/IP Protocol Suite
  • 100. Figure 23.3 Third scenario 1 2 3 4 5 6 7 100 TCP/IP Protocol Suite
  • 101. When the sender is connected to the mail server via a LAN or a WAN, we need two UAs and two pairs of MTAs (client and server). Note 101 TCP/IP Protocol Suite
  • 102. Figure 23.4 Fourth scenario 1 2 3 4 5 6 8 9 102 TCP/IP Protocol Suite
  • 103. When both sender and receiver are connected to the mail server via a LAN or a WAN, we need two UAs, two pairs of MTAs (client and server), and a pair of MAAs (client and server). This is the most common situation today. Note 103 TCP/IP Protocol Suite
  • 104. Figure 23.5 Push versus pull 104 TCP/IP Protocol Suite
  • 105. 23-2 USER AGENT The first component of an electronic mail system is the user agent (UA). It provides service to the user to make the process of sending and receiving a message easier. 105 TCP/IP Protocol Suite
  • 106. Topics Discussed in the Section  Services Provided by a User Agent  User Agent Types  Sending Mail  Receiving Mail  Addresses  Mailing List or Group List 106 TCP/IP Protocol Suite
  • 107. Some examples of command-driven user agents are mail, pine, and elm. Note 107 TCP/IP Protocol Suite
  • 108. Some examples of GUI-based user agents are Eudora, Outlook, And Netscape. Note 108 TCP/IP Protocol Suite
  • 109. Figure 23.6 Format of an email 109 TCP/IP Protocol Suite
  • 110. Figure 23.7 E-mail address 110 TCP/IP Protocol Suite
  • 111. 23-3 MESSAGE TRANSFER AGENT The actual mail transfer is done through message transfer agents (MTAs). To send mail, a system must have the client MTA, and to receive mail, a system must have a server MTA. The formal protocol that defines the MTA client and server in the Internet is called Simple Mail Transfer Protocol (SMTP). As we said before, two pairs of MTA client-server programs are used in the most common situation (fourth scenario). Figure 23.8 shows the range of the SMTP protocol in this scenario. 111 TCP/IP Protocol Suite
  • 112. Topics Discussed in the Section  Commands and Responses  Mail Transfer Phases 112 TCP/IP Protocol Suite
  • 113. Figure 23.8 SMTP range 113 TCP/IP Protocol Suite
  • 114. Figure 23.9 Commands and responses 114 TCP/IP Protocol Suite
  • 117. Figure 23.10 Connection establishment 220 service ready 1 HELO: deanza.edu 2 250 OK 3 117 TCP/IP Protocol Suite
  • 118. Figure 23.11 Message transfer 118 TCP/IP Protocol Suite
  • 119. Figure 23.12 Connection termination 1 QUIT 2 221 service closed 119 TCP/IP Protocol Suite
  • 120. Let us see how we can directly use SMTP to send an e-mail and simulate the commands and responses we described in this section. We use TELNET to log into port 25 (the well-known port for SMTP). We then use the commands directly to send an e- mail. In this example, forouzanb@adelphia.net is sending an e- mail to himself. The first few lines show TELNET trying to connect to the adelphia mail server. Example 23.1 After connection, we can type the SMTP commands and then receive the responses as shown below. We have shown the commands in black and the responses in color. Note that we have added for clarification some comment lines, designated by the “=” sign. These lines are not part of the e-mail procedure. 120 TCP/IP Protocol Suite
  • 122. 23-4 MESSAGE ACCESS AGENT The first and the second stages of mail delivery use SMTP. However, SMTP is not involved in the third stage because SMTP is a push protocol; it pushes the message from the client to the server. In other words, the direction of the bulk data (messages) is from the client to the server. On the other hand, the third stage needs a pull protocol; the client must pull messages from the server. The direction of the bulk data are from the server to the client. The third stage uses a message access agent. 122 TCP/IP Protocol Suite
  • 123. Topics Discussed in the Section  POP3  IMAP4 123 TCP/IP Protocol Suite
  • 124. Figure 23.13 Pop3 and IMAP4 124 TCP/IP Protocol Suite
  • 125. Figure 23.14 Pop3 125 TCP/IP Protocol Suite
  • 126. 23-5 MIME Electronic mail has a simple structure. Its simplicity, however, comes with a price. It can send messages only in NVT 7-bit ASCII format. In other words, it has some limitations. Multipurpose Internet Mail Extensions (MIME) is a supplementary protocol that allows non- ASCII data to be sent through e-mail. MIME transforms non-ASCII data at the sender site to NVT ASCII data and delivers it to the client MTA to be sent through the Internet. The message at the receiving site is transformed back to the original data. 126 TCP/IP Protocol Suite
  • 127. Topics Discussed in the Section  MIME Headers 127 TCP/IP Protocol Suite
  • 128. Figure 23.15 MIME 128 TCP/IP Protocol Suite
  • 129. Figure 23.16 MIME header 129 TCP/IP Protocol Suite
  • 134. Figure 23.18 Quoted printable 134 TCP/IP Protocol Suite
  • 135. 23-6 WEB-BASED MAIL E-mail is such a common application that some websites today provide this service to anyone who accesses the site. Three common sites are Hotmail, Yahoo, and Google. The idea is very simple. Let us go through two cases: 135 TCP/IP Protocol Suite
  • 136. Topics Discussed in the Section  Case I  Case II 136 TCP/IP Protocol Suite
  • 137. Figure 23.19 Web-based e-mail, case 1 1 2 3 4 HTTP transactions 137 TCP/IP Protocol Suite
  • 138. Figure 23.20 Web-based e-mail, case 2 HTTP transactions HTTP transactions 1 2 3 138 TCP/IP Protocol Suite
  • 139. 23-6 E-MAIL SECURITY The protocol discussed in this chapter does not provide any security provisions per se. However, e- mail exchanges can be secured using two application-layer securities designed in particular for e-mail systems. Two of these protocols, Pretty Good Privacy (PGP) and Secure MIME (SMIME) are discussed in Chapter 30 after we have discussed the basic network security. 139 TCP/IP Protocol Suite
  • 140. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 24 Network Management: SNMP 140 TCP/IP Protocol Suite
  • 141. OBJECTIVES:  To discuss SNMP as a framework for managing devices in an internet using the TCP/IP protocol suite.  To define a manager as a host that runs SNMP client and any agents as a router or host that runs a server program.  Discuss SMI and MIB, which are used by SNMP.  To show how SMI names objects, defines the type of data, and encodes data.  To show how data types are defined using ASN.1.  To show how SMI uses BER to encode data.  To show the functionality of SNMP using three methods. 141 TCP/IP Protocol Suite
  • 142. OBJECTIVES:  To show how SNMP uses two different ports of UDP.  To show how SNMPv3 has enhanced security features over previous versions. 142 TCP/IP Protocol Suite
  • 143. Chapter Outline 24.1 Concept 24.2 Management Components 24.3 SMI 24.4 MIB 24.5 SNMP 24.6 UDP Ports 24.7 Security 143 TCP/IP Protocol Suite
  • 144. 24-1 CONCEPT SNMP uses the concept of manager and agent. That is, a manager, usually a host, controls and monitors a set of agents, usually routers or servers (see Figure 24.1). 144 TCP/IP Protocol Suite
  • 145. Topics Discussed in the Section  Managers and Agents 145 TCP/IP Protocol Suite
  • 146. Figure 24.1 SNMP concept 146 TCP/IP Protocol Suite
  • 147. 24-2 MANAGEMENT COMPONENTS To do management tasks, SNMP uses two other protocols: Structure of Management Information (SMI) and Management Information Base (MIB). In other words, management on the Internet is done through the cooperation of three protocols: SNMP, SMI, and MIB, as shown in Figure 24.2. 147 TCP/IP Protocol Suite
  • 148. Topics Discussed in the Section  Role of SNMP  Role of SMI  Role of MIB  An Analogy  An Overview 148 TCP/IP Protocol Suite
  • 149. Figure 24.2 Companion of network management on the Internet 149 TCP/IP Protocol Suite
  • 150. SNMP defines the format of packets exchanged between a manager and an agent. It reads and changes the status of objects (values of variables) in SNMP packets. Note 150 TCP/IP Protocol Suite
  • 151. SMI defines the general rules for naming objects, defining object types (including range and length), and showing how to encode objects and values. Note 151 TCP/IP Protocol Suite
  • 152. MIB creates a collection of named objects, their types, and their relationships to each other in an entity to be managed. Note 152 TCP/IP Protocol Suite
  • 153. Figure 24.3 Comparing computer programming and network management 153 TCP/IP Protocol Suite
  • 154. Figure 24.4 Management overview 1 2 3 Get Request SNMP packet 4 Response SNMP packet 5 6 154 TCP/IP Protocol Suite
  • 155. 24-3 SMI The Structure of Management Information is a component for network management. Its functions are: 1. To name objects. 2. To define the type of data that can be stored in an object. 3. To show how to encode data for transmission over the network. SMI is a guideline for SNMP. It emphasizes three attributes to handle an object: name, data type, and encoding method. 155 TCP/IP Protocol Suite
  • 156. Topics Discussed in the Section  Name  Type  Encoding Method 156 TCP/IP Protocol Suite
  • 157. Figure 24.5 Object identifier 157 TCP/IP Protocol Suite
  • 158. All objects managed by SNMP are given an object identifier. The object identifier always starts with 1.3.6.1.2.1. Note 158 TCP/IP Protocol Suite
  • 160. Figure 24.6 Conceptual data types 160 TCP/IP Protocol Suite
  • 161. Figure 24.7 Encoding format 161 TCP/IP Protocol Suite
  • 163. Figure 24.8 shows how to define INTEGER 14. Note that we have used both binary representation and hexadecimal representation for the tag. The size of the length field is from Table 24.1. Example 24.1 163 TCP/IP Protocol Suite
  • 164. Figure 24.8 Example 24.1: INTEGER 14 164 TCP/IP Protocol Suite
  • 165. Figure 24.9 shows how to define the OCTET STRING “HI.” Example 24.2 165 TCP/IP Protocol Suite
  • 166. Figure 24.9 Example 24.2: OCTET STRING “HI” 166 TCP/IP Protocol Suite
  • 167. Figure 24.10 shows how to define ObjectIdentifier 1.3.6.1 (iso.org.dod.internet). Example 24.3 167 TCP/IP Protocol Suite
  • 168. Figure 24.10 Example 24.3: ObjectIndentifier 1.3.6.1 168 TCP/IP Protocol Suite
  • 169. Figure 24.11 shows how to define IPAddress 131.21.14.8. Example 24.4 169 TCP/IP Protocol Suite
  • 170. Figure 24.11 Example 24.4: IPAddress 131.21.14.8 170 TCP/IP Protocol Suite
  • 171. 24-4 MIB The Management Information Base, version 2 (MIB2) is the second component used in network management. Each agent has its own MIB2, which is a collection of all the objects that the manager can manage. The objects in MIB2 are categorized under 10 different groups: system, interface, address translation, ip, icmp, tcp, udp, egp, transmission, and snmp. These groups are under the mib-2 object in the object identifier tree (see Figure 24.12). Each group has defined variables and/or tables. 171 TCP/IP Protocol Suite
  • 172. Topics Discussed in the Section  Accessing MIB Variables  Lexicographic Ordering 172 TCP/IP Protocol Suite
  • 173. Figure 24.12 mib-2 173 TCP/IP Protocol Suite
  • 174. Figure 24.13 udp group 174 TCP/IP Protocol Suite
  • 175. Figure 24.14 udp variables and tables 175 TCP/IP Protocol Suite
  • 176. Figure 24.15 Indexes for udpTable 176 TCP/IP Protocol Suite
  • 177. Figure 24.16 Lexicographic ordering 177 TCP/IP Protocol Suite
  • 178. 24-5 SNMP SNMP uses both SMI and MIB in Internet network management. It is an application program that allows: 1. A manager to retrieve the value of an object defined in an agent. 2. A manager to store a value in an object defined in an agent. 3. An agent to send an alarm message about an abnormal situation to the manager. 178 TCP/IP Protocol Suite
  • 179. Topics Discussed in the Section  PDUs  Format  Messages 179 TCP/IP Protocol Suite
  • 180. Figure 24.17 SNMP PDUs 180 TCP/IP Protocol Suite
  • 181. Figure 24.18 SNMP PDU format 181 TCP/IP Protocol Suite
  • 184. Figure 24.19 SNMP message 184 TCP/IP Protocol Suite
  • 185. In this example, a manager station (SNMP client) uses a message with GetRequest PDU to retrieve the number of UDP datagrams that a router has received (Figure 24.20). There is only one VarBind sequence. The corresponding MIB variable related to this information is udpInDatagrams with the object identifier 1.3.6.1.2.1.7.1.0. The manager wants to retrieve a value (not to store a value), so the value defines a null entity. The bytes to be sent are shown in hexadecimal representation. Example 24.4 185 TCP/IP Protocol Suite
  • 186. Figure 24.20 Example 24.5 186 TCP/IP Protocol Suite
  • 187. Figure 24.21 Actual message sent for Example 24.5 187 TCP/IP Protocol Suite
  • 188. 24-6 UDP PORTS SNMP uses the services of UDP on two well-known ports, 161 and 162. The well-known port 161 is used by the server (agent), and the well-known port 162 is used by the client (manager). 188 TCP/IP Protocol Suite
  • 189. Figure 24.2 Port numbers for SNMP 189 TCP/IP Protocol Suite
  • 190. 24-7 SECURITY SNMPv3 has added two new features to the previous version: security and remote administration. SNMPv3 allows a manager to choose one or more levels of security when accessing an agent. Different aspects of security can be configured by the manager to allow message authentication, confidentiality, and integrity. SNMPv3 also allows remote configuration of security aspects without requiring the administrator to actually be at the place where the device is located. 190 TCP/IP Protocol Suite
  • 191. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 25 Multimedia 191 TCP/IP Protocol Suite
  • 192. OBJECTIVES:  To show how audio/video files can be downloaded for future use or broadcast to clients over the Internet. The Internet can also be used for live audio/video interaction. Audio and video need to be digitized before being sent over the Internet.  To discuss how audio and video files are compressed for transmission through the Internet.  To discuss the phenomenon called Jitter that can be created on a packet-switched network when transmitting real-time data.  To introduce the Real-Time Transport Protocol (RTP) and Real- Time Transport Control Protocol (RTCP) used in multimedia applications.  To discuss voice over IP as a real-time interactive audio/video application. 192 TCP/IP Protocol Suite
  • 193. OBJECTIVES (continued):  To introduce the Session Initiation Protocol (SIP) as an application layer protocol that establishes, manages, and terminates multimedia sessions.  To introduce quality of service (QoS) and how it can be improved using scheduling techniques and traffic shaping techniques.  To discuss Integrated Services and Differential Services and how they can be implemented.  To introduce Resource Reservation Protocol (RSVP) as a signaling protocol that helps IP create a flow and makes a resource reservation. 193 TCP/IP Protocol Suite
  • 194. Chapter Outline 25.1 Introduction 25.2 Digitizing Audio and Video 25.3 Audio/Video Compression 25.4 Streaming Stored Audio/Video 25.5 Streaming Live Audio/Video 25.6 Real-Time Interactive Audio/Video 25.7 RTP 25.8 RTCP 194 TCP/IP Protocol Suite
  • 195. Chapter Outline (continued) 25.9 Voice Over IP 25.10 Quality of Service 25.11 Integrated Services 25.12 Differentiated Services 195 TCP/IP Protocol Suite
  • 196. 25-1 INTRODUCTION We can divide audio and video services into three broad categories: streaming stored audio/video, streaming live audio/video, and interactive audio/video, as shown in Figure 25.1. Streaming means a user can listen (or watch) the file after the downloading has started. 196 TCP/IP Protocol Suite
  • 197. Figure 25.1 Internet audio/video 197 TCP/IP Protocol Suite
  • 198. Streaming stored audio/video refers to on-demand requests for compressed audio/video files. Note 198 TCP/IP Protocol Suite
  • 199. Streaming live audio/video refers to the broadcasting of radio and TV programs through the Internet. Note 199 TCP/IP Protocol Suite
  • 200. Interactive audio/video refers to the use of the Internet for interactive audio/video applications. Note 200 TCP/IP Protocol Suite
  • 201. 25-2 DIGITIZING AUDIO AND VIDEO Before audio or video signals can be sent on the Internet, they need to be digitized. We discuss audio and video separately. 201 TCP/IP Protocol Suite
  • 202. Topics Discussed in the Section  Digitizing Audio  Digitizing Video 202 TCP/IP Protocol Suite
  • 203. Compression is needed to send video over the Internet. Note 203 TCP/IP Protocol Suite
  • 204. 25-3 AUDIO AND VIDEO COMPRESSION To send audio or video over the Internet requires compression. In this section, we first discuss audio compression and then video compression. 204 TCP/IP Protocol Suite
  • 205. Topics Discussed in the Section  Audio Compression  Video Compression 205 TCP/IP Protocol Suite
  • 206. Figure 25.2 JPEG gray scale 206 TCP/IP Protocol Suite
  • 207. Figure 25.3 JPEG process 207 TCP/IP Protocol Suite
  • 208. Figure 25.4 Case 1: uniform gray scale 208 TCP/IP Protocol Suite
  • 209. Figure 25.5 Case2: two sections 209 TCP/IP Protocol Suite
  • 210. Figure 25.6 Case 3 : gradient gray scale 210 TCP/IP Protocol Suite
  • 211. Figure 25.7 Reading the table 211 TCP/IP Protocol Suite
  • 212. Figure 25.8 MPEG frames 212 TCP/IP Protocol Suite
  • 213. Figure 25.9 MPEG frame construction 213 TCP/IP Protocol Suite
  • 214. 25-4 STREAMING STORED AUDIO/VIDEO Now that we have discussed digitizing and compressing audio/video, we turn our attention to specific applications. The first is streaming stored audio and video. Downloading these types of files from a Web server can be different from downloading other types of files. To understand the concept, let us discuss three approaches, each with a different complexity. 214 TCP/IP Protocol Suite
  • 215. Topics Discussed in the Section  First Approach: Using a Web Server  Second Approach: Using a Web Server with Metafile  Third Approach: Using a Media Server  Fourth Approach: Using a Media Server and RTSP 215 TCP/IP Protocol Suite
  • 216. Figure 25.10 Using a Web server GET: audio/video file 1 RESPONSE 2 Audio/video file 3 216 TCP/IP Protocol Suite
  • 217. Figure 25.11 Using a Web server with a metafile GET: metafile 1 RESPONSE 2 Metafile 3 GET: audio/video file 4 RESPONSE 5 217 TCP/IP Protocol Suite
  • 218. Figure 25.12 Using a media server GET: metafile 1 RESPONSE 2 Metafile 3 GET: audio/video file 4 RESPONSE 5 218 TCP/IP Protocol Suite
  • 219. Figure 25.13 Using a media server and RSTP GET: metafile 1 RESPONSE 2 Metafile 3 SETUP 4 RESPONSE 5 PLAY 6 RESPONSE 7 Audio/video Stream TEARDOWN 8 RESPONSE 9 219 TCP/IP Protocol Suite
  • 220. 25-5 STREAMING LIVE AUDIO/VIDEO Streaming live audio/video is similar to the broadcasting of audio and video by radio and TV stations. Instead of broadcasting to the air, the stations broadcast through the Internet. There are several similarities between streaming stored audio/video and streaming live audio/video. They are both sensitive to delay; neither can accept retransmission. However, there is a difference. In the first application, the communication is unicast and on-demand. In the second, the communication is multicast and live. 220 TCP/IP Protocol Suite
  • 221. 25-6 REAL-TIME INTERACTIVE AUDIO/VIDEO In real-time interactive audio/video, people communicate with one another in real time. The Internet phone or voice over IP is an example of this type of application. Video conferencing is another example that allows people to communicate visually and orally. 221 TCP/IP Protocol Suite
  • 222. Topics Discussed in the Section  Characteristics 222 TCP/IP Protocol Suite
  • 223. Figure 25.14 Time relationship 223 TCP/IP Protocol Suite
  • 224. Jitter is introduced in real-time data by the delay between packets. Note 224 TCP/IP Protocol Suite
  • 227. To prevent jitter, we can timestamp the packets and separate the arrival time from the playback time. Note 227 TCP/IP Protocol Suite
  • 228. Figure 25.17 Playback buffer 228 TCP/IP Protocol Suite
  • 229. A playback buffer is required for real-time traffic. Note 229 TCP/IP Protocol Suite
  • 230. A sequence number on each packet is required for real-time traffic. Note 230 TCP/IP Protocol Suite
  • 231. Real-time traffic needs the support of multicasting. Note 231 TCP/IP Protocol Suite
  • 232. Translation means changing the encoding of a payload to a lower quality to match the bandwidth of the receiving network. Note 232 TCP/IP Protocol Suite
  • 233. Mixing means combining several streams of traffic into one stream. Note 233 TCP/IP Protocol Suite
  • 234. TCP, with all its sophistication, is not suitable for interactive multimedia traffic because we cannot allow retransmission of packets. Note 234 TCP/IP Protocol Suite
  • 235. UDP is more suitable than TCP for interactive traffic. However, we need the services of RTP, another transport layer protocol, to make up for the deficiencies of UDP. Note 235 TCP/IP Protocol Suite
  • 236. 25-7 RTP Real-time Transport Protocol (RTP) is the protocol designed to handle real-time traffic on the Internet. RTP does not have a delivery mechanism (multicasting, port numbers, and so on); it must be used with UDP. RTP stands between UDP and the application program. The main contributions of RTP are timestamping, sequencing, and mixing facilities. 236 TCP/IP Protocol Suite
  • 237. Topics Discussed in the Section  RTP Packet Format  UDP Port 237 TCP/IP Protocol Suite
  • 238. Figure 25.18 RTP packet header format 238 TCP/IP Protocol Suite
  • 239. Figure 25.19 RTP packet header format 239 TCP/IP Protocol Suite
  • 241. RTP uses a temporary even-numbered UDP port. Note 241 TCP/IP Protocol Suite
  • 242. 25-8 RTCP RTP allows only one type of message, one that carries data from the source to the destination. In many cases, there is a need for other messages in a session. These messages control the flow and quality of data and allow the recipient to send feedback to the source or sources. Real-Time Transport Control Protocol (RTCP) is a protocol designed for this purpose. 242 TCP/IP Protocol Suite
  • 243. Topics Discussed in the Section  Sender Report  Receiver Report  Source Description Message  Bye Message  Application-Specific Message  UDP Port 243 TCP/IP Protocol Suite
  • 244. Figure 25.20 RTCP message types 244 TCP/IP Protocol Suite
  • 245. RTCP uses an odd-numbered UDP port number that follows the port number selected for RTP. Note 245 TCP/IP Protocol Suite
  • 246. 25-9 VOICE OVER IP Let us concentrate on one real-time interactive audio/video application: voice over IP, or Internet telephony. The idea is to use the Internet as a telephone network with some additional capabilities. Instead of communicating over a circuit-switched network, this application allows communication between two parties over the packet-switched Internet. Two protocols have been designed to handle this type of communication: SIP and H.323. We briefly discuss both. 246 TCP/IP Protocol Suite
  • 247. Topics Discussed in the Section  SIP  H.323 247 TCP/IP Protocol Suite
  • 248. Figure 25.21 SIP messages 248 TCP/IP Protocol Suite
  • 249. Figure 25.22 SIP formats 249 TCP/IP Protocol Suite
  • 250. Figure 25.23 SIP simple session INVITE: address, options OK: address ACK Establishing Communicating Exchanging audio BYE Terminating 250 TCP/IP Protocol Suite
  • 251. Figure 25.24 Tracking the callee INVITE Lookup Reply INVITE OK OK ACK ACK Exchanging audio BYE 251 TCP/IP Protocol Suite
  • 252. Figure 25.25 H.323 architecture 252 TCP/IP Protocol Suite
  • 253. Figure 25.26 H.323 protocols 253 TCP/IP Protocol Suite
  • 254. Figure 25.27 H.323 example Find IP address of gatekeeper Q.931 message for setup RTP for audio exchange RTCP for management Q.931 message for termination 254 TCP/IP Protocol Suite
  • 255. 25-10 QUALITY OF SERVICE Quality of service (QoS) is an internetworking issue that has been discussed more than defined. We can informally define quality of service as something a flow of data seeks to attain. Although QoS can be applied to both textual data and multimedia, it is more an issue when we are dealing with multimedia. 255 TCP/IP Protocol Suite
  • 256. Topics Discussed in the Section  Flow Characteristics  Flow Classes  Techniques to Improve QoS  Resource Reservation  Admission Control 256 TCP/IP Protocol Suite
  • 257. Figure 25.28 Flow characteristics 257 TCP/IP Protocol Suite
  • 258. Figure 25.29 FIFO queues 258 TCP/IP Protocol Suite
  • 259. Figure 25.30 Priority queues 259 TCP/IP Protocol Suite
  • 260. Figure 25.31 Weighted fair queuing 260 TCP/IP Protocol Suite
  • 261. Figure 25.32 Leaky bucket 261 TCP/IP Protocol Suite
  • 262. Figure 25.33 Leaky bucket implementation 262 TCP/IP Protocol Suite
  • 263. A leaky bucket algorithm shapes bursty traffic into fixed-rate traffic by averaging the data rate. It may drop the packets if the bucket is full. Note 263 TCP/IP Protocol Suite
  • 264. Figure 25.34 Token bucket 264 TCP/IP Protocol Suite
  • 265. The token bucket allows bursty traffic at a regulated maximum rate. Note 265 TCP/IP Protocol Suite
  • 266. 25-11 INTEGRATED SERVICES IP was originally designed for best-effort delivery. This means that every user receives the same level of services. This type of delivery does not guarantee the minimum of a service, such as bandwidth, to applications such as real-time audio and video. Integrated Services, sometimes called IntServ, is a flow-based QoS model, which means that a user needs to create a flow, a kind of virtual circuit, from the source to the destination and inform all routers of the resource requirement. 266 TCP/IP Protocol Suite
  • 267. Topics Discussed in the Section  Signaling  Flow Specification  Admission  Service Classes  RSVP  Problems with Integrated Services 267 TCP/IP Protocol Suite
  • 268. Integrated Services is a flow-based QoS model designed for IP. Note 268 TCP/IP Protocol Suite
  • 269. Figure 25.35 Path messages 269 TCP/IP Protocol Suite
  • 270. Figure 25.36 Resv messages 270 TCP/IP Protocol Suite
  • 271. Figure 25.37 Reservation merging 271 TCP/IP Protocol Suite
  • 272. Figure 25.38 Reservation styles 272 TCP/IP Protocol Suite
  • 273. 25-12 DIFFERENTIATED SERVICES Differentiated Services (DS or Diffserv) was introduced by the IETF (Internet Engineering Task Force) to handle the shortcomings of Integrated Services. 273 TCP/IP Protocol Suite
  • 274. Topics Discussed in the Section  DS Field 274 TCP/IP Protocol Suite
  • 275. Differentiated Services is a class-based QoS model designed for IP. Note 275 TCP/IP Protocol Suite
  • 276. Figure 25.39 DS field 276 TCP/IP Protocol Suite
  • 277. Figure 25.40 Traffic conditioner 277 TCP/IP Protocol Suite