Ch04 Protocols
Ch04 Protocols
Protocols
Hi
TCP connection
req.
Hi
TCP connection
Got the reply.
time? Get http://gaia.cs.umass.edu/index.htm
2:00
<file>
time
❑ the following are categories of functions that form the basis of protocols
✓ encapsulation
✓ segmentation and reassembly
✓ connection control
✓ addressing
✓ multiplexing
✓ transmission services
a) Encapsulation
• the inclusion of control information to data is called encapsulation. Each frame
contains not only data but also control information
• such control information falls into three categories: address (sender/receiver),
error-detecting code and protocol control (information about protocol functions)
6
Ch03_Network_&_protocols Prep.By Werkneh E.
b) Segmentation (by the sender also called fragmentation) and reassembly (by the
receiver)
✓ a block of data for transmission is of some bounded size
✓ lower level protocols may need to break the data up into blocks of some
bounded size
✓ this process is called segmentation
✓ reasons for segmentation:
• the communication network may only accept blocks of data up to a certain
size
• error control may be more efficient with a smaller frame size; fewer bits
need to be retransmitted when a frame gets corrupted
• facilitates more equitable access to shared transmission facilities (for
example, without maximum block size, one station could monopolize a
7
multipoint medium)
7
Ch03_Network_&_protocols Prep.By Werkneh E.
c. Connection control
✓ two types of protocols (services)
connectionless service
• the packets are sent from one party to another with no need for
connection establishment or connection release
• the packets are not numbered, they may be delayed, lost, or arrive
out of sequence; there is no acknowledgement either
• UDP (User Datagram Protocol), one of the transport layer
protocols, is connectionless
• Application:
• Time sensitive traffic
8 Ch03_Network_&_protocols Prep.By Werkneh E.
8
❑connection-oriented service
✓ in connection-oriented data transfer, a logical association or connection is
established between the communicating computers (devices)
✓ long sustained session
✓ orderly and timely delivery of packets, e.g., FTP
✓ TCP (Transport Control Protocol) is connection-oriented
✓ three phases are involved
• connection establishment (agreement to exchange data)
• data transfer (data and control information exchanged)
• connection termination (termination request) - by any of the two parties
✓ the key characteristics of connection-oriented data transfer is that sequencing is
used
✓ each side sequentially numbers the frames that it sends to the other side
9
9
Ch03_Network_&_protocols Prep.By Werkneh E.
❑ because each side remembers that it is engaged in a logical connection, it can keep track of
both outgoing numbers, which it generates, and incoming numbers which are generated by
the other side
❑ sequencing supports three main functions
✓ ordered delivery: frames may not arrive in the order in which they were sent, because
they may traverse different paths
✓ flow control: a receiving station has to limit the amount or rate of data that is sent by a
transmitting station
✓ error control: error control is implemented as two separate functions; error detection
and retransmission
• if an error is detected, the receiver discards the frame
• upon failing to receive an acknowledgement to the frame in a specified reasonable
time, the sender retransmits the frame
• some protocols also employ error correction which enables the receiver not only to
detect errors but, in some cases, to correct them
13
13
▪Why layering?
• reduces complexity (one big problem to smaller ones)
• standardizes interfaces (between layers)
• facilitates modular engineering (different teams work on
different modules)
• assures interoperable technology
• accelerates evolution of networking technology
• simplifies teaching and learning
17
17 Ch03_Network_&_protocols Prep.By Werkn
Data Encapsulation and Decapsulation in OSI model
Each layer of OSI/TCP/IP add some control or management information on the data to be
sended. This is said to be Encapsulation.
At the receiver side reverse process is done i.e. removing the header and getting the original
message at the application layer-Decapsulation
Data created at 7th layer and goes to the next layer below. When layer accept data from it’s above
layer and passes it to next layer this is said to be “adjacent layer interaction”
The data at each OSI layer is said to be PDU (protocol data unit)-both the data and additional
information(header and trailer ) and we call the data at 7th layer as L7 PDU, at 6th layer as L6
PDU, etc.…
The data link layer is the only layer which add header and trailer
The physical layer don’t have both header and trailer
OSI Prep. by
18 Werkneh E.
Encapsulation and decapsulation using the OSI model
OSI Prep. by
19 Werkneh E.
The OSI Model (Encapsulation)
Application
Application Data Data Application
Header of
Application
Application Application
Layer
Layer AH Data Layer
Presentation Presentation
Layer
PH AH Data Layer
Session Session
Layer SH PH AH Data Layer
Transport Transport
Layer TH SH PH AH Data Layer
Physical Physical
Layer Bits Layer
Application
Application
Header User data
TCP
TCP Header Application data
IP TCP segment
Ethernet frame