SlideShare a Scribd company logo
Data Link Control 
1. Framing 
2. Flow and Error Control 
3. Protocols 
4. Noiseless Channels 
5. Noisy Channels 
6. HDLC 
7. Point-to-Point Protocol
Framing 
• Data link layer needs to pack bits into frames, so that each 
frame is distinguishable from another 
• Separate a message from one source to a destination, or 
from other messages to other destinations, by adding a 
sender address and a destination address
Fixed-size framing: there is no need for defining the 
boundaries of the frames. 
Variable-size framing 
Need a way to define the end of the frame and the 
beginning of the next 
Used in LANs 
Two Approaches 
Character-oriented approach and bit-oriented approach
Character-Oriented Protocols 
• Frame structure 
Header carries the source and destination address and some control 
information. 
Trailer carries error detection and correction bits 
To separate one from the next, an 8 bit flag is added at the beginnin 
g and end of each frame
• Any pattern used for flag can also be part of the information, i 
n that case the receiver can detect end of frame in middle, thin 
k it has reached at the end. To fix this problem byte stuffing is 
used. 
• In this a special byte called ESC (Escape character) is added b 
efore to the flag byte. Whenever the receiver encounters ESC 
byte, it is removed and the next byte is treated as data not as 
delimeter. 
• Again problem if there is ESC in data, then one ESC before 
data ESC.
• Byte stuffing: process of adding 1 extra byte whenever there is a flag 
or escape character in the text
Bit-Oriented Protocols 
• Frame structure 
• Bit stuffing: process of adding one extra 0 whenever five consecutive 
1s follow a 0 in the data
Flow and Error Control 
• Data link control = flow control + error control 
• Flow control refers to a set of procedures used to restrict the amount of 
data that the sender can send before waiting for acknowledgement 
• Error control in the data link layer is based on automatic repeat request 
(ARQ), which is the retransmission of data 
• All the protocols are unidirectional i.e. the data frames travel from source 
to destination node. Only ACK, NAK(Negative ACK) frames can flow in 
opposite direction.
Noiseless Channels: Simplest Protocol 
• Simplest protocol with no flow or error control. The receiver 
immediately handle the frame.
Simplest Protocol 
• Sender-site algorithm 
• Receiver-site algorithm
Stop-and-Wait Protocol 
• Simple tokens of ACK and flow control added
Stop-and-Wait Protocol 
• Sender-site algorithm 
• Receiver-site algorithm
Stop-and-Wait Protocol: Example
Noisy Channels: Stop-and-Wait ARQ 
• Stop-and-wait Automatic Repeat Request (ARQ) 
• Error correction in Stop-and-Wait ARQ is done by keeping 
a copy of the sent frame and retransmitting of the frame 
when the timer expires 
• In Stop-and-Wait ARQ, we use sequence numbers to 
number the frames. The sequence numbers are based on 
modulo-2 arithmetic 
• Acknowledgment number always announces in modulo-2 
arithmetic the sequence number of the next frame expected.
Stop-and-Wait ARQ
Stop-and-Wait ARQ 
• Sender-site algorithm
Stop-and-Wait ARQ 
• Receiver-site algorithm
Stop-and-Wait ARQ: Example
Go-Back-N ARQ 
• Pipelining : A task is often begun before the previous task 
has ended. To improve the efficiency of transmission 
multiple frames must be in trasition while waiting for 
acknowledgement 
• In the Go-Back-N Protocol, the sequence numbers are in 
sequence using modulo 2m, where m is the size of the 
sequence number field in bits. If m= 4, then sequence 
numbers will be from 0 to 15. after that the sequence will 
be repeated. 
• In this protocol the abstract concept of sliding window is 
used, that defines the range of sequence numbers that is the 
concern of sender and the receiver.
The range which is the concern of the sender is called the send 
sliding window. 
The range which is the concern of the sender is called the receive 
sliding window 
The send window is an abstract concept defining an imaginary 
box of size 2m − 1 with three variables: 
Sf, Sn, and Ssize 
The send window can slide one or more slots when a valid 
acknowledgment arrives. 
The send window divides the possible sequence numbers in four 
regions. 
The send window can slide one or more slots when a valid ackno 
wledgement arrives.
• The receive window is an abstract concept defining an 
imaginary box of size 1 with one single variable Rn. The 
window slides when a correct frame has arrived; sliding 
occurs one slot at a time.
• Sliding windows, Timers, ACK, Resending a frame
Go-Back-N ARQ: Send Window Size 
• In Go-Back-N ARQ, the size of the send window must be less than 2m; 
the size of the receiver window is always 1 
• Stop-and-Wait ARQ is a special case of Go-Back-N ARQ in which the 
size of the send window is 1
Go-Back-N ARQ: Sender Algorithm
Go-Back-N ARQ: Receiver Algorithm
Go-Back-N ARQ: Example 1
Go-Back-N ARQ: Example 2
Selective Repeat ARQ 
Go back N ARQ simplifies the process at the receiver site. The 
receiver keeps track of only one variable and there is no need to 
buffer out of order frames, they are simply discarded. 
However this protocol is very inefficient for a noisy link, where a 
frame has higher probability of damage, which means resending of 
the multiple frames. This resending uses up the bandwidth and slows 
down the transmission. 
For noisy links there is another mechanism that does not resend N 
frames when just one frame is damaged, only the damaged frame is 
resent. This mechanism is called Selective ARQ. It is more efficient 
for noisy links, but the processing at the receiver side is more 
complex.
Selective Repeat ARQ 
• Sender window size 
The size of the send window is much smaller i.e 2m-1 
If m =4, the sequence numbers will be from 0 to 15, but the size of 
window is just 8.
• Receive window size 
The size of the receive window is the same as the send 
window. The colored frames are the frames received out of 
order and are waiting for their neighbors.
Selective Repeat ARQ
Selective Repeat ARQ: Window Size 
• The size of the sender and receiver window must be at most one-half 
of 2m
Selective Repeat ARQ: Sender-Site Algorithm
Selective Repeat ARQ: Receiver-Site Algorithm
Selective Repeat ARQ: Example
Piggybacking 
• To improve the efficiency of the bidirectional protocols 
• Piggybacking in Go-Back-N ARQ
HDLC 
• High-level Data Link Control 
• Two common transfer mode: normal response mode (NRM) and 
asynchronous balanced mode (ABM)
HDLC: Frames 
• I(information)-frames, S(supervisory)-frames, U(unnumbered frame)- 
frames 
• Flag field: 01111110 to identify both the beginning and the end of a 
frame and serve as synchronization pattern for receiver 
• FCS field: 2- or 4-byte ITU-T CRC for error detection
HDLC: Frames 
• Control Field: 1- or 2-byte segment of the frame used for flow and 
error control 
• Determine the type of frame and define its functionality 
• Control field for I-frame: P/F (poll/final bit for primary/secondary)
HDLC: Frames 
• Control field for S-frame 
• Receive ready (RR), Receive not ready (RNR), Reject (REJ) Selective 
reject (SREJ)
HDLC: Frames 
• Control field for U-frame
HDLC: Example 1 
• Connection and disconnection
HDLC: Example 2 
• Piggybacking without error
HDLC: Example 3 
• Piggybacking with error
HDLC: Bit Stuffing and Unstuffing
Point-to-Point Protocol: PPP 
• One of the most common protocols for point-to-point access 
• Many Internet users who need to connect their home computer to the 
server of an Internet service provider use PPP 
• A point-to-point link protocol is required to control and manage the 
transfer of data 
• PPP defines/provides 
– the format of the frame to be exchanged between devices 
– how two devices negotiate the establishment of the link and the exchange of data 
– how network layer data are encapsulated in the data link frame 
– how two devices can authenticate each other 
– multiple network layer services 
– connection over multiple links 
– Network address configuration 
• But, several services are missing for simplicity 
– no flow control, simple error control (detection and discard), no sophisticate 
addressing for multipoint configuration
PPP Frame 
• Flag: 01111110 the same as HDLC, but it treated as a byte because of 
PPP is a byte-oriented protocol 
• Address: 11111111 (broadcast address) 
• Control: No need because PPP has no flow control and limited error 
control 
• PPP is a byte-oriented protocol using byte stuffing with the escape byte 
01111101
PPP: Transition States
PPP: Multiplexing 
• PPP uses another set of other protocols to establish the link, authenticate 
the parties, and carry the network layer data 
• Three sets of protocols defined for powerful PPP: LCP, two APs, several 
NCPs
LCP: Encapsulated in a Frame
LCP: Common Options 
• Options are inserted in the information field of the 
configuration packets
Authentication 
• Authentication means validating the identity of a user who 
needs to access 
• PPP is designed for use over dial-up links 
 User authentication is necessary 
• PPP has two protocols for authentication 
– Password Authentication Protocol (PAP) 
– Challenge Handshake Authentication Protocol 
(CHAP)
Password Authentication Protocol (PAP)
Challenge Handshake Authentication 
Protocol (CHAP) 
• Three-way hand-shaking authentication protocol with greater security 
than PAP
Network Control Protocol: NCP 
• PPP is a multiple-network layer protocol. 
• It can carry a network data packet from protocols defined by the 
Internet, OSI, Xerox, DECnet, AppleTalk, Novel 
• IPCP (IP Control Protocol) 
– Configures the link used to carry IP packets in the Internet
IPCP Packet 
IP Datagram in a PPP frame
Multiple PPP
Example (1)
Example (2)

More Related Content

What's hot

Chapter 4 data link layer
Chapter 4 data link layerChapter 4 data link layer
Chapter 4 data link layer
Naiyan Noor
 
Flow Control
Flow ControlFlow Control
Flow Control
selvakumar_b1985
 
Data link layer elementry protocols
Data link layer elementry protocolsData link layer elementry protocols
Data link layer elementry protocols
sabitha sairam
 
Data link control
Data link controlData link control
Data link control
Iffat Anjum
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layermekind
 
3a data link layer
3a data link layer 3a data link layer
3a data link layer
kavish dani
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
Faisal Mehmood
 
Protocols of noiseless
Protocols of noiselessProtocols of noiseless
Protocols of noiseless
Basit Hussain
 
Framing
FramingFraming
Data Link Control
Data Link ControlData Link Control
Data Link Control
Sonia Pahuja
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols
BE Smârt
 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocol
Shehara Abeythunga
 
Module15: Sliding Windows Protocol and Error Control
Module15: Sliding Windows Protocol and Error Control Module15: Sliding Windows Protocol and Error Control
Module15: Sliding Windows Protocol and Error Control
gondwe Ben
 
Importance of sliding window protocol
Importance of sliding window protocolImportance of sliding window protocol
Importance of sliding window protocol
eSAT Journals
 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocolRishu Seth
 
3a data link layer continued
3a data link layer continued3a data link layer continued
3a data link layer continuedkavish dani
 

What's hot (20)

Chapter 4 data link layer
Chapter 4 data link layerChapter 4 data link layer
Chapter 4 data link layer
 
6 data linkcontrol
6  data linkcontrol6  data linkcontrol
6 data linkcontrol
 
Mac sub layer
Mac sub layerMac sub layer
Mac sub layer
 
Flow Control
Flow ControlFlow Control
Flow Control
 
Data link layer elementry protocols
Data link layer elementry protocolsData link layer elementry protocols
Data link layer elementry protocols
 
Data link control
Data link controlData link control
Data link control
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
 
3a data link layer
3a data link layer 3a data link layer
3a data link layer
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
Protocols of noiseless
Protocols of noiselessProtocols of noiseless
Protocols of noiseless
 
Hdlc
HdlcHdlc
Hdlc
 
Framing
FramingFraming
Framing
 
Data Link Control
Data Link ControlData Link Control
Data Link Control
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols
 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocol
 
Ch11
Ch11Ch11
Ch11
 
Module15: Sliding Windows Protocol and Error Control
Module15: Sliding Windows Protocol and Error Control Module15: Sliding Windows Protocol and Error Control
Module15: Sliding Windows Protocol and Error Control
 
Importance of sliding window protocol
Importance of sliding window protocolImportance of sliding window protocol
Importance of sliding window protocol
 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocol
 
3a data link layer continued
3a data link layer continued3a data link layer continued
3a data link layer continued
 

Viewers also liked

Data Link Layer
Data Link LayerData Link Layer
Data Link Layer
Kamal Acharya
 
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin   chp-3 - data-link layer- 2011 batchJaimin   chp-3 - data-link layer- 2011 batch
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin Jani
 
IBPS CWE Specialist IT Officer – Salary, Job, Work
IBPS CWE Specialist IT Officer – Salary, Job, WorkIBPS CWE Specialist IT Officer – Salary, Job, Work
IBPS CWE Specialist IT Officer – Salary, Job, Work
sakshi
 
IBPS SO Aspirants Queries
IBPS SO Aspirants QueriesIBPS SO Aspirants Queries
IBPS SO Aspirants Queries
sakshi
 
IBPS Specialist Officers Exam 2014 - Interviewkiller.com
IBPS Specialist Officers Exam 2014 - Interviewkiller.comIBPS Specialist Officers Exam 2014 - Interviewkiller.com
IBPS Specialist Officers Exam 2014 - Interviewkiller.com
Vickram H
 
5 data link-lan.key
5 data link-lan.key5 data link-lan.key
5 data link-lan.key
Olivier Bonaventure
 
Framing Protocols
Framing ProtocolsFraming Protocols
Framing Protocols
selvakumar_b1985
 
Switching Tech And Data Link
Switching Tech And Data LinkSwitching Tech And Data Link
Switching Tech And Data Linkanishgoel
 
Basic concept of computer network
Basic concept of computer networkBasic concept of computer network
Basic concept of computer network
SaahilIT
 
MCQ Bank for Computer Fundamantals from mcqSets.com
MCQ Bank for Computer Fundamantals from mcqSets.comMCQ Bank for Computer Fundamantals from mcqSets.com
MCQ Bank for Computer Fundamantals from mcqSets.com
Suresh Khanal
 
Parity check(Error Detecting Codes)
Parity check(Error Detecting Codes)Parity check(Error Detecting Codes)
Parity check(Error Detecting Codes)
Imesha Perera
 
Data link control protocol(2)
Data link control protocol(2)Data link control protocol(2)
Data link control protocol(2)
Jeffrey Des Binwag
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Controltameemyousaf
 
Data link control protocol(1)
Data link control protocol(1)Data link control protocol(1)
Data link control protocol(1)
Jeffrey Des Binwag
 
Multiple choice quiz for introductions to computers
Multiple choice quiz for introductions to computersMultiple choice quiz for introductions to computers
Multiple choice quiz for introductions to computersKate Bailey
 
Data link layer
Data link layer Data link layer
Data link layer
Mukesh Chinta
 
Protocol Ppt[1]
Protocol Ppt[1]Protocol Ppt[1]
Protocol Ppt[1]anil933
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
Siddique Ibrahim
 

Viewers also liked (20)

Data Link Layer
Data Link LayerData Link Layer
Data Link Layer
 
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin   chp-3 - data-link layer- 2011 batchJaimin   chp-3 - data-link layer- 2011 batch
Jaimin chp-3 - data-link layer- 2011 batch
 
Stop And Wait ARQ
Stop And Wait ARQStop And Wait ARQ
Stop And Wait ARQ
 
Ch 11
Ch 11Ch 11
Ch 11
 
IBPS CWE Specialist IT Officer – Salary, Job, Work
IBPS CWE Specialist IT Officer – Salary, Job, WorkIBPS CWE Specialist IT Officer – Salary, Job, Work
IBPS CWE Specialist IT Officer – Salary, Job, Work
 
IBPS SO Aspirants Queries
IBPS SO Aspirants QueriesIBPS SO Aspirants Queries
IBPS SO Aspirants Queries
 
IBPS Specialist Officers Exam 2014 - Interviewkiller.com
IBPS Specialist Officers Exam 2014 - Interviewkiller.comIBPS Specialist Officers Exam 2014 - Interviewkiller.com
IBPS Specialist Officers Exam 2014 - Interviewkiller.com
 
5 data link-lan.key
5 data link-lan.key5 data link-lan.key
5 data link-lan.key
 
Framing Protocols
Framing ProtocolsFraming Protocols
Framing Protocols
 
Switching Tech And Data Link
Switching Tech And Data LinkSwitching Tech And Data Link
Switching Tech And Data Link
 
Basic concept of computer network
Basic concept of computer networkBasic concept of computer network
Basic concept of computer network
 
MCQ Bank for Computer Fundamantals from mcqSets.com
MCQ Bank for Computer Fundamantals from mcqSets.comMCQ Bank for Computer Fundamantals from mcqSets.com
MCQ Bank for Computer Fundamantals from mcqSets.com
 
Parity check(Error Detecting Codes)
Parity check(Error Detecting Codes)Parity check(Error Detecting Codes)
Parity check(Error Detecting Codes)
 
Data link control protocol(2)
Data link control protocol(2)Data link control protocol(2)
Data link control protocol(2)
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
 
Data link control protocol(1)
Data link control protocol(1)Data link control protocol(1)
Data link control protocol(1)
 
Multiple choice quiz for introductions to computers
Multiple choice quiz for introductions to computersMultiple choice quiz for introductions to computers
Multiple choice quiz for introductions to computers
 
Data link layer
Data link layer Data link layer
Data link layer
 
Protocol Ppt[1]
Protocol Ppt[1]Protocol Ppt[1]
Protocol Ppt[1]
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
 

Similar to New framing-protocols

Computer network transport layer MODUL 2.pptx
Computer network transport layer MODUL 2.pptxComputer network transport layer MODUL 2.pptx
Computer network transport layer MODUL 2.pptx
pallavir61
 
Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit iv
JAIGANESH SEKAR
 
Different protocols for data communication networks
Different protocols for data communication networks Different protocols for data communication networks
Different protocols for data communication networks
Nt Arvind
 
Unit-4 (1).pptx
Unit-4 (1).pptxUnit-4 (1).pptx
Unit-4 (1).pptx
poonamsngr
 
Nigga.pdf
Nigga.pdfNigga.pdf
Nigga.pdf
pdegree76
 
Transport layer
Transport layerTransport layer
Transport layer
arvind pandey
 
Module 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdfModule 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdf
Shivakrishnan18
 
09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt
ShaliniKumariGupta1
 
Transport layer.pptx
Transport layer.pptxTransport layer.pptx
Transport layer.pptx
MohammedAnas871930
 
Datalink control(framing,protocols)
Datalink control(framing,protocols)Datalink control(framing,protocols)
Datalink control(framing,protocols)
Hira Awan
 
Transmission Control Protocol_ Computer Networks
Transmission Control Protocol_ Computer NetworksTransmission Control Protocol_ Computer Networks
Transmission Control Protocol_ Computer Networks
Manimaran A
 
DataLinkControl.ppt
DataLinkControl.pptDataLinkControl.ppt
DataLinkControl.ppt
MaddalaSeshu
 
High level data link control and point to point protocol
High level data link control and point to point protocolHigh level data link control and point to point protocol
High level data link control and point to point protocol
sandhyakiran10
 
Transport Layer In Computer Network
Transport Layer In Computer NetworkTransport Layer In Computer Network
Transport Layer In Computer Network
Destro Destro
 
Unit 2 ppt 3.ppt
Unit 2 ppt 3.pptUnit 2 ppt 3.ppt
Unit 2 ppt 3.ppt
Selvakanmani S
 
DLL Protocol.pptx
DLL Protocol.pptxDLL Protocol.pptx
DLL Protocol.pptx
ubaidullah75790
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by roma
boraroma
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layer
roma bora
 
Computer networks transport layer
Computer networks  transport layerComputer networks  transport layer
Computer networks transport layer
jamunaashok
 

Similar to New framing-protocols (20)

Computer network transport layer MODUL 2.pptx
Computer network transport layer MODUL 2.pptxComputer network transport layer MODUL 2.pptx
Computer network transport layer MODUL 2.pptx
 
Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit iv
 
Different protocols for data communication networks
Different protocols for data communication networks Different protocols for data communication networks
Different protocols for data communication networks
 
Unit-4 (1).pptx
Unit-4 (1).pptxUnit-4 (1).pptx
Unit-4 (1).pptx
 
Nigga.pdf
Nigga.pdfNigga.pdf
Nigga.pdf
 
Transport layer
Transport layerTransport layer
Transport layer
 
Module 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdfModule 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdf
 
09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt
 
Transport layer.pptx
Transport layer.pptxTransport layer.pptx
Transport layer.pptx
 
Datalink control(framing,protocols)
Datalink control(framing,protocols)Datalink control(framing,protocols)
Datalink control(framing,protocols)
 
Ppp
PppPpp
Ppp
 
Transmission Control Protocol_ Computer Networks
Transmission Control Protocol_ Computer NetworksTransmission Control Protocol_ Computer Networks
Transmission Control Protocol_ Computer Networks
 
DataLinkControl.ppt
DataLinkControl.pptDataLinkControl.ppt
DataLinkControl.ppt
 
High level data link control and point to point protocol
High level data link control and point to point protocolHigh level data link control and point to point protocol
High level data link control and point to point protocol
 
Transport Layer In Computer Network
Transport Layer In Computer NetworkTransport Layer In Computer Network
Transport Layer In Computer Network
 
Unit 2 ppt 3.ppt
Unit 2 ppt 3.pptUnit 2 ppt 3.ppt
Unit 2 ppt 3.ppt
 
DLL Protocol.pptx
DLL Protocol.pptxDLL Protocol.pptx
DLL Protocol.pptx
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by roma
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layer
 
Computer networks transport layer
Computer networks  transport layerComputer networks  transport layer
Computer networks transport layer
 

More from Nitesh Singh

Risk taking and emotions
Risk taking and emotionsRisk taking and emotions
Risk taking and emotionsNitesh Singh
 
Project report RAILWAY TICKET RESERVATION SYSTEM SAD
Project report RAILWAY TICKET RESERVATION SYSTEM SADProject report RAILWAY TICKET RESERVATION SYSTEM SAD
Project report RAILWAY TICKET RESERVATION SYSTEM SAD
Nitesh Singh
 
The real comedy behind comedy
The real comedy behind comedyThe real comedy behind comedy
The real comedy behind comedy
Nitesh Singh
 
Project report Rs Dry celaners
Project report Rs Dry celaners Project report Rs Dry celaners
Project report Rs Dry celaners Nitesh Singh
 
Routing protocols-network-layer
Routing protocols-network-layerRouting protocols-network-layer
Routing protocols-network-layerNitesh Singh
 
Ta 104-topology (1)
Ta 104-topology (1)Ta 104-topology (1)
Ta 104-topology (1)Nitesh Singh
 

More from Nitesh Singh (20)

Risk taking and emotions
Risk taking and emotionsRisk taking and emotions
Risk taking and emotions
 
Project report RAILWAY TICKET RESERVATION SYSTEM SAD
Project report RAILWAY TICKET RESERVATION SYSTEM SADProject report RAILWAY TICKET RESERVATION SYSTEM SAD
Project report RAILWAY TICKET RESERVATION SYSTEM SAD
 
The real comedy behind comedy
The real comedy behind comedyThe real comedy behind comedy
The real comedy behind comedy
 
Project report Rs Dry celaners
Project report Rs Dry celaners Project report Rs Dry celaners
Project report Rs Dry celaners
 
BIG DATA ANALYSIS
BIG DATA ANALYSISBIG DATA ANALYSIS
BIG DATA ANALYSIS
 
Udp vs-tcp
Udp vs-tcpUdp vs-tcp
Udp vs-tcp
 
Routing protocols-network-layer
Routing protocols-network-layerRouting protocols-network-layer
Routing protocols-network-layer
 
Routers vs-switch
Routers vs-switchRouters vs-switch
Routers vs-switch
 
New udp
New udpNew udp
New udp
 
I pv4 format
I pv4 formatI pv4 format
I pv4 format
 
I pv4 addressing
I pv4 addressingI pv4 addressing
I pv4 addressing
 
Hub vs-switch
Hub vs-switchHub vs-switch
Hub vs-switch
 
Ftp
FtpFtp
Ftp
 
Email ftp
Email ftpEmail ftp
Email ftp
 
Www and http
Www and httpWww and http
Www and http
 
Transmission main
Transmission mainTransmission main
Transmission main
 
Ta 104-topology
Ta 104-topologyTa 104-topology
Ta 104-topology
 
Ta 104-topology (1)
Ta 104-topology (1)Ta 104-topology (1)
Ta 104-topology (1)
 
Ta 104-tcp
Ta 104-tcpTa 104-tcp
Ta 104-tcp
 
Ta 104-media-3
Ta 104-media-3Ta 104-media-3
Ta 104-media-3
 

New framing-protocols

  • 1. Data Link Control 1. Framing 2. Flow and Error Control 3. Protocols 4. Noiseless Channels 5. Noisy Channels 6. HDLC 7. Point-to-Point Protocol
  • 2. Framing • Data link layer needs to pack bits into frames, so that each frame is distinguishable from another • Separate a message from one source to a destination, or from other messages to other destinations, by adding a sender address and a destination address
  • 3. Fixed-size framing: there is no need for defining the boundaries of the frames. Variable-size framing Need a way to define the end of the frame and the beginning of the next Used in LANs Two Approaches Character-oriented approach and bit-oriented approach
  • 4. Character-Oriented Protocols • Frame structure Header carries the source and destination address and some control information. Trailer carries error detection and correction bits To separate one from the next, an 8 bit flag is added at the beginnin g and end of each frame
  • 5. • Any pattern used for flag can also be part of the information, i n that case the receiver can detect end of frame in middle, thin k it has reached at the end. To fix this problem byte stuffing is used. • In this a special byte called ESC (Escape character) is added b efore to the flag byte. Whenever the receiver encounters ESC byte, it is removed and the next byte is treated as data not as delimeter. • Again problem if there is ESC in data, then one ESC before data ESC.
  • 6. • Byte stuffing: process of adding 1 extra byte whenever there is a flag or escape character in the text
  • 7. Bit-Oriented Protocols • Frame structure • Bit stuffing: process of adding one extra 0 whenever five consecutive 1s follow a 0 in the data
  • 8. Flow and Error Control • Data link control = flow control + error control • Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgement • Error control in the data link layer is based on automatic repeat request (ARQ), which is the retransmission of data • All the protocols are unidirectional i.e. the data frames travel from source to destination node. Only ACK, NAK(Negative ACK) frames can flow in opposite direction.
  • 9. Noiseless Channels: Simplest Protocol • Simplest protocol with no flow or error control. The receiver immediately handle the frame.
  • 10. Simplest Protocol • Sender-site algorithm • Receiver-site algorithm
  • 11. Stop-and-Wait Protocol • Simple tokens of ACK and flow control added
  • 12. Stop-and-Wait Protocol • Sender-site algorithm • Receiver-site algorithm
  • 14. Noisy Channels: Stop-and-Wait ARQ • Stop-and-wait Automatic Repeat Request (ARQ) • Error correction in Stop-and-Wait ARQ is done by keeping a copy of the sent frame and retransmitting of the frame when the timer expires • In Stop-and-Wait ARQ, we use sequence numbers to number the frames. The sequence numbers are based on modulo-2 arithmetic • Acknowledgment number always announces in modulo-2 arithmetic the sequence number of the next frame expected.
  • 16. Stop-and-Wait ARQ • Sender-site algorithm
  • 17. Stop-and-Wait ARQ • Receiver-site algorithm
  • 19. Go-Back-N ARQ • Pipelining : A task is often begun before the previous task has ended. To improve the efficiency of transmission multiple frames must be in trasition while waiting for acknowledgement • In the Go-Back-N Protocol, the sequence numbers are in sequence using modulo 2m, where m is the size of the sequence number field in bits. If m= 4, then sequence numbers will be from 0 to 15. after that the sequence will be repeated. • In this protocol the abstract concept of sliding window is used, that defines the range of sequence numbers that is the concern of sender and the receiver.
  • 20. The range which is the concern of the sender is called the send sliding window. The range which is the concern of the sender is called the receive sliding window The send window is an abstract concept defining an imaginary box of size 2m − 1 with three variables: Sf, Sn, and Ssize The send window can slide one or more slots when a valid acknowledgment arrives. The send window divides the possible sequence numbers in four regions. The send window can slide one or more slots when a valid ackno wledgement arrives.
  • 21.
  • 22. • The receive window is an abstract concept defining an imaginary box of size 1 with one single variable Rn. The window slides when a correct frame has arrived; sliding occurs one slot at a time.
  • 23. • Sliding windows, Timers, ACK, Resending a frame
  • 24. Go-Back-N ARQ: Send Window Size • In Go-Back-N ARQ, the size of the send window must be less than 2m; the size of the receiver window is always 1 • Stop-and-Wait ARQ is a special case of Go-Back-N ARQ in which the size of the send window is 1
  • 26.
  • 30. Selective Repeat ARQ Go back N ARQ simplifies the process at the receiver site. The receiver keeps track of only one variable and there is no need to buffer out of order frames, they are simply discarded. However this protocol is very inefficient for a noisy link, where a frame has higher probability of damage, which means resending of the multiple frames. This resending uses up the bandwidth and slows down the transmission. For noisy links there is another mechanism that does not resend N frames when just one frame is damaged, only the damaged frame is resent. This mechanism is called Selective ARQ. It is more efficient for noisy links, but the processing at the receiver side is more complex.
  • 31. Selective Repeat ARQ • Sender window size The size of the send window is much smaller i.e 2m-1 If m =4, the sequence numbers will be from 0 to 15, but the size of window is just 8.
  • 32. • Receive window size The size of the receive window is the same as the send window. The colored frames are the frames received out of order and are waiting for their neighbors.
  • 34. Selective Repeat ARQ: Window Size • The size of the sender and receiver window must be at most one-half of 2m
  • 35. Selective Repeat ARQ: Sender-Site Algorithm
  • 36.
  • 37. Selective Repeat ARQ: Receiver-Site Algorithm
  • 38.
  • 40. Piggybacking • To improve the efficiency of the bidirectional protocols • Piggybacking in Go-Back-N ARQ
  • 41. HDLC • High-level Data Link Control • Two common transfer mode: normal response mode (NRM) and asynchronous balanced mode (ABM)
  • 42. HDLC: Frames • I(information)-frames, S(supervisory)-frames, U(unnumbered frame)- frames • Flag field: 01111110 to identify both the beginning and the end of a frame and serve as synchronization pattern for receiver • FCS field: 2- or 4-byte ITU-T CRC for error detection
  • 43. HDLC: Frames • Control Field: 1- or 2-byte segment of the frame used for flow and error control • Determine the type of frame and define its functionality • Control field for I-frame: P/F (poll/final bit for primary/secondary)
  • 44. HDLC: Frames • Control field for S-frame • Receive ready (RR), Receive not ready (RNR), Reject (REJ) Selective reject (SREJ)
  • 45. HDLC: Frames • Control field for U-frame
  • 46. HDLC: Example 1 • Connection and disconnection
  • 47. HDLC: Example 2 • Piggybacking without error
  • 48. HDLC: Example 3 • Piggybacking with error
  • 49. HDLC: Bit Stuffing and Unstuffing
  • 50. Point-to-Point Protocol: PPP • One of the most common protocols for point-to-point access • Many Internet users who need to connect their home computer to the server of an Internet service provider use PPP • A point-to-point link protocol is required to control and manage the transfer of data • PPP defines/provides – the format of the frame to be exchanged between devices – how two devices negotiate the establishment of the link and the exchange of data – how network layer data are encapsulated in the data link frame – how two devices can authenticate each other – multiple network layer services – connection over multiple links – Network address configuration • But, several services are missing for simplicity – no flow control, simple error control (detection and discard), no sophisticate addressing for multipoint configuration
  • 51. PPP Frame • Flag: 01111110 the same as HDLC, but it treated as a byte because of PPP is a byte-oriented protocol • Address: 11111111 (broadcast address) • Control: No need because PPP has no flow control and limited error control • PPP is a byte-oriented protocol using byte stuffing with the escape byte 01111101
  • 53. PPP: Multiplexing • PPP uses another set of other protocols to establish the link, authenticate the parties, and carry the network layer data • Three sets of protocols defined for powerful PPP: LCP, two APs, several NCPs
  • 55. LCP: Common Options • Options are inserted in the information field of the configuration packets
  • 56. Authentication • Authentication means validating the identity of a user who needs to access • PPP is designed for use over dial-up links  User authentication is necessary • PPP has two protocols for authentication – Password Authentication Protocol (PAP) – Challenge Handshake Authentication Protocol (CHAP)
  • 58. Challenge Handshake Authentication Protocol (CHAP) • Three-way hand-shaking authentication protocol with greater security than PAP
  • 59. Network Control Protocol: NCP • PPP is a multiple-network layer protocol. • It can carry a network data packet from protocols defined by the Internet, OSI, Xerox, DECnet, AppleTalk, Novel • IPCP (IP Control Protocol) – Configures the link used to carry IP packets in the Internet
  • 60. IPCP Packet IP Datagram in a PPP frame