data link control
TRANSCRIPT
![Page 1: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/1.jpg)
Data Link Control
1. Framing 2. Flow and Error Control3. Protocols4. Noiseless Channels5. Noisy Channels6. HDLC7. Point-to-Point Protocol
![Page 2: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/2.jpg)
FramingFramingData link layer needs to pack bits into frames, so Data link layer needs to pack bits into frames, so that each frame is distinguishable from anotherthat 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: ATM (Chapter 18)
Variable-size framingNeed a way to define the end of the frame and the beginning of the next
Character-oriented approach and bit-oriented approachDr. Md. Abdur Razzaque
Green Networking Research GroupDept. of Computer Science and Engineering, University of Dhaka
![Page 3: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/3.jpg)
Character-Oriented ProtocolsCharacter-Oriented ProtocolsFrame structureFrame structure
• Byte stuffing: process of adding 1 extra byte whenever Byte stuffing: process of adding 1 extra byte whenever there is a flag or escape character in the textthere is a flag or escape character in the text
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
Universal Coding!!!
![Page 4: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/4.jpg)
Bit-Oriented ProtocolsBit-Oriented ProtocolsFrame structureFrame structure
• Bit stuffing: process of adding one extra 0 whenever five consecutive 1s follow a 0 in the data
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 5: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/5.jpg)
Flow and Error ControlFlow and Error ControlData link control = flow control + error controlFlow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgementError control in the data link layer is based on automatic repeat request (ARQ), which is the retransmission of dataACK, NAK(Negative ACK), Piggybacking (ACKs and NAKs in data frames)
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 6: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/6.jpg)
Noiseless Channels: Simplest Noiseless Channels: Simplest ProtocolProtocol
Simplest protocol with no flow or error control
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 7: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/7.jpg)
Simplest ProtocolSimplest ProtocolSender-site algorithm
• Receiver-site algorithm
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 8: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/8.jpg)
Stop-and-Wait ProtocolStop-and-Wait ProtocolSimple tokens of ACK and flow control added
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 9: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/9.jpg)
Stop-and-Wait ProtocolStop-and-Wait ProtocolSender-site algorithm
• Receiver-site algorithm
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 10: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/10.jpg)
Stop-and-Wait Protocol: Stop-and-Wait Protocol: ExampleExample
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 11: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/11.jpg)
Noisy Channels: Stop-and-Wait Noisy Channels: Stop-and-Wait ARQARQ
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 expiresIn Stop-and-Wait ARQ, we use sequence numbers to number the frames. The sequence numbers are based on modulo-2 arithmeticAcknowledgment number always announces in modulo-2 arithmetic the sequence number of the next frame expected.
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 12: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/12.jpg)
Stop-and-Wait ARQStop-and-Wait ARQ
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 13: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/13.jpg)
Stop-and-Wait ARQStop-and-Wait ARQSender-site algorithm
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 14: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/14.jpg)
Stop-and-Wait ARQStop-and-Wait ARQReceiver-site algorithm
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 15: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/15.jpg)
Stop-and-Wait ARQ: ExampleStop-and-Wait ARQ: Example
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 16: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/16.jpg)
Go-Back-N ARQGo-Back-N ARQPipelining improves the efficiency of the transmissionIn the Go-Back-N Protocol, the sequence numbers are modulo 2m, where m is the size of the sequence number field in bitsThe 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.
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 17: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/17.jpg)
Go-Back-N ARQGo-Back-N ARQReceive window for Go-Back-N ARQThe 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.
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 18: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/18.jpg)
Go-Back-N ARQGo-Back-N ARQSliding windows, Timers, ACK, Resending a frame
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 19: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/19.jpg)
Go-Back-N ARQ: Send Window SizeGo-Back-N ARQ: Send Window SizeIn Go-Back-N ARQ, the size of the send window must be less than 2m; the size of the receiver window is always 1Stop-and-Wait ARQ is a special case of Go-Back-N ARQ in which the size of the send window is 1
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 20: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/20.jpg)
Go-Back-N ARQ: Sender AlgorithmGo-Back-N ARQ: Sender Algorithm
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 21: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/21.jpg)
Go-Back-N ARQ: Receiver AlgorithmGo-Back-N ARQ: Receiver Algorithm
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 22: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/22.jpg)
Go-Back-N ARQ: Example 1Go-Back-N ARQ: Example 1
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 23: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/23.jpg)
Go-Back-N ARQ: Example 2Go-Back-N ARQ: Example 2
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 24: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/24.jpg)
Selective Repeat ARQSelective Repeat ARQSender window size
• Receive window size
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 25: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/25.jpg)
Selective Repeat ARQSelective Repeat ARQ
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 26: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/26.jpg)
Selective Repeat ARQ: Window Selective Repeat ARQ: Window SizeSize
The size of the sender and receiver window must be at most one-half of 2m
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 27: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/27.jpg)
Selective Repeat ARQ: Sender-Site Selective Repeat ARQ: Sender-Site AlgorithmAlgorithm
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 28: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/28.jpg)
Selective Repeat ARQ: Receiver-Site AlgorithmSelective Repeat ARQ: Receiver-Site Algorithm
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 29: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/29.jpg)
Selective Repeat ARQ: ExampleSelective Repeat ARQ: Example
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 30: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/30.jpg)
PiggybackingPiggybackingTo improve the efficiency of the bidirectional protocolsPiggybacking in Go-Back-N ARQ
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 31: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/31.jpg)
HDLCHDLC• High-level Data Link Control• Two common transfer mode: normal response mode (NRM) and
asynchronous balanced mode (ABM)
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 32: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/32.jpg)
HDLC: FramesHDLC: 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
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 33: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/33.jpg)
HDLC: FramesHDLC: 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)
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 34: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/34.jpg)
HDLC: FramesHDLC: Frames• Control field for S-frame• Receive ready (RR), Receive not ready (RNR), Reject (REJ) Selective
reject (SREJ)
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 35: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/35.jpg)
HDLC: FramesHDLC: Frames• Control field for U-frame
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 36: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/36.jpg)
HDLC: Example 1HDLC: Example 1• Connection and disconnection
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 37: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/37.jpg)
HDLC: Example 2HDLC: Example 2• Piggybacking without error
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 38: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/38.jpg)
HDLC: Example 3HDLC: Example 3• Piggybacking with error
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 39: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/39.jpg)
HDLC: Bit Stuffing and HDLC: Bit Stuffing and UnstuffingUnstuffing
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 40: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/40.jpg)
Point-to-Point Protocol: Point-to-Point Protocol: PPPPPPOne of the most common protocols for point-to-point accessMany Internet users who need to connect their home computer to the server of an Internet service provider use PPPA point-to-point link protocol is required to control and manage the transfer of dataPPP defines/provides
the format of the frame to be exchanged between deviceshow two devices negotiate the establishment of the link and the exchange of datahow network layer data are encapsulated in the data link framehow two devices can authenticate each othermultiple network layer servicesconnection over multiple linksNetwork address configuration
But, several services are missing for simplicityno flow control, simple error control (detection and discard), no sophisticate addressing for multipoint configuration
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 41: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/41.jpg)
PPP FramePPP 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
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 42: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/42.jpg)
PPP: Transition StatesPPP: Transition States
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 43: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/43.jpg)
PPP: MultiplexingPPP: 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
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 44: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/44.jpg)
LCP: Encapsulated in a FrameLCP: Encapsulated in a Frame
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 45: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/45.jpg)
LCP: Common OptionsLCP: Common Options
Options are inserted in the information field of the configuration packets
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 46: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/46.jpg)
AuthenticationAuthentication
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 authenticationPassword Authentication Protocol (PAP)
Challenge Handshake Authentication Protocol (CHAP)
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 47: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/47.jpg)
Password Authentication Password Authentication Protocol (PAP)Protocol (PAP)
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 48: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/48.jpg)
Challenge Handshake Challenge Handshake Authentication Protocol (CHAP)Authentication Protocol (CHAP)
• Three-way hand-shaking authentication protocol with greater security than PAP
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 49: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/49.jpg)
Network Control Protocol: Network Control Protocol: NCPNCPPPP 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
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 50: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/50.jpg)
IPCP PacketIPCP Packet
IP Datagram in a PPP frame
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 51: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/51.jpg)
Multiple PPPMultiple PPP
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 52: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/52.jpg)
Example (1)Example (1)
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
![Page 53: Data link control](https://reader033.vdocuments.us/reader033/viewer/2022042817/55a2bcc31a28ab495f8b4862/html5/thumbnails/53.jpg)
Example (2)Example (2)
Dr. Md. Abdur RazzaqueGreen Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka