Professional Documents
Culture Documents
Networking
Chapter 2
Protocol Architecture:
TCP/IP model and OSI Model
Reading:
Book Chapter 2
Data and Computer Communications, 8th edition
By William Stallings
1
Outline
Section 1: The need for a protocol
architecture
Section 2: TCP/IP protocol architecture
Section 3: OSI model
Learning outcomes:
Describe the network protocol architectures
and reference models
Section 1
What is a protocol?
From dictionary:
A general definition:
the accepted or established code of procedure
or behavior in any group, organization, or
situation
For computing:
set of rules governing the exchange or
transmission of data electronically between
devices
4
Protocol
To perform a task, the involved parties usually
follow a common protocol designed for this task
The protocol is just a set of rules or conventions
Different tasks use different protocols
Semantics
Includes control information for coordination and error
handling
Timing
Includes speed matching and sequencing
Examples of Protocol
Two protocols will be studied in your first lab
HTTP is the protocol used for browsing website
Web browser <----> Web server
http://www.youtube.com/watch?v=1IQFjTnDozo&feature=related
How to
How to
How to
How to
error?
Etc.
(Cont.)
Most of the network apps share some
common modules
Application A
Application B
Application C
Module A
Module B
Module C
Module T
Module T
Module T
Module I
Module I
Module I
Module N
Module N
Module N
Module P
Module P
Module P
Common
modules
(Cont.)
A complex task is broken into subtasks: modular
design
Each subtask is implemented separately as a layer,
arranged in a vertical stack
Vertical Stack
Application A
Module A
Application B
Module B
Application C
Module C
Module T
Application developers
Operating System
Module I
Module N
Module P
can be replaced by
other modules
Hardware
Module W
10
Example
E.g., A can only speak Chinese, B can only
speak Spanish, how can A communicate
with B?
A finds a translator C, who can speak Chinese
and English
B finds a translator D, who can speak Spanish
and English
Two layers:
Higher layer: A and B
Lower layer: C and D
11
A Two-layer example
Higher A
Layer
How to communicate?
messages
in Chinese
Lower
Layer
messages
in Spanish
messages in English
C
12
Section 2
13
Protocol Architecture
Tasks of communications are broken up into
modules
Each module (or layer) can have its own protocol
14
15
Example
World Wide Web
Replies on the HTTP protocol
Web browser
Web server
Layer 5
HTTP
HTTP
Layer 4
TCP
TCP
Layer 3
IP
IP
Layer 2
IEEE 802.11
IEEE 802.3
Layer 1
IEEE
802.11g
IEEE 802.3
1000BASE-SX
16
Benefit of layering
The most challenging problem: how to
provide a reliable data transfer service on
top of an unreliable data network?
This problem is so important that todays
Operating Systems all provide such reliable
service.
17
Physical Layer
The job of physical layer is to send individual bits
from one node to a directly connected node.
Address the communications issue
18
Multiple access
Point-to-point
19
20
Postal System
21
The delivery of
your package
depends on the
postal address.
22
Networking
Its not possible to connect any two hosts directly, therefore we need some switches to
help. These switches are called IP Routers.
23
IP Operation
24
IP Address
IPv4 address: 32-bit
Dotted decimal notation
192.5.48.3 <--> 11000000 00000101 00110000 00000011
25
Routers
Routers are responsible for receiving and forwarding packets
through the interconnected set of networks.
Each router is connected with a number of other routers.
Routers use buffer to store the incoming packets.
Incoming packets could be dropped if the buffer is too full.
26
C
A
145.26.x.x
G
Next Hop
18.x.x.x
21.x.x.x
145.26.x.x
212.134.7.x E
212.134.7.x
27
Transport Layer
How do software developers write network application
programs?
They make use of the services provided by Transport Layer, which
is normally part of the Operating System.
In fact, TCP/IP is indispensable for all the contemporary Operating
Systems (even for small devices like PDA or smart phone!).
28
29
UDP
User Datagram Protocol
Defined in RFC 768
http://www.ietf.org/rfc/rfc768.txt
30
UDP Ports:
multiplexing and demultiplexing
Todays operating systems support multiprocessing, i.e., a number of applications can run
simultaneously.
Multiplexing:
Each application program using UDP to send out data
must first negotiate with the operating system to obtain
a UDP port.
Any datagram the application program sends through
the port will have that port number in its UDP packet.
Demultiplexing:
UDP accepts incoming datagrams from the IP module,
and demultiplexes based on the UDP destination port.
31
UDP Applications
UDPs advantages
Finer application-level control over what data is sent, and
when
No connection establishment: saves time!
No connection state
Small packet header overhead: only 8 bytes
Can support multicast
32
TCP
RFC 793
http://www.ietf.org/rfc/rfc793.txt
From the hosts point of view, two applications need to setup a TCP
connection (like virtual circuit) before they use TCP to exchange data.
But from the networks point of view, they are still processing normal IP
packets. Routers dont distinguish between UDP packets and TCP packets.
33
TCP/IP Concepts
34
TCP segment
A TCP application generates data as a
byte stream.
TCP module receives some bytes from the
byte stream, then composes a TCP
segment by adding a TCP header, then
sends the segment to IP module.
The size of TCP header is at least 20
octets.
TCP header can have some options.
35
TCP
TCP is the most complicated protocol in
Internet. It is evolving all the time.
More than 90% of todays Internet traffic
are TCP. It has very wide applications.
You need to take another course to learn
the details of TCP/IP:
COMP3040: Internet & the World Wide Web
36
Application Layer
Contains the logic needed to support the user applications
Usually, each type of application needs to have one or
more protocols.
E.g.
Email applications
Sending email -- smtp: [http://www.ietf.org/rfc/rfc821.txt]
Accessing email -- pop3: [http://www.ietf.org/rfc/rfc1939.txt]
telnet
[http://www.ietf.org/rfc/rfc854.txt]
File transfer
FTP: File transfer protocol, [http://www.ietf.org/rfc/rfc959.txt]
Web application
HTTP/1.0: [http://www.ietf.org/rfc/rfc1945.txt]
HTTP/1.1: [http://www.ietf.org/rfc/rfc2616.txt]
37
38
Addressing Issue
Address is used to identify an object
It is common to use several addresses together to identify an
object
39
40
41
Section 3
42
44
OSI Layers
45
46
Mechanical
Electrical
Functional
Procedural
47
Transport Layer
Exchange of data between end systems
Error free
In sequence
No losses
No duplicates
Quality of service
48
49
Presentation Layer
Data formats and coding
Data compression
Encryption
Application Layer
Means for applications to access OSI environment
50
OSI v TCP/IP
51
KEY POINTS
A protocol architecture is the layered structure of
hardware and software that supports the exchange of
data between systems and supports distributed
applications, such as electronic mail and file transfer.
At each layer of a protocol architecture, one or more
common protocols are implemented in
communicating systems. Each protocol provides a
set of rules for the exchange of data between
systems.
The most widely used protocol architecture is the
TCP/IP protocol suite, which consists of the following
layers: physical, network access, internet, transport,
and application.
Another important protocol architecture is the sevenlayer Open Systems Interconnection (OSI) model.
52