12.07.2015 Views

Data Link Protocols Asynchronous Protocols XMODEM frame ...

Data Link Protocols Asynchronous Protocols XMODEM frame ...

Data Link Protocols Asynchronous Protocols XMODEM frame ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Data</strong> <strong>Link</strong> <strong>Protocols</strong><strong>Data</strong> <strong>Link</strong> <strong>Protocols</strong>ผศ.ดร. อนันต ผลเพิ่มAsst.Prof. Anan Phonphoem, Ph.D.anan@cpe.ku.ac.thhttp://www.cpe.ku.ac.th/~ananComputer Engineering DepartmentKasetsart University, Bangkok, Thailand<strong>Asynchronous</strong><strong>Protocols</strong>• Xmodem• Ymodem• Zmodem• BLAST• KermitCharacter-orientedSynchronous<strong>Protocols</strong>Bit-oriented<strong>Asynchronous</strong> <strong>Protocols</strong><strong>XMODEM</strong> <strong>frame</strong>• Long, long…time ago• Not complex and easy to implement• Slow• Required start/stop bit and space• Now mainly used in modem• Replaced by high speed synchronousHalf-duplex, stop-and-wait ARQ protocol3of 534of 53<strong>Asynchronous</strong><strong>Protocols</strong>• Xmodem• Ymodem• Zmodem• BLAST• Kermit<strong>Data</strong> <strong>Link</strong> <strong>Protocols</strong>Character-oriented(Byte-oriented)• BSCSynchronous<strong>Protocols</strong>Bit-orientedSynchronous <strong>Protocols</strong>• Character-oriented protocol• Based on one byte (8-bit)• Use ASCII for control character• Not efficient seldom used• Bit-oriented protocol• Based on individual bits• One or multiple bits for control• More efficient6of 531


IBM’s Binary SynchronousCommunication (BSC)• Character-oriented protocol• Half-duplex, stop-and-wait ARQ• 2 <strong>frame</strong> types• <strong>Data</strong> <strong>frame</strong>(data transmission)• Control <strong>frame</strong>(connect/disconnect and flow/error control)A simple BSC data <strong>frame</strong>SYN = Synchronous idle = 0010110STX = Start of text = 0000010ETX = End of text = 00000117of 538of 53A BSC <strong>frame</strong> with a headerA multiblock <strong>frame</strong>Header Fields:• address (sender/receiver)• #<strong>frame</strong> identifier (0/1 for stop-and-wait ARQ)ITB = Intermediate text block9of 5310 of 53Multi<strong>frame</strong> transmissionControl <strong>frame</strong>ETB = End of transmission Block11 of 53Note: Control Frame is used to send command* Establish connection* Maintaining flow & error control* terminating connection12 of 532


Control <strong>frame</strong>sControl <strong>frame</strong>s13 of 5314 of 53Control <strong>frame</strong>s<strong>Data</strong> Transparency• BSC is designed for text message• Now, non-text message (graphics,…)• Problem?• BSC control character problem• <strong>Data</strong> transparency: should be able tosend any data15 of 5316 of 53Byte stuffing<strong>Data</strong> <strong>Link</strong> <strong>Protocols</strong><strong>Asynchronous</strong><strong>Protocols</strong>Synchronous<strong>Protocols</strong>• Xmodem• Ymodem• Zmodem• BLAST• KermitCharacter-oriented(Byte-oriented)Bit-orientedDLE = data link escape17 of 53• BSC18 of 533


Bit-oriented protocol• Represent more information into shorter<strong>frame</strong>• Avoid the transparency problemsBit-oriented<strong>Protocols</strong>SDLC HDLC LAPs LANsSDLC: Synchronous data link control – IBMHDLC: High-level data link control – ISOLAPs : <strong>Link</strong> access procedure19 of 53HDLC• Support half/full – duplex over point-topointand multipoint links• HDLC system characterization• Station types• Configurations• Communication modes• FramesHDLC station types• Primary station• The station that controls the medium by sending“command”• Secondary station• The station that “response” to the primary station• Combined station• The station that can both command and response21 of 5322 of 53HDLC configurationsHDLC Configurations:Unbalanced (master/slave)• The relationship of hardware devices ona link• 3 configurations of all stations(primary/secondary/combined)• Unbalanced• Symmetrical• Balanced23 of 5324 of 534


HDLC Configurations:SymmetricalHDLC Configurations:Balanced25 of 5326 of 53HDLC communication modesMode : describe “Who controls the link”NRM: Normal response mode (master/slave)ARM: <strong>Asynchronous</strong> response mode(secondary can initiate if idle, all transmissions are made to primary station)ABM: <strong>Asynchronous</strong> balanced mode (point-to-point equal)27 of 53HDLC <strong>frame</strong>• 3 <strong>frame</strong> types• Information <strong>frame</strong> (I-<strong>frame</strong>)• Supervisory <strong>frame</strong> (S-<strong>frame</strong>)For ACK, Flow/Error controls• Unnumbered <strong>frame</strong> (U-<strong>frame</strong>)For Mode setting, Initialize, Disconnect28 of 53HDLC FrameHDLC Frame29 of 5330 of 535


HDLC Frame: Flag fieldBit Stuffing• How to differentiate data and flag?• Adding one extra 0 whenever there are fiveconsecutive 1s in the data31 of 5332 of 53HDLC: Bit stuffingHDLC <strong>frame</strong>: Address field• Primary station creates a <strong>frame</strong> destination address• Secondary station creates a <strong>frame</strong> source address• Can be one byte or more33 of 5334 of 53HDLC Frame: Address fieldHDLC Frame: Control field35 of 5336 of 536


HDLC <strong>frame</strong>: Poll / FinalHDLC Frame: Information field37 of 5338 of 53HDLC Frame: FCS fieldHDLC: S-FrameFCS: Frame check sequence39 of 5340 of 53HDLC: Use of P/F fieldHDLC: Use of P/F fieldPiggybacking:data + ack41 of 5342 of 537


HDLC: Use of P/F fieldHDLC: Use of P/F field43 of 5344 of 53HDLC: S-FrameAcknowledgementHDLC: S-FramePositive Acknowledgement• RR• Receiver sends “Positive Ack” (no data to send)• N(R) = seq of next <strong>frame</strong>• RNR• Receiver sends “Positive Ack”• N(R) = seq of next <strong>frame</strong>• Receiver tells sender that sender cannot send any<strong>frame</strong> until ‘RR’ <strong>frame</strong> is received45 of 5346 of 53HDLC: S-FrameNegative AcknowledgementHDLC: U-Frame control field• Reject (REJ)• Go-back-n ARQ• N(R) = # of damage <strong>frame</strong> (and follow)• Selective-Reject (SREJ)• N(R) = # of damage <strong>frame</strong>For session management and control information47 of 5348 of 538


HDLC: U-Frame control fieldHDLC: Polling example49 of 5350 of 53HDLC: Selecting exampleHDLC: Peer-to-peer example51 of 53SABM: Set asynchronous balanced modeUA: Unnumbered ack52 of 53HDLC: Peer-to-peer example53 of 539

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!