230 likes | 360 Views
Link Layer Protocols. Martin Weiss. Objectives of this Meeting. Explain what a protocol is Compare connection-oriented with connectionless protocol types Describe some protocol mechanisms Describe different link layer protocols. Review of the Last Meeting. Error detection Flow control
E N D
Link Layer Protocols Martin Weiss
Objectives of this Meeting • Explain what a protocol is • Compare connection-oriented with connectionless protocol types • Describe some protocol mechanisms • Describe different link layer protocols
Review of the Last Meeting • Error detection • Flow control • Performance of flow control techniques
Data Link Layer Issues • Type • Error detection and control • Flow control
OSI Reference Model End User Application Process OSI Layer Distributed Information Services Application Services: FTAM, MHS, EDI Application Syntax-Independent Message Interchange Data Representation, Transfer Syntax, Data Transformation Presentation Dialog Synchronization and Control Session Network Independent Message Interchange End-to-End Message Transfer Transport Network Routing and Addressing Network Data Link Control, Error Checking, Framing Link Mechanical and Electrical Interface Physical Physical Connection Data Communications Network
Application Process (AP) to AP Messages Source AP Desintation AP L_DATA.request L_DATA.indication Link Layer PDU’s Source Link Layer Desintation Link Layer Physical Transmission Medium Structure of Protocols
Connectionless Primitives DTE A DTE B App. Process Link Layer Link Layer App. Process DATA.request DATA.indication DATA.request DATA.indication
Connection-Oriented Primitives DTE A DTE B App. Process Link Layer Link Layer App. Process CON.request CON.indication CON.confirm DATA.request DATA.indication DATA.request DATA.indication
Kermit Protocol Structure SOH LEN SEQ TYPE data BCC CR
Kermit Details • SOH = Start of Header • LEN = Number of Bytes in the Frame • SEQ = Sequence Number of the Current Frame
Kermit Details • TYPE = Type of Frame • S: Send Initiation Parameters • F: Filename • D: File Data • Z: End of File • B: End of Transaction • Y: ACK • N: NAK • E: Error (Fatal)
Kermit Details • Data = Contents of Frame • BCC = Block Check Character • CR = End of Block Marker (ASCII CR Character)
User User Kermit Kermit Connect Connect Receive I[0,S,Init] Send (File) ACK[0,Y,Init] I[1,F,Filename] ACK[1,Y] Data Block [1] Sent Data Block [1] Received I[2,D,data] ACK[2,Y] Operation of Kermit Kermit Kermit Call Setup V(R) = 0 V(S) = 0 V(S) = 1 V(R) = 1 V(S) = 2 V(R) = 2 V(S) = 3 V(R) = 3 Time
User User Data Block [1] Sent Data Block [2] Sent Data Block [2] Received Data Block [1] Received I[3,D,data] I[3,D,data] I[2,D,data] NACK[3,N] ACK[2,Y] ACK[3,Y] Operation of Kermit (Error) V(R) = 2 V(S) = 2 Kermit Kermit V(S) = 3 V(R) = 3 V(S) = 4 V(R) = 3 V(R) = 4 Time
User User I[3,D,data] Data Block [1] Sent Data Block [2] Sent Data Block [2] Received Data Block [1] Received I[3,D,data] I[2,D,data] ACK[2,Y] ACK[3,Y] Operation of Kermit (Lost Frame) V(R) = 2 V(S) = 2 Kermit Kermit V(S) = 3 V(R) = 3 V(S) = 4 Timeout V(R) = 4 Time
User User I[3,D,data] ACK[3,Y] Data Block [1] Sent Data Block [2] Sent Data Block [2] Received Data Block [1] Received I[3,D,data] I[2,D,data] ACK[2,Y] ACK[3,Y] Operation of Kermit (Lost ACK) V(R) = 2 V(S) = 2 Kermit Kermit V(S) = 3 V(R) = 3 V(S) = 4 V(R) = 4 Timeout V(R) = 4 Time
User User Data Block [n*] Sent I[n*,D,data] Data Block [n*] Received ACK[n*,Y] I[(n+1)*,Z] EOF EOF ACK[(n+1)*,Y] I[(n+2)*,B] Exit EOT ACK[(n+2)*,Y] Exit Operation of Kermit Kermit Kermit V(S) = n* V(R) = n* Destination Computer Time
SYN SYN SOH Identifier Address STX Text ETX BCC Single Block Message SYN SYN SOH Identifier Address STX Text ETB BCC First of Multiblock Message SYN SYN SOH Identifier STX Text ETB BCC Intermediate of Multiblock Message SYN SYN SOH Identifier STX Text ETX BCC End of Multiblock Message Structure of Bisync Information Frames SYN = Synchronization SOH = Start of Header STX = Start of Text ETX = End of Text ETB = End of Text Block Identifier = Sequence Number of Block
HDLC Frame Format Frame Format 8 8/16 8/16 0 to N 16/32 8 Flag Address Control Information FCS Flag Control Field for Normal Information Frame P/F = Poll/Final Bit N(S) = Send Sequence Number N(R) = Receive Sequence Number 0 N(S) P/F N(R) Control Field for Normal Supervisory Frame S: RR RNR REJ SREJ 0 1 S P/F N(R) Control Field for Normal Information Frame M: Defines 9 Commands and 4 Unnumbered Responses 1 0 M P/F M
I(0,0) RR(1) 1 0 0 1 I(1,0) 2 0 0 2 I(2,0) 3 0 0 3 RR(2) RR(3) Unidirectional Data (ACK and NAK) Sender Receiver (N(S), N(R)) UnACK’ed List V(S) V(R) V(S) V(R) UnACK’ed List 0 0 0 0 N(S) = V(R) => Frame OK 0 - 1 N(S) = V(R) => Frame OK 1,2 N(S) = V(R) => Frame OK 2 -
I(3,0) I(3,0) 3 0 4 0 I(4,0) I(4,0) 5 0 0 0 4 5 REJ(3) RR(5) Unidirectional Data (With Error) Sender Receiver (N(S), N(R)) UnACK’ed V(S) V(R) V(S) V(R) UnACK’ed List 0 3 - 3 N(S) = 4 V(R) = 3 ERROR! 3,4 3,4 N(S) = V(R) => Frame OK N(S) = V(R) => Frame OK -
I(0,0) I(0,1) 1 1 0 1 1 0 1 1 I(1,1) 2 1 1 1 2 3 I(2,1) 3 3 1 2 2 2 3 3 RR(2) I(1,3) Example 2: Bidirectional Data Sender Receiver (N(S), N(R)) UnACK’ed List V(S) V(R) V(S) V(R) UnACK’ed List 0 0 0 0 0 - 0 1 - 1,2 - 1 - -
Modems Error Correction (LAPM) Error Corr- ecting Part (ECP) User Interface Part (UIP) DTE Error Corr- ecting Part (ECP) User Interface Part (UIP) DTE Public Telephone Network Modem (DCE) Modem (DCE)