230 likes | 501 Views
Chapter 5a Leon-Garcia Peer-to-Peer Protocols, Continued. 5.2.4 Transmission Efficiencies of ARQ Protocols 5.4 Examples: Data Link Layer HDLC PPP 5.5 Statistical Multiplexing (Use of Routers to Queue Packets). Outline Today.
E N D
5.2.4 Transmission Efficiencies of ARQ Protocols 5.4 Examples: Data Link Layer HDLC PPP 5.5 Statistical Multiplexing (Use of Routers to Queue Packets) Outline Today
Automatic Repeat Request (ARQ) can ensure that data is delivered accurately, despite occasional errors at lower layers. Stop and Wait Go-back-N Selective Repeat 5.2 ARQ ProtocolsReview
Header Error-free packet sequence Information frames Packet sequence Transmitter Receiver Station B Station A Control frames CRC CRC Header Control frame Information packet Information Frame Figure 5.8
Stop and Wait Error Recovery Time-out expires Stop-and-Wait time fr 0 fr 0 fr 1 A B ACK1 error Go Back N Error Recovery 4 frames are outstanding; so go back 4 Go-Back-N time fr 0 fr 1 fr 2 fr 3 fr 0 fr 1 fr 2 fr 3 fr 4 fr 5 fr 6 A B ACK1 ACK5 ACK2 ACK6 ACK4 ACK3 Out-of-sequence frames error Figure 5.14
Selective Repeat Error Recovery time fr 0 fr 1 fr 2 fr 3 fr 4 fr 5 fr 2 fr 7 fr 8 fr 6 fr 9 fr 10 fr 11 fr 12 A B ACK2 NAK2 ACK2 ACK2 ACK7 ACK8 ACK9 ACK10 ACK11 ACK12 ACK1 ACK2 error Figure 5.21
Full Duplex Go-Back-N Sliding Window Protocol “A” Receive Window “B” Receive Window RAnext RBnext Station B Station A SArecent RAnext Receiver Transmitter Transmitter Receiver SBrecent RBnext ACKs are piggybacked in headers “A” Send Window “B” Send Window ... ... SAlast SBlast SAlast+WAs-1 SBlast+WBs-1 Buffers Buffers SAlast SBlast Timer Timer SAlast+1 SBlast+1 Timer Timer ... ... SArecent Timer Timer SBrecent ... ... SAlast+WAs-1 SBlast+WBs-1 Timer Timer Figure 5.18
Delay Components in Stop-And-Wait • t0 A tproc B frame tftime tprop tprop tproc tack See Table 5.1 for Efficiencies, Blackboard for Caluulations of Efficiencies When A Fraction of P Frames are Received in Error Figure 5.23
Selective Repeat Go-Back-N Stop & Wait p Figure 5.24
Now pick optimum frame size Selective Repeat Go-Back-N 17 32 62 10 6 3 3 Stop &Wait 3 nf Figure 5.25
Application Application byte stream byte stream Segments Transmitter Receiver Receive buffer Send buffer ACKs Intro to TCP Reliable Byte Stream. Chapter 8 Figure 5.32
HDLC Example NLPDU Network Layer Network Layer “packet” DLSAP DLSDU DLSDU DLSAP DLPDU Data Link Layer Data Link Layer “frame” Physical Layer Physical Layer Figure 5.32
HDLC Modes: Unbalanced Point-to-point link Commands Primary Secondary Responses Unbalanced Multipoint link Commands Primary Responses Secondary Secondary Secondary Balanced Point-to-point link between Combined Stations Commands Secondary Primary Responses Primary Secondary Commands Responses Figure 5.33
HDLC Frame Format Flag Address FCS Control Information Flag Flag 01111110. Bit stuffing used to avoid in data Only one address field for secondary host 16 or 32 bit CRC (FCS) Control Field: Several types. 16 or 32 bits info frame, control frame, unumbered frame Figure 5.35
The 3 types of HDLC frames Information Frame 1 5 2-4 6-8 N(R) 0 N(S) P/F Supervisory Frame 1 N(R) 0 S S P/F Unnumbered Frame 1 1 M M M M P/F M Figure 5.36
Data transfer SABM UA UA DISC Figure 5.37
Secondaries B, C Primary A B, RR, 0, P B, I, 0, 0 B, I, 1, 0 X B, I, 2, 0,F 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
Combined Station A Combined Station B B, I, 0, 0 A, I, 0, 0 B, I, 1, 0 A, I, 1, 1 X A, I, 2, 1 B, I, 2, 1 B, I, 3, 2 B, REJ, 1 B, I, 4, 3 A, I, 3, 1 B, I, 1, 3 B, I, 2, 4 B, RR, 2 B, I, 3, 4 B, RR, 3 Figure 5.39
flag Address Flag Control Protocol Information CRC 01111110 01111110 1111111 00000011 All stations are to accept the frame Specifies what kind of packet is contained in the payload, e.g., LCP, NCP, IP, OSI CLNP, IPX Unnumbered frame Figure 5.40
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. A Typical Scenario 1. Carrier Detected Dead 7. Carrier Dropped failed Establish Terminate 2. Options Negotiated 6. Done failed Authenticate 5. Open 3. Authentication Completed 4. NCP Configuration Network Figure 5.41