Data Link Layer Data Link Control 01204325 Data
- Slides: 71
Data Link Layer: Data Link Control 01204325: Data Communication and Computer Networks Adapted from lecture slides by Behrouz A. Forouzan © The Mc. Graw-Hill Companies, Inc. All rights reserved Asst. Prof. Chaiporn Jaikaeo, Ph. D. chaiporn. j@ku. ac. th http: //www. cpe. ku. ac. th/~cpj Computer Engineering Department Kasetsart University, Bangkok, Thailand
Outline n Framing n n Byte vs. bit oriented protocols Data Link Control Flow control n Error control n n Protocols 2
Framing n n Process of wrapping data with certain info before sending out A frame typically consists of n n Flag: indication for start and end of a frame Header: source/destination addresses, as well as other control information Data from the upper layer Trailer: error detection/correction code 3
Byte vs. Bit Oriented n Framing in byte-oriented protocols n Framing in bit-oriented protocols 4
Byte Stuffing n Process of adding extra byte whenever there is an escape or a flag character in the data 5
Bit Stuffing n Process of adding extra bit to ensure flag sequence does not appear in the data 01111110 6
Flow Control and Error Control n Flow control n n A set of procedures that tells the sender how much data can be sent before waiting for acknowledgment Error control Includes both error detection and correction n Allows receiver to inform sender of lost or duplicate frames n Mostly based on Automatic Repeat Request (ARQ) n 7
Data Link Protocols 8
Protocols for Noiseless Channel n Assuming channel is error free n n Not realistic… No need for error control 9
"Simplest" Mechanism n Assuming n n Noiseless channel Unlimited buffer and speed for the receiver 10
"Simplest" : Pseudo Code n Sender n Receiver 11
"Simplest": Flow Diagram 12
Stop-and-Wait Mechanism n n Still noiseless channel Receiver has limited buffer n n Requires flow control Sender sends one frame at a time and wait for an acknowledgment 13
Stop-and-Wait: Overview 14
Stop-and-Wait: Pseudo Code n Sender side 15
Stop-and-Wait: Pseudo Code n Receiver side 16
Stop-and-Wait: Flow Diagram 17
Noisy Channel n Realistic Error can and will happen n Require error control n n Mechanisms: Stop-and-Wait ARQ n Go-Back-N ARQ n Selective Repeat ARQ n 18
Stop-and-Wait ARQ n n Sender keeps a copy of sent frame until successful delivery is ensured Receiver responds with an ack when it successfully receives a frame Both data and ack frames must be numbered When sender does not receive an ack within certain time, it assumes frame is lost, then retransmits the same frame. 19
Stop-and-Wait ARQ 20
Flow Diagram: Normal Operation Sender S=0 Receiver Frame 0 ACK 1 S=1 Frame 1 ACK 0 Time R=0 Deliver R=1 Deliver R=0 Time 21
Thinking Corner n Why data frames need to be numbered? 22
Flow Diagram: Lost Frame Sender S=0 Receiver Frame 0 ACK 1 S=1 Timeout Frame 1 R=0 Deliver R=1 Frame 1 ACK 0 Time Deliver R=0 Time 23
Flow Diagram: Lost ACK Sender S=0 Receiver Frame 0 ACK 1 S=1 Frame 1 R=0 Deliver R=1 Deliver ACK 0 Timeout S=1 Frame 1 ACK 0 S=0 Time R=0 Frame 0 expected; discard R=0 Time 24
Thinking Corner n Why ACK frames need to be numbered? 25
Flow Diagram: Delayed ACK Sender Receiver S=0 Frame 0 ACK Frame 0 Timeout S=1 R=0 Frame 1 1 Deliver R=1 Frame 0 expected; discard ACK 1 R=1 Timeout Frame 1 ACK 0 R=0 Deliver S=0 26
Bidirectional Transmission n n Data are transferred both ways ACK are "piggybacked" with data frames 27
Example n Assuming a communication system where: n n n Stop-and-Wait ARQ is used Bandwidth of the link is 1 Mbps Propagation delay is 10 ms One-way data flow Questions n n n What should be an appropriate time-out value? What is the bandwidth-roundtrip-delay product? If the system data frames are 1000 bits in length, what is the utilization percentage of the link? 28
Improving Link Utilization n Previous example demonstrates major disadvantage of Stop-and-Wait ARQ Prefer to send more frames before waiting for ACK Example: n Recalculate the link utilization if we allow up to 15 frames to be sent before waiting for an ACK 29
Go-Back-N ARQ n Allows multiple frames to be sent before waiting for ACK These frames must be numbered differently n Frame numbers are called Sequence numbers n n n Frames must be received in the correct order If a frame is lost, the lost frame and all of the following frames must be retransmitted 30
Sequence Numbers n n n Frame header contains m bits for sequence number That allows up to 2 m different frame numbers How big should m be? 31
Sending Window n Sending more than one frame at once requires sender to buffer multiple frames n n Known as "sending window" Any of these frames in the window can be lost 32
"Sliding" Window n Once the first frames in the window is ACKed n n n ACKed frames are removed from the buffer More frames are transmitted Result: The window slides to the right 33
Receiving Window n Receiver expects one frame at a time 34
Send vs. Receive Windows 35
Go-Back-N: Window Sizes n n For m-bit sequence numbers Send window size: at most 2 m-1 Up to 2 m-1 frames can be sent without ACK n Receive window size: 1 Frames must be received in order 36
Go-Back-N: Normal Operation 37
Go-Back-N: Lost Frame ACKs are cumulative 38
Lost ACK: Window Size < m 2 39
Thinking Corner n What is a problem if send window is greater than 2 m-1? 40
Lost ACK: Window Size = m 2 41
Thinking Corner n Stop-and-Wait is a special case of Go-Back -N. n What is the send window size in Stop-and. Wait? 42
Selective Repeat ARQ n Go-Back-N always discards out-of-order frames Losing one frame may result in retransmission of multiple frames n Very inefficient in noisy link n n Selective Repeat ARQ allows frames to be received out of order n Therefore, receive window > 1 43
Send and Receive Windows n n Sender and receiver share window space equally For m-bit sequence numbers Send window: up to 2 m-1 n Receive window: up to 2 m-1 n 44
Send Window 45
Receive Window 46
Negative ACK n Used by receiver to indicate missing frame 47
Selective Repeat: Window Size 48
Data Link Control Protocols: HDLC and PPP
HDLC n n n High-level Data Link Control Bit-oriented protocol Support both Point-to-point links n Multipoint links n 50
Normal Response Mode n n "NRM" mode Used in both point-to-point and multi-point link 51
Asynchronous Balance Mode n n n "ABM" Supports only point-to-point links Each station is both primary and secondary 52
HDLC Frames n Information frame (I-frame) n Supervisory frame (S-frame) n Unnumbered frame (U-frame) Frame Check Sequence (error detection code) 53
Control Field Format n n n N(S) – Frame sequence number N(R) – Ack sequence number P/F n n Poll (primary secondary) Final (secondary primary) 54
U-Frame Codes 55
Connection and Disconnection 56
Data Transfer: No Error 57
Data Transfer: With Error 58
PPP n n n Point-to-Point Protocol Byte-oriented protocol Most common protocol for point-to-point access Dial-up access n ADSL n GPRS/EDGE/3 G n 59
PPP Frame Format n n Escape byte: 01111101 Control field uses HDLC's U-frame format n No flow or error control 60
PPP Transition States 61
Multiplexing in PPP 62
PPP Stack n n n Link Control Protocol (LCP) Authentication Protocol (AP) Network Control Protocol (NCP) 63
LCP: Link Control Protocol n Responsible for establishing, maintaining, configuring, and terminating links 64
PPP Authentication n Two protocols are supported: Password Authentication Protocol (PAP) n Challenge Handshake Authentication Protocol (CHAP) n 65
PAP 66
CHAP 67
NCP: Network Control Protocol n n A set of control protocols to allow data from the network layer to be encapsulated into a PPP frame One common protocol: IPCP (Internetwork Protocol Control Protocol) n Allow negotiation at the network layer 68
Data Encapsulation 69
Example: PPP Session 70
Example: PPP Session (cont'd) 71
- Error control in data link layer
- Flow control layer
- Flow control in data link layer
- Data link control
- Link layer flow control
- Jelaskan tentang error control pada data link control?
- Data link layer design issues
- Materi data link layer
- Karmetasploit
- Data layer link
- Data link layer switching in computer networks
- Data link layer protocols
- Elementary data link protocols in computer networks
- Error detection and correction in data link layer
- Unacknowledged connectionless service
- Hdlc categories
- Communication at the data link layer is
- Design issues for data link layer
- Block coding in data link layer
- Data link layer protocols for noisy and noiseless channels
- Responsibilities of data link layer
- Data link layer
- Dlc in data link layer stands for
- Unrestricted simplex protocol
- The two main functions of the data link layer are
- Data link layer switching
- Simplex protocol for noisy channel
- Fungsi physical layer
- Channel allocation problem in medium access sublayer
- Data link layer divided into two sublayers
- Data link layer framing
- Ccna 1 chapter 7
- Pigmented layer and neural layer
- Brush border enzymes
- Secure socket layer and transport layer security
- Presentation layer functions
- Secure socket layer and transport layer security
- Secure socket layer and transport layer security
- Secure socket layer and transport layer security
- Layer 2 e layer 3
- Layer-by-layer assembly
- Layer 2 vs layer 3 bitstream
- A link layer protocol for quantum networks
- High-level data link control program in c
- Pengertian data link
- Data link control deals with the design and procedures for
- What is hdlc in computer network
- Data link control
- Data link control
- Hdlc osi layer
- Data link control protocols in computer networks
- Site:.com "fill link item" "add link"
- Session layer checkpoints
- Congestion control in network layer
- Javachive
- Ex-link ( rs-232c ) samsung
- Llc logical link control
- Dmi link aspm control
- The ppp link control protocol was terminated
- Primary control vs secondary control
- Process control and product control
- Fluid mechanics
- Stock control e flow control
- Control volume vs control surface
- Negative vs positive control
- What is variable in research
- Control de flujo parada y espera
- Negative control vs positive control examples
- Flow control and error control
- Scalar control vs vector control
- Salin teks di foto
- Principles of reliable data transfer in transport layer