You are on page 1of 56

UNIT 3:

1. Peer to peer protocol


2. ARQ protocol and Stop & Wait Protocol
3. Go back N Protocol
4. Selective Repeat Protocol
5. Sliding Window, Flow Control and time
recovery in Synchronous Service.
6. Data link control , HDLC , PPP
Peer to peer Protocol
• In a P2P network, computing devices use software to connect with
each other over a private network, such as a home local area
network (LAN) or a public network, such as the Internet. This direct
connection allows each device to share files without requiring the
assistance of a remote server.
PROTOCOLS
• To implement flow control and error control we have different
protocols. These protocols are divided into different categories.
• Protocols for Noiseless channel
A noiseless channel is an ideal channel in which no frames are lost ,duplicated or
corrupted. There are two protocols for noiseless channels
a. Simplest
b. Stop-and-wait protocol

• Protocols for Noisy Channel


• A timeout counter is maintained by the sender, which is started
when a frame is sent.
• If the sender receives acknowledgment of the sent frame within
time, the sender is confirmed about successful delivery of the
frame. It then transmits the next frame in queue.
• If the sender does not receive the acknowledgment within time,
the sender assumes that either the frame or its acknowledgment is
lost in transit. It then retransmits the frame.
• If the sender receives a negative acknowledgment, the sender
retransmits the frame.
ALGORITHM AT THE SENDER SIDE

1. Get data from network layer


2. Make frame in Data link layer & Store copy of the frame
3. Send frame to physical layer
4. start timer and wait for the Ack frame from the receiver.
5. Receive Ack frame from physical layer.
6. If Ack is received before timer expires success or else retransmit the
frame.
ALGORITHM AT THE RECEIVER SIDE

1. Receive frame from physical layer


2. Extract data in Data Link Layer
3. Deliver data to Network Layer
4. Send Ack frame to sender.
1. Sender A transmit frame 0 and starts timer and stores the copy of
the frame.
2. Receiver B receives frame0 without error. Extract data and sends
that data to its upper layer.
3. Receives B sends an ack frame to sender A
4. Before time out sender A receives Ack so transmission is success.
5. Sender A transmit frame 1 and starts timer and stores the copy of
the frame.
6. Receiver B receives frame1 without error. Extract data and sends
that data to its upper layer.
7. Receives B sends an ack frame to sender A
8. Ack frame lost
9. At sender A timeout occurs and it retransmit the frame1.
10. Receiver B receives frame1 without error. Extract data and sends
that data to its upper layer.
Go-Back-N ARQ
• The sender has buffers called sending window.
• The sender sends multiple frames based upon the sending-window
size, without receiving the acknowledgment of the previous ones.
• The receiver receives frames one by one. It keeps track of incoming
frame’s sequence number and sends the corresponding
acknowledgment frames.
• After the sender has sent all the frames in window, it checks up to
what sequence number it has received positive acknowledgment.
• If the sender has received positive acknowledgment for all the
frames, it sends next set of frames.
• If sender receives NACK or has not receive any ACK for a particular
frame, it retransmits all the frames after which it does not receive any
positive ACK
Selective Repeat ARQ
• Both the sender and the receiver have buffers called sending window and
receiving window respectively.
• The sender sends multiple frames based upon the sending-window size,
without receiving the acknowledgment of the previous ones.
• The receiver also receives multiple frames within the receiving window
size.
• The receiver keeps track of incoming frame’s sequence numbers, buffers
the frames in memory.
• It sends ACK for all successfully received frames and sends NACK for only
frames which are missing or damaged.
• The sender in this case, sends only packet for which NACK is received
Piggybacking
• A technique called Piggybacking is used to improve the efficiency of
bidirectional protocol.
• When a frame is carrying data from A to B it can also carry together
control information about the frame(Ack frame) arrived from B to A.
• When a frame is carrying data from B to A it can carry control
information about the frames arrived from A. Along with data Ack is
also transmitted in one frame.
• Ie. Frame = data + ACK
• This method increases the overall efficiency of transmission.
THE DATA LINK CONTROL
• The main purpose of the data link layer is to enable the transfer of
information.
• Various services provided by the data link layer are
1. Framing: The bits that are transmitted needs to be packed and transmitted
as frames. The boundary of each frame should be defined.
2. Error Control: Data link layer should provide error control to ensure reliable
transmission.
3. Flow control :Data link layer should provide flow control to prevent
transmitter from the receiver from drowning with frames.
4. Addressing :Data link layer should specify address to carry information from
multiple users.
Framing
• It is a function of data link layer which involves identifying the
beginning and end of a block of information.
• Frames can be fixed or variable size.
1. Fixed Size framing is need for defining the boundaries of the frames.eg:ATM
network.
2. In variable size framing we have to define the end of the frame and
beginning of the next frame . Hence variable size frame need more
information to indicate start and end of the frame.
There are two approaches used to indicate boundaries.

1. Character Oriented Approach


2. Bit Oriented Approach
Character Oriented Approach
• In a character oriented approach data to be carried are 8 bit
characters from the coding system.
• The header containing source and destination , trailer containing
error detection and correction bits are also multiples of 8 bits.
• To separate one frame from another a flag containing protocol
dependent special characters are added at the beginning and end of
the frame.
Byte Stuffing
• When the receiver encounters this same flag pattern in the middle of
the data it thinks it has reached the end of the frame ,to fix this
problem a byte stuffing strategy is used.
• In this method a special byte is called escape character added to the
data section of the frame when there is a character with the same
pattern as the flag when ever the receiver encounters the escape
characters, it removes from the data section and treats the next
character as data.
Bit Oriented Protocols
• In a bit oriented protocol the data section of a frame is a sequence of
bits to be interpreted by the upper layer as text ,graphics,audio,video
and so on.
• This protocol use a special 8 bit pattern flag 01111110 as the
delimiters to separate one frame from another.
• At the receiver side stuffed data is unstuffed and original data will be
stored.
Point to Point Protocol(PPP)
• PPP is a byte oriented protocol used for point-to-point access.
• Millions of internet users connect their personal computers to the
server of an internet service provider use PPP.
• Services provided by PPP are
• It defines the format of the frame that has to be exchanged between two
devices.
• It was designed to support multiple network protocol simultaneously. It can
transfer packets that are produced by different network layer protocols.
• It defines how two devices can authenticate each other.
• It defines how network layer data are encapsulated in the data link frame.
Transition Phase of PPP

• PPP provides many capabilities through Link Control Protocol(LCP)


• LCP is used to setup configure ,test, maintain and terminate a link
connection trough various steps stage by stage.
• There are different phases for PPP
• Establish
• Authenticate
• Network
• Open
• Terminate
• Dead
High Level Data Link Control(HDLC)
• HDLC is a bit oriented protocol for communication over point to point and
multipoint links. It implements ARQ techniques.
Other Peer to Peer Protocols
QUESTION POOL
• Q1. Explain STOP and wait ARQ with a neat diagram. (8)
• (b) Explain GO-BACK-N ARQ and piggy-backing in detail (8)
• Q2.What is framing?(8)
• Q3. Explain HDLC frame format?
• Q4.Explain IEEE 802.11 frame structure?
• Q5.Explain about Flow control?
• Q6.Explain Sliding Window method of flow control?(8)
• Q7.Explain selective repeat ARQ?(8)
• Q8.Explain data link control and framing(8)

You might also like