1 Reliable stream service--TCP 1.TCP accepts byte stream, so segmenting 2.It is over IP, so out-of-sequence is very common --lost or error frame results.

Slides:



Advertisements
Similar presentations
Data Link Protocols(HDLC & PPP). Data Link Protocols The set of specifications used to implement the DLL. DLL Protocols Synchronous Protocols Character-oriented.
Advertisements

HIGH-LEVEL DATA LINK CONTROL (HDLC) HDLC was defined by ISO for use on both point-to-point and multipoint data links. It supports full-duplex communication.
William Stallings Data and Computer Communications 7th Edition
C) All rights reserved by Professor Wen-Tsuen Chen1 Chapter 3 The Data link Layer ä For reliable, efficient communication between two adjacent machines.
Chapter 11 Data Link Control (DLC) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data and Computer Communications Updated: 2/9/2009.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Data Link Control Slide 1 Data Link Control Chapter 7.
Error Detection and Correction
Transmission Errors Error Detection and Correction
Piggybacking A method to combine a data frame with ACK. Station A and B both have data to send. Instead of sending separately, station A sends a data frame.
ELEN 602 Lecture 4 Review of last lecture –Communication basics More on transmission media Errors in Transmission.
11-6 HDLC High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-point and multipoint links. It implements the.
Error Detection and Correction
Error Detection and Correction
Data Link Control Protocols Data link control protocol Provides a layer of control between systems on a transmission medium referred to as data link. DLC.
Transmission Errors1 Error Detection and Correction.
11-6 HDLC High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-point and multipoint links. It implements the.
The Data Link Layer Chapter 3. Position of the data-link layer.
William Stallings Data and Computer Communications 7 th Edition Chapter 7 Data Link Control Protocols.
The OSI Reference Model
Chapter 9: Data Link Control Business Data Communications, 4e.
1 ELEN 602 Lecture 6 Review of last lecture –Generator polynomials –Stop-and-wait, Go-back-N ARQ Today’s lecture –Selective Repeat ARQ –Analysis of all.
Semester Copyright USM EEE442 Computer Networks The Data Link / Network Layer Functions: Flow Control and Error Control En. Mohd Nazri Mahmud.
FLAG-8 bit sequence with a bit pattern (7E) ADDRESS-address of secondary station that is either the originator or destination of the frame (or.
Example Data Link Protocols Quick review Reference Models? Layers? Flow Control? Bit stuffing? Connection Oriented? Synchronous transmission?
HDLC and PPP. The Data Link Layer in the Internet A home personal computer acting as an internet host. Technology like Ethernet cannot provide “high-level”
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART II: Data Link Controls Framing Point-to-Point Protocol High-Level Data Link Control.
Transmission Errors Error Detection and Correction
MODULE I NETWORKING CONCEPTS.
Data Link Control Protocols Dr. Muazzam A. Khan. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow.
Aegis School of Telecommunication Chapter 7 Data Link Control Protocols Telecom Systems I by Dr. M. G. Sharma, Phd.
William Stallings Data and Computer Communications 7th Edition
Data and Computer Communications Tenth Edition by William Stallings Data and Computer Communications, Tenth Edition by William Stallings, (c) Pearson Education.
CSC 535 Communication Networks I Section 3.8 Error Detection and Correction Dr. Cheer-Sun Yang.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Control and Protocols.
Leon-Garcia & Widjaja: Communication Networks Copyright ©2000 The McGraw Hill Companies Chapter 5 Leon-Garcia Peer-to-Peer Protocols We will cover most.
Chapt 3 Data Link Layer1 Data Link Layer Functions –Provides services to network layer Well-defined interface –Framing –Flow control – between adjacent.
1 Kyung Hee University Data Link Protocols. 2 Kyung Hee University 11 장 Data Link Control and Protocols 11.1 Flow and Error Control 11.2 Stop-and-Wait.
Computer Networks Module 3: Data Link Layer (Framing) Dr. Vikram Shete St. Francis Institute of Technology.
Chapter 11 Data Link Protocols A data link protocol is a set of specifications used to implement the data link layer [A protocol is the set of rules or.
Chapter 11 Data Link Control
Data Link Layer: Data Link Control : Data Communication and Computer Networks Asst. Prof. Chaiporn Jaikaeo, Ph.D.
CIS : Data Link Control. Flow Control Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow Transmission.
Data Link Protocols ผศ.ดร. อนันต์ ผลเพิ่ม
1 Reliable stream service--TCP 1.TCP accepts byte stream, segments 2.It is over IP, so out-of-sequence is very common --lost or error frame results in.
Transmission Errors Error Detection and Correction.
FIT – Monash University High-Level Data Link Control
Network Layer4-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
Data Link Layer. Link Layer The data unit to be transmited at the link layer is called a frame. Why link layer? How can it know where a frame begins and.
Data and Computer Communications Data Link Control Protocols.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 9: Data Link Control Business Data Communications, 4e.
Data Communications Data Link Layer.
2.10 Flow and Error Control Before that ...
Chapter 3 The Data Link Layer.
High level Data Link Layer Protocol - HDLC
HDLC and PPP.
Chapter 11 Data Link Control
Chapter 11 Data Link Control (DLC)
Chapter 11 Data Link Control and Protocols
Chapter 11 - Part 2 Data Link Control.
CIS 321 Data Communications & Networking
Chapter 11 Data Link Control and Protocols.
Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Error control.
Transmission Errors Error Detection and Correction
Jiying Zhao SITE, University of Ottawa Canada.
Transmission Errors Error Detection and Correction
William Stallings Data and Computer Communications
Presentation transcript:

1 Reliable stream service--TCP 1.TCP accepts byte stream, so segmenting 2.It is over IP, so out-of-sequence is very common --lost or error frame results in out-of-sequence -- It is not “wirelike”, even there is a TCP connection between sender and receiver, but this connection has logical meaning and is not a real physical path, i.e., packets ultimately travel along different routes, so out- of-sequence 3.Because of not “wirelike”, it is possible for old packets from previous connections to arrive at a receiver. The old packets will confuse the new packets with the same SN. TCP solves it by 1.using long (32 bit) SNs and selecting a random initial SN during connection setup; 2.set a timer at end of a connection to clear old packets. So accepting an very old packet is very unlikely. 4.TCP uses Selective Repeat ARQ with a mechanism to advertise receive window size for flow control. Moreover, window size is not based on number of packets, but number of bytes 5.TCP can also be used for congestion control.

CIS, IUPUI2 byte stream Send buffer Segments Receive buffer byte stream Application ACKs Transmitter Receiver Figure 5.32 TCP preview—reliable stream service

3 Transmitter S last S last + W s – 1... Send Window S recent octets transmitted & ACKed... S last + W a -1 S last oldest unacknowledged byte S recent highest-numbered transmitted byte S last +W a -1 highest-numbered byte that can be transmitted S last +W s -1 highest-numbered byte that can be accepted from the application Receiver Receive Window R next R last R last + W R – 1 R last highest-numbered byte not yet read by the application R next next expected byte R new highest numbered byte received correctly R last +W R -1 highest-numbered byte that can be accommodated in receive buffer R new Wa=W R -(R new -R last ), S recent -S last <=Wa Advertised window:

CIS, IUPUI4 Data link protocols Framing: indicate the boundaries of frames Error control: ensure reliable transmission Flow control: prevent sender from overrunning receiver Addressing information: is required when the channel carries information for multiple users. Assumption: data link is “wirelike”. Two protocols: HDLC and PPP.

CIS, IUPUI5 HDLC data link control Was set by ISO Is connection-oriented: set up connection first, then transfer frames using one of three ARQs, finally tear down the connection (Note: LAN generally provides unacknowledged connectionless service) HLDC configurations and transfer modes HDLC frame format Typical frame exchange

CIS, IUPUI6 Physical Layer Data Link Layer Data Link Layer Network Layer DLSDU Network Layer Physical Layer DLPDU NLPDU “packet” “frame” DLSAP Figure 5.32 Data link layer

7 PrimarySecondary Commands Responses Unbalanced Point-to-point link Primary Commands Responses Secondary Unbalanced Multipoint link Primary Secondary Commands Responses Balanced Point-to-point link between Combined Stations Primary Secondary Commands Responses Figure 5.33 HDLC configurations and transfer modes NRM: Normal Response Mode ABM: Asynchronous Balance Mode

8 Flag AddressControlInformationFCS Figure 5.35 HDLC frame format 1.Framing: Flags at both ends define the frame boundaries. Flag value is Addressing: indicate the destination address 3. Control: various control fields to indicate different frames 4. Information: user information by bits, generally no length limit. 5. FCS: Frame Check Sum, using 16-or 32-bit CRC Question: flag value may appear in frame, what to do? Solution: bit stuffing, a technique to prevent occurrence of flag. sender inserts an extra 0 after each instance of five consecutive 1s. receiver looks for five consecutive 1s, if followed by 0, then this 0 was stuffed and is removed; if followed by 10, then flag found. Example:  where 0 is stuffed where –: removed stuff 0

9 0N(S) N(R) P/F Information Frame or I-frame N(R) P/F Supervisory Frame or S-frame Unnumbered Frame or U-frame 1 0 SS P/F 1 1 MMM M M Control field format: three types of frames P/F bit: Poll/Final bit. If set, the frame is a poll frame from primary or the last I-frame of all transmitted frames. N(S): sender SN of I-frame, N(R): piggybacked ACK Window size: 2 3 –1 = 7 for Stop-and-Wait and Go-back-N, 4 for Selective-Repeat (in extended control field) 2 7 –1 = 127 for the first two ARQs, 64 for the last ARQ

10 N(R) P/F Supervisory Frame or S-frame Unnumbered Frame or U-frame 1 0 SS P/F 1 1 MMM M M Figure 5.36 Control field format: S-frame and U-frame Four types of S-frames: SS=00: RR (Receive Ready) frame used when no I-frame for piggyback SS=01: REJ (Reject) frame, i.e., NAK frame SS=10: RNR (Receive Not Ready) frame, indicate unable to receive any more. SS=11: SREJ (Selective Reject) frame, indicate the retransmission of specified frame U-frames for setup or release of connection: SABM (Set Asynchronous Balance Mode) SNRM (Set Normal Response Mode) SABME: SABM Extended SNRME: SNRM Extended DISC (DISConnect) UA (Unnumbered acknowledgment) FRMR (Frame Reject)

CIS, IUPUI11 SABM UA DISC Data transfer Figure 5.37 Typical frame exchange—for connection setup and release

12 Primary A Secondaries B, C B, RR, 0, P B, I, 0, 0 B, I, 1, 0 B, I, 2, 0,F X B, SREJ, 1 C, RR, 0, P C, RR, 0, F B, SREJ, 1,P B, I, 1, 0 B, I, 3, 0 B, I, 4, 0, F B, I, 0, 5 Figure 5.38 Typical frame exchange— using normal response mode (Des.-IP, frame-type, N(S) (for I-frame), N(R), P/F) What ARQ? Selective repeat

CIS, IUPUI13 Combined Station A Combined Station B B, I, 0, 0 A, I, 0, 0 B, I, 1, 0 B, I, 2, 1 A, I, 1, 1 A, I, 2, 1 X B, REJ, 1 B, I, 3, 2 B, I, 4, 3 B, I, 1, 3 B, I, 2, 4 B, I, 3, 4 A, I, 3, 1 B, RR, 2 B, RR, 3 Figure 5.39 Typical frame exchange— using asynchronous balanced mode What ARQ?Go-back-N

14 Point-to-Point protocol Used to connect: –Router to router, or home PC to ISP. HDLC-like frame format Information by bytes, so char-stuffing in case a flag byte appears in information Support multiple network protocols simultaneously, e.g, IP, IPX( Novell NetWare) etc. LCP (Link Control Protocol): set up, configure, test, maintain, and terminate a link connection NCP (Network Control Protocol): configure each network protocol, specifically, NCP for IP performs dynamical IP address assignment PAP (Password Authentication Protocol): login ID and password CHAP (Challenge-Handshake Authentication Protocol): no plain password goes between two peers.

CIS, IUPUI15 Flag flag Address Control Information CRC Protocol Unnumbered frame Specifies what kind of packet is contained in the payload, e.g., LCP, NCP, IP, OSI CLNP, IPX All stations are to accept the frame Figure 5.40 PPP frame format 1.Framing flag: same as HDLC 2.Address: , broadcast address, no need for specific host address 3.Control: default for connectionless transfer, not use sequence number 4.Protocol: support multiple network protocols 5.Information: byte-based, not bit-based. So Char-stuffing, see Problem CRC: check sum

CIS, IUPUI16 A Typical Scenario Home PC to Internet Service Provider 1. PC calls router via modem. 2. PC and router exchange LCP packets to negotiate PPP parameters. 3. Check on identities. 4. NCP packets exchanged to configure the network layer, e.g., TCP/IP ( requires IP address assignment). 5. Data transport, e.g. send/receive IP packets. 6. NCP used to tear down the network layer connection (free up IP address); LCP used to shut down data link layer connection. 7. Modem hangs up. Dead Establish Authenticate Network Terminate Open failed 1. Carrier Detected 2. LCP Options Negotiated 3. Authentication Completed 4. NCP Configuration 6. Done 7. Carrier Dropped 5. Figure 5.41

CIS, IUPUI17 Error Detection and Correction (Chapter 3) Error detection and retransmission –When return channel is available –Used in Internet –Waste bandwidth Forward error correction (FEC) –When the return channel is not available –When retransmission incurs more cost –Used in satellite and deep-space communication, as well as audio CD recoding. –Require redundancy and processing time.

CIS, IUPUI18 Odd error detection using parity bit Seven data bit plus 1 parity bit Then any odd errors can be detected.

CIS, IUPUI19 Two-dimension parity checks Several information rows 2.Last column: check bits for rows 3.Last row: check bits for columns Can detect one, two, three errors, But not all four errors error 2 errors3 errors4 errors

CIS, IUPUI20 Internet Checksum IP packet, a checksum is calculated for the headers and put in a field in the header. Goal is easy/efficient to implement, make routers simple and efficient. Suppose m 16-bit words, b 0, b 1, …, b m-1 –Compute x= b 0 + b 1 + …+ b m-1 mod –Set checksum b m =-x –Insert x in the checksum field –Verify b 0 + b 1 + …+ b m-1 + b m =0 mod

CIS, IUPUI21 CRC (Cyclic Redundancy Check) (chapter 3.9.4) Based on polynomial codes and easily implemented using shift-register circuit Information bits, codewords, error vector are represented as polynomials with binary coefficients. On the contrary, the coefficients of a polynomial will be a binary string. Polynomial arithmetic is done modulo 2 with addition and subtraction being Exclusive-OR, so addition and subtraction is the same. Examples:  x 4 + x 2 + x  x 3 + x + 1

CIS, IUPUI22 Addition: Multiplication: Division: x 3 + x + 1 ) x 6 + x 5 x 3 + x 2 + x x 6 + x 4 + x 3 x 5 + x 4 + x 3 x 5 + x 3 + x 2 x 4 + x 2 x 4 + x 2 + x x = q(x) quotient = r(x) remainder divisor dividend 35 ) Figure 3.55 polynomial arithmetic = * = )

CIS, IUPUI23 How to compute CRC There is a generator polynomial, g(x) of degree r, which the sender and receiver agree upon in advance. Suppose the information transmitted has m bits, i.e. i(x), then sender appends r zero at the end of information, i.e, x r i(x) Perform x r i(x) / g(x) to get remainder r(x) (and quotient q(x)) Append the r bit string of r(x) to the end of m bit information to get m+r bit string, i.e., b(x), for transmission. –b(x) = x r i(x) + r(x) ( =g(x)q(x)+r(x)+r(x)=g(x)q(x) ) When receiver receives the bit string, i.e., b’(x), it will divide b’(x) by g(x), if the remainder is not zero, then error occurs. --suppose no error occurs, then b’(x) = b(x), so b ’(x)/g(x) =b(x)/g(x)=g(x)q(x)/g(x)=q(x), remainder is 0.

CIS, IUPUI24 Generator polynomial: g(x)= x 3 + x + 1  1011 Information: (1,1,0,0) i(x) = x 3 + x 2 Encoding: x 3 i(x) = x 6 + x ) x 3 + x + 1 x 6 + x 5 x 3 + x 2 + x x 6 + x 4 + x 3 x 5 + x 4 + x 3 x 5 + x 3 + x 2 x 4 + x 2 x 4 + x 2 + x x Transmitted codeword: b(x) = x 6 + x 5 + x b = (1,1,0,0,0,1,0) Figure 3.57 Example of CRC encoding

CIS, IUPUI25 Example of CRC encoding (cont.) If is received, then is divided by 1011, The remainder will be zero (please verify yourself), so no error. Suppose is received, then let us do the division as follows: ) The remainder is not zero, so error occurs.

CIS, IUPUI26 Typical standard CRC polynomials CRC-8: x 8 + x 2 + x + 1 ATM header error check CRC-16: x 16 +x 12 +x 5 +1 HDLC, XMODEM, V.41 CRC-32: x 32 +x 26 +x 23 +x 22 + IEEE 802, DoD, V.41, x 16 +x 12 +x 11 +x 10 + AAL5 x 8 +x 7 +x 5 +x 4 +x 2 +x+1

CIS, IUPUI27 1. Single errors:e(x) = x i 0  i  n-1 If g(x) has more than one term, it cannot divide e(x) 2. Double errors: e(x) = x i + x j 0  i < j  n-1 = x i (1 + x j-i ) Fact: if p(x) is primitive of degree t, the smallest m for which 1+x m is divisible by p(x) is 2 t -1. Thus, if p(x) is selected to be a primitive poly of degree t=n-k, p(x) will detect all double errors as long as the codeword length does not exceed 2 n-k  1. So, g(x)=(1+x)p(x), p(x) is a primitive poly. e.g. CRC-16=(1+x)(x 15 +x+1), it can detect all double errors as long as the codeword length is less or equal to = Odd number of errors:e(1) =1. If g(x) has (x+1) as a factor, then g(1) = 0 and all codewords have an even number of 1s. Figure 3.60 Analysis of error detection power Received poly: R(x)= b(x) +e(x), where e(x) is error poly.

CIS, IUPUI28 4. Error bursts of length L: 0… e(x) = x i d(x) where deg(d(x)) = L-1 g(x) has degree n-k; g(x) cannot divide d(x) if deg(g(x))> deg(d(x)) L = (n-k) or less: all will be detected L = (n-k+1): deg(d(x)) = deg(g(x)) i.e. d(x) = g(x) is the only undetectable error pattern, fraction of bursts which are undetectable = 1/2 L-2 (the first and last bit in L range must be one, the left L-2 bits must match with the coefficients in g(x). L > (n-k+1): fraction of bursts which are undetectable = 1/2 n-k L ith position error pattern d(x) Figure 3.61

CIS, IUPUI29 The error detection capabilities of CRCs As long as the g(x) is selected appropriately –All single errors –All double errors –All odd number of errors –Burst error of length L, the probability that this burst error is undetectable = 1/2 (L-2) CRC can be easily implemented in hardware One word about error correction: more powerful, but need more extra check bits, more slow, so not use as much as error detection.