1 / 52

Chapter -8 Data Link Protocols

Chapter -8 Data Link Protocols. Asynchronous Protocols Synchronous Protocols Character-Oriented Protocols Bit-Oriented Protocols. Data Link Control Protocol. INTRODUCTION

ken
Download Presentation

Chapter -8 Data Link Protocols

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter -8Data Link Protocols • Asynchronous Protocols • Synchronous Protocols • Character-Oriented Protocols • Bit-Oriented Protocols

  2. Data Link Control Protocol INTRODUCTION • A set of rules that define the exact format of messages exchanged between computers or between computers and people is called a protocol. • Data link protocols are necessary so that all of the devices on the network are operating by the same set of rules and are able to communicate with each other. • DATA LINK PROTOCOLS FUNCTIONS • Communication startup • Character identification and framing • Message identification The DTE must separate the characters on the communications line into messages. www.gxmu.edu.cn

  3. DATA LINK PROTOCOLS FUNCTIONS • Line Control • The part of a protocol consisting of the rules that specify the way the receiving terminal signals the sending terminal if it has received data correctly, how and under what circumstances the line will be turned around, and whether the receiving terminal can accept more data is called line control. • Error Control The part of the protocol consisting of rules specifying what happens when an error is detected, what to do if communications suddenly and unexplainably cease, and the way communications are reestablished after they are broken is called error control. • Termination The part of a protocol consisting of rules for ending the communications under normal and abnormal circumstances is called termination.

  4. DESIRABLE ATTRIBUTES OF DATA LINK PROTOCOLS • Transparency • The ability of data terminal equipment (DTE) to be able to transmit and receive any bit pattern as data is called transparency . • Code independence The protocol allow the transmission of data from any data coding system. • Efficiency The protocol should use as few characters as possible to control the data transmission so that most of the line capacity can be used for actual data transmission. • PROTOCOL IMPLEMENTION • A data link protocol is implemented by transmitting certain bit patterns or characters on the communications circuit. • PREDETERMINED COMMUNICATIONS PARAMETERS • Predetermined communication parameters are those that are set manually by switches or specified as parameters in software

  5. LINE ACCESS • When two stations on a circuit transmit at the same time, a(n) collision occurs. • There are three primary ways that circuit access can be obtained: • contention • polling, • token passing. • Contention: When any station that has traffic looks to see if the circuit is free, and if it is, begins sending its traffic the line control technique is called contention. • Polling: When a central or control station asks each station on the circuit or network if it has traffic to send it is using a line control technique called polling. • Roll call polling: Roll call polling is the most common implementation of a polling system. In order to know what stations to poll and in what sequence, the master station uses a polling list. • Fast select polling: Fast select polling speeds up the polling process because a slave station that doesn’t have traffic isn’t required to return a character to the master station.

  6. MESSAGE FORMAT Data messages normally consist of three parts: the header, text, and trailer. The header of a message contains and conveys information about the message, such as the destination node’s address, a sequence number, and perhaps a date and time. Message format showing examples of the kinds of control characters the protocol might employ.

  7. FLOW CONTROL • Techniques to ensure that a fast transmitting node does not send data faster than the receiving node can receive and process it are called flow control.Necessary when data is being sent faster than it can be processed by receiver • The simplest, most effective, least expensive, and most commonly used method for transmission error control. • Using retransmission. • Computer to printer is typical setting • Can also be from computer to computer, when a processing program is limited in capacity Stop-and-wait Flow Control: Stop-and-wait Flow Control is the simplest form control. The data flow of stop-and-wait flow control.

  8. Stop-and-Wait Flow Control • Also called Stop-and-Wait Automatic Repeat reQuest (ARQ) • It is the simplest form • Source may not send new frame until receiver acknowledges the frame already sent • Very inefficient, especially when a single message is broken into separate frames, or when the data link is long enough for significant delays to be introduced

  9. Stop-and-Wait ARQ • One frame received and handled at a time • If frame is damaged, receiver discards it and sends no acknowledgment • Sender uses timer to determine whether or not to retransmit • Sender must keep a copy of transmitted frame until acknowledgment is received • If acknowledgment is damaged, sender will know it because of numbering

  10. Sliding WindowFlow Control The flow control technique that allows multiple frames to be in transit on the line at one time is called sliding window. There are two common implementations of sliding window flow control: go-back-n and selective repeat. The data flow in a simple sliding window flow control.

  11. Sliding-Window Flow Control • Also called Continuous ARQ • Allows multiple frames to be in transit • Receiver sends acknowledgement with sequence number of anticipated frame • Sender maintains list of sequence numbers it can send, receiver maintains list of sequence numbers it can receive • ACK (acknowledgement, or RR – Receiver Ready) supplemented with RNR (receiver not ready) Go-Back-N ARQ • Uses sliding-window flow control • When receiver detects error, it sends negative acknowledgment (REJ) • Sender must begin transmitting again from rejected frame • Transmitter must keep a copy of all transmitted frames

  12. Data Transmission Modes • The manner how alphanumeric data characters are transmitted and received between terminals is given by the data transmission modes. • Two modes available are character and block. • Character Mode: Character codes are transmitted asynchronously i.e. whenever the operator depresses a key, the data character is sent from the source to destination station and are displayed on the screen at the current location of cursor. • Block Mode: Here, when operator enters the characters, they are stored in the buffers and displayed on screen. When the operators gets ready to send the information enter, send or return key is pressed, which transmits all the data characters previously entered into the memory. The assortment of characters transmitted as a group is called a block or frame of data. The block mode is more appropriate for multi drop data communications circuits operating in a polling environment.

  13. Figure 11-2 • In general, microcomputer file transfer protocols are used on asynchronous point-to-point circuits, typically across telephone lines via a modem. • XMODEM (132 bytes) • XMODEM-CRC (CRC-8) • XMODEM-1K (CRC+1K blocks) • YMODEM(CRC-16) • ZMODEM (CRC-32) • KERMIT (CRC-24)

  14. ASYNCHRONOUS DATA LINK PROTOCOLS Asynchronous data link protocols deal with individual characters rather than blocks of data. Point-to-Point Protocol(PPP): • A protocol that is primarily used by PC workstations to send IP over dial-up lines, typically when dialing in to an ISP for connection to the Internet, is called PPP. • PPP has largely replaced the SLIP protocol because it has better error detection. PPP’s frame format XMODEM Protocol: • The XMODEM protocol was developed for use between PCs, especially for transfers of data files between them. • Data transmission and control are quite simple with XMODEM protocol.

  15. Y MODEM PROTOCOL • Y MODEM is a protocol similar to the XMODEM except with the following expectations • The information field has a maximum capacity of 1024 bytes • Two CAN characters are required to abort a transmission • ITU-T-CRC 16 is used to calculate the frame check sequence • Multiple frames can be sent in succession and then acknowledged with a single ACK or NAK character. • ZMODEM PROTOCOL: • ZMODEM is a newer protocol that simply combines the features of XMODEM and • YMODEM • BLAST (Blocked Asynchronous Transmission) • The BLAST Session protocol defines a set of rules for file transfer and file management with a remote computer. It features full-duplex transmission and uses sliding window flow control. Other Asynchronous Protocols: • A sophisticated check character at the end of each block of data is called a cyclic redundancy check(CRC).

  16. Asynchronous Transmission Start-stop transmission is a least efficient technology. We need to bundle bytes to reach high efficiency transmissions.

  17. Asynchronous FTP XMODEM FORMAT STX Packet# Checksum 1 byte compliment 1 byte 1 byte Message 128 bytes Packet # 1 byte

  18. Figure 11-3 XMODEM

  19. Asynchronous FTP KERMIT • developed by Columbia University • support a variety of different packet sizes and error detection methods • typically 1000bytes/packet with CRC-24 and adjustable during transmission • uses both stop-and-wait ARQ and continuous ARQ

  20. Figure 11-4 Byte-Count-Oriented protocols

  21. SYNCHRONOUS DATA LINK PROTOCOLS • Synchronous data link protocols typically deal with blocks of data , not individual characters. • The three types are character-oriented protocol, byte-count-oriented protocol and bit-oriented protocols. Character-Oriented Protocols: • A character-oriented protocol uses special characters to indicate the beginnings and ends of messages . The best known character-oriented protocol is the Binary Synchronous Communications Protocol(BSC),also known as BISYNC. • BISYNC is defined to only support the 6-bit trans code (SBT), EBCDIC, and ASCII. Byte-Count-Oriented Protocols: • Byte-count-oriented protocols have a special characters to mark the beginning of the header , followed by a count field that indicates how many characters are in the data portion of the messages. • The best known byte-count-oriented protocol is the Digital Data Communications Message Protocol(DDCMP).

  22. Bit-Oriented Protocols • A bit-oriented protocol uses only one special character , called the flag character. which marks the beginning and end of parts of the message. • The best known bit-oriented protocols are the ISO’s High-Level Data Link Control (HDLC) protocol. • SDLC is a subset of HDLC. • OTHER DATA LINK PROTOCOLSP143 • PROTOCOL CONVERSION • A protocol converter changes one protocol to another, when, for example, a message is sent between two networks that use different protocols.

  23. Figure 11-5

  24. Figure 11-6 Simple Frame

  25. Figure 11-7 A Frame with Header

  26. Figure 11-8 Multiblock Frame

  27. Multiframe Transmission Figure 11-9

  28. Figure 11-10 Control Frame

  29. Figure 11-11 Control Frames

  30. Figure 11-11-continued Control Frames

  31. Figure 11-11-continued Control Frames

  32. Figure 11-12 Byte Stuffing

  33. High-Level Data Link Control (HDLC) • The OSI’s data link protocol • A bit-oriented protocol • On transmitting side, HDLC receives data from an application, and delivers it to the receiver on the other side of the link • On the receiving side, HDLC accepts the data and delivers it to the higher level application layer • Both modules exchange control information, encoded into a frame • (IBM’s SDLC has similar features and the format of HDLC)

  34. HDLC Frame Structure • Flag: 01111110, at start and end • Address: secondary station (for multi drop configurations) • Information: the data to be transmitted • Frame check sequence: 16- or 32-bit CRC • Control: purpose or function of frame • Information frames: contain user data • Supervisory frames: flow/error control (ACK/ARQ) • Unnumbered frames: variety of control functions

  35. Transparency Problem • The problem of transparency • Because HDLC uses 01111110 to mark the start and end of a packet, the character “01111110” will confuse the receiver. • Solution - Bit Stuffing • Add a 0 after every five 1s at sender side and delete the 0 at receiver side.

  36. HDLC Operation • Initialization: S-frames specify mode and sequence numbers U-frames acknowledge • Data Transfer: I-frames exchange user data, S-frames acknowledge and provide flow/error control • Disconnect: U-frames initiate and acknowledge

  37. Error Detection • It is possible to develop data transmission methodologies that give very high errordetection and correction performance. • The only way to do error detection and correction is to send extra data with each message. • In general, the larger the amount of error detection data sent, the greater the ability to detect an error. • There are three common error detection methods. • Parity Checking • Longitudinal redundancy checking • Polynomial checking • Checksum • Cyclic Redundancy

  38. Error Correction • A receiver that detects an error simply asks the sender to retransmit the message until it is received without error. • Lost frame • Damaged frame • With Stop and Wait ARQ the sender stops and waits for a response from the receiver after each message or data package. • Responses are: • Error detection • Positive acknowledgment (ACK) • Negative acknowledgment and retransmission (NAK) • Retransmission after time-out

  39. Error Correction via Retransmission • With Continuous ARQ the sender does not wait for acknowledgement before sending next message. If it receives an REJ, it retransmits the needed messages. • The packets that are retransmitted may be only those containing an error (called Link Access Protocol for Modems (LAP-M)), or may be the first packet with an error and all those that followed it (call Go-Back-N ARQ) • Continuous ARQ is a full-duplex transmission technique.

  40. Packet Loss • How it could be? Two possibilities: • The receiver did not receive the packet • The sender did not receive the ACK message • What can we do with packet loss? • Use “Time-out” to detect packet loss • Re-send the packet if there is a “time-out”

  41. *Forward Error Correction Forward error correction uses codes containing sufficient redundancy to prevent errors by detecting and correcting them at the receiving end without retransmission of the original message. • Hamming code is capable of correcting 1 bit error. • More sophisticated techniques, such as Reed-Solomon, are commonly used. • commonly used in satellite transmission. • Chip implementations of FEC has been used in modems, e.g. V.34.

  42. Error Detection: Parity Bits • Bit added to each character to make all bits add up to an even number (even parity) or odd number (odd parity) • Good for detecting single-bit errors only • High overhead (one extra bit per 7-bit character=12.5%)

  43. Parity Checking One of the oldest and simplest method, parity checking adds 1 additional bit to each byte in the message. The value of this parity bit is dependent on the number of 1’s in each byte transmitted. Even parity causes the sum of all bits (including the parity bit) to be even. Odd parity causes the sum to be odd. Unfortunately if two bits are erroneous, the parity checking will fail. Parity checking results in about a 50% reliability rate.

  44. Parity Checking Assume we are using even parity with 7-bit ASCII. The letter V in 7-bit ASCII is encoded as 0110101. Because there are four 1s (an even number), parity is set to zero. This would be transmitted as: 01101010. Assume we are using odd parity with 7-bit ASCII. The letter W in 7-bit ASCII is encoded as 1010111 (Oct127). Because there are five 1s (an odd number), parity is set to zero. This would be transmitted as: 10101110.

  45. Longitudinal Redundancy Checking (LRC) LRC was developed to overcome the problem with parity’s low probability of detection. LRC adds one additional character, called the block check character (BCC) to the end of the entire message or packet of data. The value of the BCC is calculated much like the Parity bit, but for the entire message. Results in a 98% reliability rate.

  46. Longitudinal Redundancy Checking For example, suppose we were to send the message “DATA” using odd parity and LRC with 7-bit ASCII: Letter D A T A BCC ASCII 1000100 1000001 1010100 1000001 1101111 Parity bit 1 1 0 1 1 (Note that the parity bit in the BCC is determined by parity, not LRC.)

More Related