William Stallings Data and Computer Communications

Download Report

Transcript William Stallings Data and Computer Communications

CSC 535
Communication Networking I
Chapter 2
Layered Architectures
Dr. Cheer-Sun Yang
Protocol Stacks
Typically, communications is achieved via the
cooperation of software and hardware
Communication software and hardware are
grouped into manageable sets called layers
We use the term network architecture to refer
to a set of protocols that specify how every
layer is to function
 A reference model, called a protocol stack, is
used for understanding various networking
protocols and their relations
OSI (7 layers) vs. TCP/IP (5 layers)
2
Examples of LayeringWeb Browsing
A client/server model
A server process waits for incoming requests by
listening to a port.
A client process makes requests as desired.
The server program usually is executed in the
background and is referred to as a daemon. For
example, httpd refers to the server daemon for
HTTP
3
1.
2.
3.
4.
5.
6.
The user clicks on a link to indicate which document is to be
retrieved.
The browser must determine the address that contains the
document. It does this by sending a query to its local name
server.
Once the address is known the browser establishes a connection to the
specified machine, usually a TCP connection. In order for the
connection to be successful, the specified machine must be ready to
accept TCP connections.
The browser runs a client version of HTTP, which issues a request
specifying both the name of the document and the possible document
formats it can handle.
The machine that contains the requested document runs a server
version of HTTP. It reacts to the HTTP request by sending an
HTTP response which contains the desired document in the
appropriate format.
The TCP connection is then closed and the user may view
the document.
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
4
Figure 1.4 - Introduces topic
Request
HTTP
client
HTTP
server
Response
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
Figure 2.1
5
HTTP
server
HTTP
client
Ephemeral
Port 80
Port #
GET
80, #
TCP
TCP
#, 80
STATUS
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
Figure 2.2
6
The OSI Reference Model
A layer model defined by the ISO as an effort to
develop a seven-layer reference model for open
system interconnection (OSI).
Each layer performs a subset of the required
communication functions
Each layer relies on the next lower layer to
perform more primitive functions
Each layer provides services to the next higher
layer
Changes in one layer should not require
changes in other layers
7
How do layers work together?
A concept called data encapsulation is applied.
In each layer, the smallest unit of data is called
a Protocol Data Unit (PDU). Each PDU contains
a header, which contains protocol control
information, and usually user information in the
form of a service data unit (SDU).
“Conversations” occur between peer entities on
different hosts.
8
n-PDUs
n
n
entity
entity
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
Figure 2.3
9
n+1
entity
n+1
entity
n-SDU
n-SDU
n-SAP
n-SAP
n-SDU
H
n entity
n entity
H
n-SDU
n-PDU
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
10
Figure 2.4
OSI as Framework for
Standardization
11
Layer Specific Standards
12
(a)
n-PDU
(b)
Segmentation
Reassembly
n-SDU
n-SDU
n-PDU
n-PDU
n-PDU
Blocking
n-SDU
n-SDU
n-PDU
n-PDU
Unblocking
n-SDU
n-SDU
n-SDU
n-SDU
n-PDU
n-PDU
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
13
Figure 2.5
OSI Layers (1)
Physical
Physical interface between devices
Mechanical
Electrical
Functional
Procedural
Data Link
Means of activating, maintaining and deactivating a
reliable link
Error detection and control
Higher layers may assume error free transmission
14
OSI Layers (2)
Network
Transport of information
Higher layers do not need to know about underlying
technology
Not needed on direct links
Transport
Exchange of data between end systems
Error free
In sequence
No losses
No duplicates
Quality of service
15
OSI Layers (3)
Session
Control of dialogues between applications
Dialogue discipline
Grouping
Recovery
Presentation
Data formats and coding
Data compression
Encryption
Application
Means for applications to access OSI environment
16
Use of a Relay
17
Application A
Application B
Application
Layer
Application
Layer
Presentation
Layer
Presentation
Layer
Session
Layer
Session
Layer
Transport
Layer
Communication Network
Transport
Layer
Network
Layer
Network
Layer
Network
Layer
Network
Layer
Data Link
Layer
Data Link
Layer
Data Link
Layer
Data Link
Layer
Physical
Layer
Physical
Layer
Physical
Layer
Physical
Layer
Copyright 2000 McGraw-Hill
Electrical and/or
Optical Signals
Leon-Garcia
and Widjaja
Communication Networks
18
Figure 2.6
net 3
G
net 1
G
G
G
net 2
net 5
G
net 4
G
G = gateway/router
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
19
Figure 2.8
The OSI Environment
20
PS = packet switch
C
PS
C
C = computer
PS
PS
PS
C
C
C
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
21
Figure 2.7
Application A
data
Application
Layer
data
Transport
Layer
data
Network
Layer
Physical
Layer
data
dt
Presentation
Layer
ph
data
Session
Layer
Application
Layer
ah
data
Presentation
Layer
Data Link
Layer
Application B
sh
Session
Layer
th
Transport
Layer
Network
Layer
nh
data
bits
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
dh
Data Link
Layer
Physical
Layer
22
Figure 2.9
TCP/IP Protocol Suite
Dominant commercial protocol architecture
Specified and extensively used before OSI
Developed by research funded US Department
of Defense
Used by the Internet
23
Application
Layer
Transport
Layer
Application
Layer
Transport
Layer
Internet
Layer
Internet
Layer
Network
Interface
Network
Interface
(b)
(a)
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
24
Figure 2.10
TCP/IP Protocol Architecture(1)
Application Layer
Communication between processes or applications
End to end or transport layer (TCP/UDP/…)
End to end transfer of data
May include reliability mechanism (TCP)
Hides detail of underlying network
Internet Layer (IP)
Routing of data
25
TCP/IP Protocol Architecture(2)
Network Layer
Logical interface between end system and network
Physical Layer
Transmission medium
Signal rate and encoding
26
Machine B
Machine A
Application
Application
Transport
Router/Gateway
Transport
Internet
Internet
Internet
Network Interface
Network Interface
Network 1
Network Interface
Network 2
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
27
Figure 2.11
HTTP
SMTP
RTP
DNS
TCP
UDP
IP
Network
Network
Network
Interface 1
Interface 2
Interface 3
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
28
Figure 2.12
Some Protocols in TCP/IP Suite
29
(a)
(1,1)
(2,1)
(2,2)
router
s
Ethernet
PPP
(1,3) r
w
(1,2)
(b)
Server
HTTP
PC
HTTP
TCP
Router
IP
IP
IP
Net Interface
Net Interface
Net Interface
TCP
EthernetCopyright 2000 McGraw-Hill PPP
Leon-Garcia and Widjaja
Communication Networks
30
Figure 2.13
IP
Header
Header contains
source and destination
physical addresses;
network protocol type
Frame
Check
Sequence
Ethernet
Header
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
31
Figure 2.14
PDUs in TCP/IP
32
HTTP Request
Header contains source and
destination port numbers
Header contains source and
destination IP addresses;
transport protocol type
Header contains source
and destination physical
addresses; network
protocol type
Ethernet
Header
TCP
Header
IP
Header
Copyright 2000 McGraw-Hill
Leon-Garcia and Widjaja
Communication Networks
Frame
Check
Sequence
33
Figure 2.15
Required Reading
Sections 2.1, 2.2, 2.3
Section 2.4 is for next semester
Check RFC 2068: go to my homepage and click
on “browsing RFCs”
34