1.5k likes | 1.74k Views
Chapter 2. Point-to-Point Protocols and Links. Section 2.1. Introduction. 2.1 Introduction. Physical communication links Data link control i.e. point-to-point protocols Physical links : requires background in Linear system theory Random process Modern communication theory Recall
E N D
Chapter 2 Point-to-Point Protocols and Links
Section 2.1 Introduction
2.1 Introduction • Physical communication links • Data link control • i.e. point-to-point protocols • Physical links : requires background in • Linear system theory • Random process • Modern communication theory • Recall • Chapter 1 section 1.3.1 page 34
Introduction • Our major problem in DLC : correct bit error • Error detection & correction • ARQ ( Automatic Repeat request) • Header + packet + trailer => frame
Section 2.2 Physical layer Channels & modems
2.2 Physical layer:channels & modems • Skip,will be discussed if necessary
Section 2.3 Error Detection
2.3 Error Detection • DLC layer is to provide error-free packets to next layer up
2.3.1 Single Parity checks • Parity checks bit is the sum, modulo 2 , of the bits in the original bit string • Total number of 1`s in an encoded string is always even • Detect single bit error only.And , odd number of bit errors
Horizontal & Vertical Parity Checks • Common use for ASCII encoded characters • Cannot detect four errors confined to 2 rows and 2 columns
Parity Check Codes • Effectiveness of a code for error detection • Minimum distance of the code • Single parity check is 2 • Horizontal & Vertical is 4 • Burst-detecting capability • Single parity is 1 • Horizontal & Vertical is 1+length of row • Probability that a completely random string will be accepted as error-free
Parity Check Codes • E.g. • Minimum distance • Single parity check is 2 • Horizontal & Vertical is 4 • Burst-detecting • Single parity check is 1 • Horizontal & Vertical is 1 + length of row
Cyclic Redundancy Checks(CRC) L=3 S(D)=D2+1
Section 2.4 ARQ: Retransmission Strategies
2.4 ARQ:Retransmission Strategies • 2 aspects of retx algorithms or protocols • Succeed in releasing each packet,one oad only once without errors • Efficiency releasing unnecessary waiting & unnecessary retx
ARQ:Retransmission Strategies • We assume , all frames containing transmission errors are detected • Delay is arbitrary • Frame may be “lost” & never arrive • Frames arrive in the same order as transmitted
2.4.1 Stop-and-wait ARQ • Each packet has been received correctly before initiating tx of next packet • If • Error free • Acknowledge , Ack • Error frame • Negative acknowledgement , NAK • Ack & NAK is protect with a CRC • Ack lost or NAK • Resend the old packet
Stop-and-wait ARQ • Avoid this problem,returns the number of next packet awaited • Piggyback
Stop-and-wait ARQ • The algorithm for A to B • At node A • SN0 • Assign SN to the new packet • Tx SN-th frame • If receive from B with B RN>SN,SNRN,go to Step2 If no received frame from B,timeout , go to Step 3
Stop-and-wait ARQ • Continued • At node B • RN0,repeat step2 &3 forever • If error-free frame received with SN==RN,RN++ • Within bounded delay after receiving error-free frame send a frame to A containing RN
Stop-and-wait ARQ • Correctness of stop-and-wait • An algorithm is safe if it never produces an incorrect result • An algorithm is live if it can continue forever to produce results • Safety • Initially, node B awaiting packet 0 , and only packet 0 is released.Subsequently,node B has released all packets in order,up to , but not including ,packet RN
Stop-and-wait ARQ • One trouble with Stop-and-wait • SN become arbitrarily large with increasing time • Given our assumption that frames travel in order on the link,SN modulus 2 is sufficient!
2.4.2 Go Back n ARQ • Several successive packets can be sent without waiting for the next packet to be requested • Accept packets only in the correct order , and send RN back • RN is to acknowledge all packets prior to RN and to request packet RN