Top Banner

of 24

DCS_Unit-8

Apr 03, 2018

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/28/2019 DCS_Unit-8

    1/24

    DCS Unit 8 Data-Link Protocols

    1Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    DATA LI NK PROTOCOLS

    Data Link Protocol Functions, Characterand Bit- Oriented Protocols, Data Transmission

    Modes, Asynchronous Data Link Protocols, Synchronous Data Link Protocols,

    Synchronous Data Link Control, High Level Data Link Control

    Computer Networks communicate using protocols, which define the procedures that

    the systems involved in the communications process will use. A data-link protocol is a set of

    rules implementing and governing an orderly exchange of data between layer two devices,

    such as line control units and front-end processors.

    Data-Link Protocol Functions

    Data-link protocol functions include line discipline, flow control, and error control. Line

    discipline coordinates hop-to-hop data delivery where a hop is a computer, a networkcontroller, or some type of network-connecting device, such as a router. Line discipline

    determines which device is transmitting and which is receiving at any point in time. Flow

    controlcoordinates the rate at which data is transported over a link and generally provides

    an acknowledgment mechanism that ensures that data is received at the destination. Error

    controlspecifies a means of detecting and correcting transmission errors.

    Line DisciplineLine discipline is coordinating half-duplex transmission on a data communications network.

    The two fundamental ways that the line discipline is accomplished in a data communications

    network are enquiry/acknowledgement (ENQ/ACK) and poll/select.

    ENQ/ACK: ENQ/ACK line discipline procedures determine which device on a network can

    initiate a transmission and whether the intended receiver is available and ready to receive

    the message. The initiating station begins a session by transmitting a frame of data called an

    enquiry (ENQ), which identifies the receiving station. With half-duplex transmission, it waits

    for a response from the destination station indicating whether it is ready to receive a

    message. If the destination station is ready to receive a message, it responds with a positive

    acknowledgement (ACK), and if it is not ready, it responds with a negative

    acknowledgement (NAK). A negative acknowledgement (NAK) transmitted by the

    destination station in response to an ENQ generally indicates a temporary unavailability, and

    the initiating station will simply attempt to establish a session later. A positiveacknowledgement (ACK) indicates that it is ready to receive data and tells the transmitting

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    2/24

    DCS Unit 8 Data-Link Protocols

    2Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    station that it is free to send its data. All transmitted message frame end with a unique

    terminating sequence, such as end of transmission (EOT), indicating the end of message

    frame. All message frames are acknowledged by either ACK or NAK by the destination

    station. An ACK transmitted in response to a received message indicates that the message

    received without errors and NAK indicates that the message was received with errors and it

    is an automatic request for retransmission of the rejected message.

    Example of ENQ/ACK line discipline

    Station A initiates the session by sending an ENQ to station B. Station B responds

    with a positive acknowledgment (ACK), indicating that it is ready to receive a message.Station A transmits message frame I, which is acknowledged by station B with an ACK. Then,

    Station A transmits message frame 2, which is rejected by station B with a NAK, indicating

    that the message was received with errors. Station A retransmits message frame 2, which is

    received without errors and acknowledged by station B with an ACK.

    Poll/Select: The poll/select method of line discipline works with topologies where one

    device is designated as a primary station and the other devices are secondary stations.

    Whenever multipoint link consists of a primary device and multiple secondary devices using

    a single transmission line, all exchanges must be made through primary device. The primary

    device controls the link; the secondary device follows its instructions. It is up to the primaryto determine which device is allowed to use the channel at a given time. The primary

    therefore is always the initiator of a session. If the primary wants to receive data and send

    data, it applies functions calledpolland selectrespectively.

    A poll is a solicitation sent from the primary station to a secondary station to

    determine if the secondary station has data to transmit. The primary designates a secondary

    as a transmitter with a poll. A selection is when the primary designates a secondary as a

    destination or recipient of data. A selection is also a query from the primary to determine if

    the secondary is ready to receive data. All secondary stations receive all polls and selections

    transmitted from the primary. With poll/select procedures each station is assigned one or

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    3/24

    DCS Unit 8 Data-Link Protocols

    3Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    more addresses for identification. It is up to the secondaries to examine the address to

    determine if the poll or selection is intended for them.

    The primary polls station A, which responds with a negative acknowledgment to a

    poll (NAK), indicating that it received the poll but has no message to send. Then the primary

    polls station B, which responds with a positive acknowledgment to a poll (i.e., a message).

    The primary then selects station B to see if it ready to receive a message. Station B responds

    with a positive acknowledgment to the selection (ACK), indicating that it is ready to receive

    a message. The primary transmits the message to station B. The primary then selects stationC, which responds with a negative acknowledgment to the selection (NAK), indicating that it

    is not ready to receive a message.

    Flow ControlFlow control defines a set of procedures that tells the transmitting station how much data it

    can send before it must stop transmitting and wait for an acknowledgement from the

    destination station. The two common methods of flow control are stop and wait and sliding

    window.

    Stop-and-wait flow control: The sending station sends a frame of data and then waitsfor an acknowledgement from the other station before sending further data. The other

    party can stop the flow of data by simply withholding an acknowledgement. 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. The primary advantage is

    simplicity and the primary disadvantage is speed, as the time lapse between each frame is

    wasted time. Each frame takes essentially twice as long to transmit as necessary because

    both the message and acknowledgement must traverse the entire length of the data link

    before the next frame can be sent.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    4/24

    DCS Unit 8 Data-Link Protocols

    4Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    In the above figure, the source station sends message frame 1, which is acknowledged by

    the destination station. After stopping transmission and waiting for the acknowledgment,

    the source station transmits the next frame (message frame 2). After sending the second

    frame, there is another lapse in time while the destination station acknowledges reception

    of frame 2. The time it takes the source station to transport three frames equates to at least

    three times as long as it would have taken to send the message in one long frame.

    Sliding window flow control: With sliding window flow control, a source station can

    transmit several frames in succession before receiving an acknowledgment. There is only

    one acknowledgment for several transmitted frames, thus reducing the - transmission time

    considerably over the stop-and-wait technique. The term sliding windowrefers to imaginary

    boxes at the source and destination stations with the capacity of holding several frames of

    data. Message frames can be acknowledged any time before the window is filled with data.

    To keep track of which frames have been acknowledged and which have not, sliding window

    procedures require a modulo-n, numbering scheme where each transmitted frame is

    identified with a unique sequence number between 0 and n -1. With a three-bit binary

    numbering scheme, there are eight numbers possible (0, 1, 2, 3,4, 5, 6, and 7), and,

    therefore, the windows must have the capacity of holding n-1 (seven) frames of data.

    Sending window

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    5/24

    DCS Unit 8 Data-Link Protocols

    5Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    Receiving window

    The primary advantage of sliding window flow control is network utilization. With

    fewer acknowledgements, less network time is wasted. The primary disadvantages are

    complexity and hardware capacity (i.e. buffer space).

    Error ControlError control includes both error detection and error correction. Error detection at data-link

    layer can be accomplished with VRC, LRC or CRC and error correction is generally

    accomplished with automatic repeat request (ARQ). With ARQ, any time a transmission

    error is detected, the destination station sends a negative acknowledgment (NAK) back to

    the source station requesting retransmission of the last message frame or frames. ARQ also

    calls for retransmission of mission or lost frames.

    Two types of ARQ exist: stop-and-wait and sliding window. Stop-and-wait frame

    control implements stop-and-wait ARQ and sliding window flow control usually implementsARQ in one of two variants: go-back-n frames or selective reject (SREJ).

    Stop and Wait ARQ

    With go-back-n frames, the destination station tells the source station to go back n

    frames and retransmit all of them, even though all of them do not contain errors. With

    selective reject, the destination station tells the source station to retransmit only the frame

    or frames received in error.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    6/24

    DCS Unit 8 Data-Link Protocols

    6Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    Go-back-n ARQ

    Go-back-n frames is easier to implement, but it wastes more time as most of the

    frames retransmitted were not received in error.

    Selective repeat/Selective reject ARQ

    Selective reject is more complicated to implement, but saves transmission time, as only

    frames that are actually damaged are retransmitted.

    Character- and Bit- oriented Data Link Protocols

    Control information is transmitted by the protocols either in separate control frames or asoverhead added to the data and included in the frame. Data-link protocols are generally

    classified as either character or bit oriented.

    Character-Oriented ProtocolsCharacter-Oriented Protocols interpret a frame of data as a group of successive bits

    combined into predefined patterns of fixed length, usually eight bits each. Each group of bits

    represents a unique character. Control information is included in the frame in the form of

    standard characters from an existing character set, such as ASCII. With COP, unique data

    link control characters such as start of text (STX) and end of text (ETX) perform the same

    action no matter where they occur in the transmission. These are also known as byte-oriented protocols and some of the examples of character-oriented protocols are XMODEM,

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    7/24

    DCS Unit 8 Data-Link Protocols

    7Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    YMODEM, ZMODEM, KERMIT, BLAST, IBMs 83B asynchronous data-link protocol, IBMs

    binary synchronous communications (BSC [bisync]).

    Bit-Oriented ProtocolsA bit-oriented protocol (BOP) is a discipline for serial-by-bit information transfer over a data

    communications channel. Control information is transferred as a series of successive bits

    that may be interpreted individually on a bit-by-bit basis or in groups of several bits rather

    than in a fixed-length group of n bits. Here, there are no dedicated control characters. With

    bit-oriented protocols, the control field within a frame may convey more than one control

    function. BOPs are more efficient than COP and convey more information into shorter

    frames. The most popular examples are synchronous data-link communications (SDLC) and

    high-level data-link communications (HDLC).

    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, sendor return keyis 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 multidrop data communications circuits

    operating in a polling environment.

    Asynchronous Data-Link Protocols

    Asynchronous protocols shown below are used to facilitate communications between two

    personal computers over the public switched network.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    8/24

    DCS Unit 8 Data-Link Protocols

    8Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    XMODEMThe XMODEM protocol was created years ago as a simple means of having two computers

    talk to each other. With its half-duplex mode of operation, ACK/NAK responses and CRC

    data checking, the XMODEM protocol has found its way into many applications. XMODEM

    specifies a half-duplex stop-and-wait protocol using a data frame comprised of four fields.

    The frame format for XMODEM contains four fields, as shown below.

    XMODEM frame format

    The four fields for XMODEM are the SOH field, header field, data field, and error- detection

    field. The first field of an XMODEM frame is simply a one-byte start-of-heading (SOH) field.

    SOH is a data-link control character indicating the beginning of the header. SOH simply

    indicates that the next byte is the first byte of the header. The second field is a two- byte

    sequence that is the actual header for the frame. The first header byte is called the

    sequence number, as it contains the number of the current frame being transmitted. The

    second header byte is simply the 2-s complement of the first byte, which is used to verify

    the validity of the first header byte (this is sometimes called complementary redundancy).

    The next field is the information field, which contains the actual user data. The information

    field has a maximum capacity of 128 bytes (e.g., 128 ASCII characters). The last field of the

    frame is an eight-bit frame check sequence (CRC-8) that is used for error detection.

    The process of transferring data begins when the answer (destination) station sends

    a NAK character to the originate (source) station. Each time the destination station receives

    a data frame, it responds with a NAK or an ACK. When the destination station fails to

    respond to a frame, it is called a time-out, which is treated as an NAK. If the destination

    station wishes to terminate transmissions, it sends a cancel (CAN) signal to the source

    station.

    YMODEMYMODEM is a protocol similar to XMODEM except with the following exceptions:

    1. The information field has a maximum capacity of 1024 bytes.2. Two CAN characters are required to abort a transmission.3. ITU-T-CRC 16 is used to calculate the frame check sequence.4. Multiple frames can be sent in succession and then acknowledged with a single ACK

    or NAKcharacter.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    9/24

    DCS Unit 8 Data-Link Protocols

    9Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    ZMODEMZMODEM is a newer protocol that simply combines the features of XMODEM and YMODEM.

    KERMITKERMIT is a terminal emulation program as well as a file transfer protocol similar to

    XMODEM. KERMIT allows transmitting control characters as text. The control character is

    transformed into a printable character by adding a fixed number to its ASCII code and

    adding# sign at the front. When the receiver detects the # character, it discards it and

    interprets the next character as a control character. In case of transmitting # character, two

    #s are sent.

    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.

    IBMs 83B Asynchronous Data-Link ProtocolIt was one of the first protocols designed for a central-controlled multipoint data circuit with

    a polling environment. Here, the primary station is the host and the remote stations are

    secondaries. The 83B Asynchronous Data-Link Protocol uses vertical redundancy checking

    (character parity) as the error detection technique and either symbol substitution or ARQ

    (retransmission) for error correction.

    Remote stations with the 83B protocol may be in one of four operating modes: line

    monitoring, transmit, receive, or local. In line monitoring mode, the station is neither

    transmitting nor receiving, but monitors messages on the circuit looking for a transmission

    with its polling or selection address. If the station is in transmit mode, it has been

    designated the master and can send formatted messages or acknowledgements. When the

    station is in receive mode, it is selected by the primary and designated as receiver (slave)

    and cane receive formatted messages, polls or acknowledgements from the primary station.

    For a terminal operator to enter information into his or her computer or terminal, it must be

    in the local mode, which can be done by software commands sent from the primary.

    83B polling sequence: The polling sequence for most asynchronous protocols consists

    of one or two data-link control characters and then a station polling address (SPA). A general

    poll using IBMs 83B protocol is the three character sequence shown below:

    The EOT (end of transmission) character is a data-link control character called a clearing

    character and precedes all polling and selection sequences. EOT places all secondary

    stations in line monitoring mode. DC3 (device control three) means several different things

    based on where it occurs. When DC3 follows an EOT, it indicates that the next character is a

    station polling address.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    10/24

    DCS Unit 8 Data-Link Protocols

    10Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    83B responses to polls: Two acknowledgement sequences can be transmitted in

    response to a poll i.e. positive or negative acknowledgement. A positive acknowledgement

    to a poll simply means that the secondary station received the poll and has no messages to

    send, but ready to receive formatted messages. A negative acknowledgement means that

    the secondary station received the poll and has no messages to transmit, but is not ready to

    receive. If the secondary station has a formatted message to send, when its polled, it simply

    responds with the message format shown below

    The EOT and STX (start of text) characters are not part of the message, but are the

    data-link characters inserted by the controller to frame the message. STX indicates that the

    actual message begins with the character immediately following it. The EOT indicates the

    end of message and designates the primary station as the master. Sometimes encoded data

    like date, time, msg no etc have to be transmitted, which is sent as heading information. The

    SOH (start of heading) character used to identify the heading.

    SOH is transmitted first, followed by heading information, STX and then the message,

    terminated by the EOT character.

    83B selection sequence: A primary sends a selection sequence to identify a secondary

    station as a receiver. The selection sequence for the 83B protocol is very similar to polling

    sequence and shown below

    The SSA (is station selection address) identifies the station being selected and the DA

    (device address) identifies the specific device at the designated station.

    83B response to a selection: Once selected, a secondary station must respond with

    one of the three acknowledgement sequences indicating its status. They include

    \ \ Not ready to receive

    * * Not ready to receive (have a formatted message to transmit)

    \ ACK Ready to receive

    More than one secondary station can be selected simultaneously with group or

    broadcast address.

    83B Primary message format: Messages transmitted from primary stations use

    exactly the same data format as messages transmitted from secondary stations as shown

    below:

    ,

    STX, when transmitted by a primary station, is called a blinding character, as it causes allpreviously unselected secondary stations to ignore the transmission.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    11/24

    DCS Unit 8 Data-Link Protocols

    11Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    Synchronous Data-Link Protocols

    Synchronous Data-Link Protocols generally used with synchronous data and synchronous

    modems and can be either character or bit oriented. IBMs binary synchronouscommunications (BSC) is commonly used synchronous data-link protocol.

    Binary Synchronous CommunicationsBSC (sometimes called bisync or bisynchronous communications) is a synchronous

    character-oriented data-link protocol developed by IBM. With BSC, each data transmission is

    preceded by a unique synchronization (SYN) character as shown below:

    The message can be a poll, selection, an acknowledgement or a message containing userinformation. The SYN character for ASCII is 16HEX and for EBCDIC (Extended Binary Coded

    Decimal Interchange Code) is 32HEX. If eight successive bits are received in the middle of a

    message that is equivalent to a SYN character, they are ignored. SYN characters are always

    transmitted in pairs to avoid accidental occurrence of single SYN character in the middle.

    BSC polling sequences: There are two polling formats used with bisync: general and

    specific. The format for general poll is shown below

    The PAD character at the beginning of the sequence is called a leading padand is either a 55hex or an AA hex (01010101 or 10101010). The purpose of the leading pad is to ensure that

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    12/24

    DCS Unit 8 Data-Link Protocols

    12Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    transitions occur in the data before transmission of the actual message. The transitions are

    needed for clock recovery in the receive modem to maintain bit synchronization.

    Immediately following the leading pad are two SYN characters that establish character

    synchronization. The EOT character is again used as a clearing character that places all

    secondary stations into the line-monitoring mode.

    The PAD character immediately following the second SYN character is simply a string

    of successive logic 1s that serves as a time fill, giving each of the secondary stations time to

    clear. The number of logic 1s transmitted during this time fill may not be a multiple of eight

    bits. Consequently, the two SYN characters are repeated to re-establish character

    synchronization. Two station polling address (SPA) characters are transmitted for error

    detection (character redundancy). A secondary will not recognize or respond to a poll unless

    its SPA appears twice in succession. The two quotation marks signify that the poll is a

    general poll for any device at that station that has a formatted message to send. If two or

    more devices have messages to transmit when a general poll is received, the station

    controller determines which devices message is transmitted. This allows the controller toprioritize the devices at the station.

    The enquiry (ENQ) character is sometimes called a format or line turnaround

    character because it simply completes the polling sequence and initiates a line turnaround

    (i.e., the secondary station identified by the SPA is designated the master and must respond

    to the poll). The PAD character at the end of the polling sequence is called a trailing padand

    is simply a 7F (DEL, or delete character). The purpose of the trailing pad is to ensure that the

    RLSD signal in the receive modem is held active long enough for the entire received message

    to be demodulated. If the carrier were shut off immediately at the end of the polling

    sequence, RLSD would go inactive and disable the receive data pin. If the last character thepolling sequence were not completely demodulated, the end of it would be cut off. Trailing

    pads are inserted at the end of all transmissions for the same purpose.

    With BSC, there is a second form of polling sequence called a specific poll. The format for a

    specific poll is the following

    The character sequence for a specific poll is similar to a general poll except that two

    device address (DA) characters are substituted for the two quotation marks. With a specific

    poll, both the station and the device address are included. Therefore, a specific poll is an

    invitation for only one specific device at a given secondary station to transmit its message.

    Again two DA characters are transmitted for redundancy error detection.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    13/24

    DCS Unit 8 Data-Link Protocols

    13Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    BSC Selection sequence: The sequence for a selection is very similar to that of a

    specific poll except two SSA characters are substituted for the two SPA characters.

    SSA stands for station selection address. All selections are specific; they are for a specific

    device at a specific station.

    BSC message sequence: With bisync, formatted messages are sent from secondary

    stations to the primary in response to a poll and sent from primary to secondary stations

    after the secondary has been selected. Formatted messages use the following format:

    The block check character (BCC) is an error detection character and also called asblock check sequence (BCS) as it is simply a sequence of bits used for error detection.

    Longitudinal redundancy check (LRC) is used for error detection with ASCII codes and CRC-

    16 is used for EBCDIC coded messages. The BCC is computed beginning with the first

    character after SOH and continues through and includes ETX character. With synchronous

    protocols, data are transmitted in blocks or frames. End of block (ETB) is used to terminate

    all message blocks except the last one, where ETX is used to terminate the last block of

    messages. The receiving station must acknowledge all BCCs with either a positive or

    negative ack.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    14/24

    DCS Unit 8 Data-Link Protocols

    14Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    BSC transparency: Sometimes data transmitted contains microprocessor op-codes or

    binary encoded data. It is possible that an eight bit sequence could occur within the

    message that is equivalent to a data-link control character. To prevent this from occurring,

    the controller is made transparent to the data. With bisync, a data-link escape (DLE)

    character is used to achieve transparency. To place a controller into transparent mode, STX

    is preceded by DLE and to come out DLE ETX is transmitted. To transmit a bit sequence

    equivalent to DLE as a part of text, it must be preceded by a DLE character (i.e. DLE DLE) is

    transmitted.

    There are only six instances when it is necessary to precede a character with a DLE:

    1. DLE STX2. DLE ETX3. DLE ETB4. DLE ITB5. DLE SYN6. DLE DLE

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    15/24

    DCS Unit 8 Data-Link Protocols

    15Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    Synchronous Data-Link Control

    SDLC is a synchronous bit-oriented protocol developed by IBM for use in system

    network architecture (SNA) environments. SDLC can transfer data simplex, half-duplex, orfull-duplex and can operate over a bus or ring topology. There are two types of stations

    defined by SDLC:primary stations and secondary stations. There is only one primary station

    in an SDLC circuit that controls data exchange on the communications channel and issues

    commands. All the other stations on an SDLC circuit are secondary stations, which receive

    commands and return (transmit) responses to the primary station.

    There are three transmission states with SDLC: transient, idle, and active. The

    transient state exists before and after an initial transmission and after each line turnaround.

    A secondary station assumes that the circuit is in an idle state after 15 or more consecutive

    logic 1s have been received. The active state exists whenever either the primary or one of

    the secondary stations is transmitting information or control signals.

    SDLC Frame FormatFrames transmitted from the primary and secondary use exactly the same format.

    There are five fields included in the SDLC frame.

    SDLC Frame Format

    1. Flag field2. Address field3. Control field4. Information (or text) field5. Frame check character (FCC) field

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    16/24

    DCS Unit 8 Data-Link Protocols

    16Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    SDLC flag field: There are two flag fields per frame each with a length of one byte and

    are the beginning flag and ending flag. Flags are used for delimiting sequence for the frame

    and to achieve frame and character synchronization. The bit sequence for a flag is 01111110

    (7E hex), which is = in EBCDIC code. Several variations of usage of SDLC flags exist:

    SDLC Address Field: The address field for SDLC contains eight bits (thus, 256 addressesare possible). The address 00 hex (00000000) is called the null address and is never-assigned

    to a secondary station. The null address is used for network testing. The address FF hex

    (11111111) is called the broadcastaddress and is common to all secondary stations. The

    primary station is the only station that can transmit the broadcast address. In frames sent by

    the primary station, the address field contains the address of the secondary station (i.e., the

    address of the destination). In frames sent from a secondary station, the address field

    contains the address of the secondary (i.e., the address of the station sending the message).

    The primary station has no address because all transmissions from secondary stations go to

    the primary station.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    17/24

    DCS Unit 8 Data-Link Protocols

    17Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    SDLC information field: All information transmitted in an SDLC frame must be in the

    information field (I field), and the number of bits in the information field must be a multiple

    of eight. An information field is not allowed with all SDLC frames. But, the data within an

    information field can be user information or control information.

    SDLC Control field: The control field is an eight-bit field that identifies the type of frame

    being transmitted. The control field is used for polling, confirming previously received

    frames, and several other data-link management functions. There are three frame formats

    with SDLC: information, supervisory, and unnumbered. With an inf ormation frame, there

    must be an information field, and the information field must contain user data. Information

    frames are used for transmitting sequenced information that must be acknowledged by the

    destination station. The bit pattern for the control field of an information frame is

    A logic 0 in the least-significant bit position identifies an information frame. With

    information frames, the primary can select a secondary station, send formatted

    information, confirm previously received information frames, and poll a secondary station

    with a single transmission. b3 of an information frame is called a poll (P) or not-a-poll(P)

    bit when sent by the primary station and a final (F) or not-a final(F) bit when sent by a

    secondary station. In frames sent from a primary, if the primary desires to poll the

    secondary (i.e., solicit it for information), the P bit in the control field is set (logic 1) or the Pbit is reset (logic 0).

    A secondary cannot transmit frames unless it receives a frame addressed to it with

    the P bit set. When the primary is transmitting multiple frames to the same secondary, b3 is

    logic 0 in all but the last frame. In the last frame, b3 is set, which demands a response from

    the secondary. When a secondary is transmitting multiple frames to the primary, b3 in the

    control field is logic 0 in all but the last frame. In the last frame, b3 is set, which simply

    indicates that frame is the last one in the sequence.

    In an information frame, bits b4, b5, and b6 of the control field are the ns bits, whichare used for numbering transmitted frames (ns stands for number sent). All information

    frames must be numbered. With three bits, the binary numbers 000 through 111(0 through

    7) can be represented. Bits b0, b1, and b2 in the control field are the nr bits, which are used

    to indicate the status of previously received information frames (nr stands for number

    received). The nr bits are used to confirm frames received without errors and to

    automatically request retransmission of information frames received with errors. The nr is

    the number of the next information frame that the transmitting station expects to receive

    or the number of the next information frame that the receiving station will transmit. The nr

    confirms received frames through nr-1. Frame nr-1 is the last information frame received

    without a transmission error.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    18/24

    DCS Unit 8 Data-Link Protocols

    18Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    With supervisory f rames, an information field is not allowed. Supervisory frames can

    be used to confirm previously received information frames, convey ready or busy

    conditions, and for a primary to poll a secondary station when the primary does not have

    any numbered information to send to the secondary. The bit pattern for the control field of

    a supervisory frame is

    A supervisory frame is identified with a 01 in bit positions b6 and b7 respectively.

    With the supervisory format, bit b3 is again the poll/not-a-poll or final/not-a-final bit, and

    b0, b1, and b2 are the nr bits. Therefore, supervisory frames can be used by a primary topoll a secondary, and both the primary and the secondary stations can use supervisory

    frames to confirm previously received information frames. Bits b4 and b5 in a supervisory

    are used to indicate different functions listed below.

    When a primary station sends a supervisory frame with the P bit set and a status of

    ready to receive, it is equivalent to a general poll. Primary stations can use supervisory

    frames for polling and also to confirm previously received information frames without

    sending any information. A secondary uses the supervisory format for confirming previously

    received information frames and for reporting its receive status to the pr imary. An

    information field is prohibited with a supervisory frame, and the REJ command/response is

    used only with full duplex operation.

    An unnumbered fr ameis identified by making both bits b6 and b7 in the control field

    as logic 1s. The bit pattern for the control field of an unnumbered frame is

    With an unnumbered frame, bit b3 is again either the poll/not-a-poll or final/not-a-

    final bit. There are five X bits (b0, b1, b2, b4, and b5) included in the control field of an

    unnumbered frame and are used for various unnumbered commands and responses. With

    five bits available, there are 32 unnumbered commands/responses possible. The controlfield in unnumbered frame sent from a primary station is called a command, and the control

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    19/24

    DCS Unit 8 Data-Link Protocols

    19Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    field in an unnumbered frame sent from a secondary station is called a response. With

    unnumbered frames, there are neither ns nor nr bits included in the control field. Therefore,

    numbered information frames cannot be sent or confirmed with the unnumbered format.

    Unnumbered frames are used to send network control and status information. Some of the

    unnumbered commands and responses are given below:

    1. Unnumbered information (UI): can be a command or a response used to sendunnumbered information. Acknowledged with an unnumbered acknowledgement (UA).

    2. Set initialization mode (SIM): a command that places a secondary stationinto initialization mode. Expected response is unnumbered acknowledgement (UA)

    response.

    3. Request initialization mode (RIM): is a response send by a secondary stationto request the primary to send a SIM command.

    4. Set normal response mode (SNRM): is a command that places a secondary intonormal response mode (NRM).

    5. Disconnect mode (DM): is a response sent by a secondary if primary tries to sendnumbered information when the secondary in sin normal disconnect mode.

    6. Request disconnect (RD): is a response sent by a secondary when it wants theprimary to place it in the disconnect mode.

    7. Disconnect (DISC): is a command that places a secondary in the normal disconnectmode (NDM). Expected response is UA

    8. Unnumbered acknowledgement (UA): an affirmative response that indicatescompliance to SIM, SNRM, or DISC commands.

    9. Frame reject (FRMR): a response for reporting procedural errors.10.TEST: is a command/response is an exchange of frames between the primary station and

    a secondary station.

    Frame check character field: The FCC field contains the error detection mechanism

    for SDLC. Frame check characters are computed on the data in the address, control, and

    information fields.

    SDLC Loop OperationSDLC loop configuration is summarized here:

    1. Primary transmits sequential frames to one or more secondary stations.2. Each transmitted frame contains a secondary stations address.3. After a primary has completed transmitting, it follows the last flag of the frame with

    eight consecutive logic zeros (turnaround sequence) followed by continuous logic

    ones (go-ahead sequence -0111111111 ).

    4. The turnaround sequence alerts secondary stations of the end of the transmissions.5. Each secondary, in turn, decodes the address field of each frame and removes

    frames addressed to them.

    6. Secondary stations serve as repeaters for any down-line secondary stations.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    20/24

    DCS Unit 8 Data-Link Protocols

    20Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    7. Secondary stations cannot transmit frames of their own unless they receive a framewith the P bit set.

    8. The firstsecondary station that receives a frame addressed to it with the P bit setchanges the seventh logic one in the go-ahead sequence to a logic zero, thus

    creating a flag. The flag becomes the beginning flag for the secondary stations

    response frames.

    9. The next down-loop secondary station that receives a frame addressed to it with theP bit set, detects the turnaround sequence, any frames transmitted by other up-loop

    secondary stations, and then the go-ahead sequence.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    21/24

    DCS Unit 8 Data-Link Protocols

    21Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    10.Each secondary stations response frames are inserted immediately after therepeated frame.

    11.The cycle is completed when the primary receives its own turnaround sequence, aseries of response frames, and the go-ahead sequence.

    SDLC loop configure command/response: The configure command/response

    (CFGR) contains a one-byte function descriptor in the information field. A CFGR command is

    acknowledged with a CFGR response. If the low-order bit of the function descriptor is set, a

    specified function is initiated and if it is reset, the specified function is cleared. There are six

    subcommands that can appear in configure command/response function field. They are

    Clear, Beacon test (BCN), Monitor mode, Wrap, Self-test, Modified link test.

    Transparency: With SDLC, the flag bit sequence (01111110) can occur within a frame

    where it is not intended to be a flag. If it happens, the receive controller would misinterpret

    the sequence for a flag, destroying the frame. This could be solved by making the receivertransparent to all data located between the beginning and ending flags. This is called

    transparency and the mechanism used with SDLC is called zero-bit insertion or zero stuffing.

    Here, logic 0 is automatically inserted after any occurrence of five consecutive logic 1s,

    except in a designated flag sequence. When five consecutive logic1s are received and the

    next bit is a 0, the 0 is automatically deleted or removed. If the next bit is 1, it must a valid

    flag.

    Message abort: A message abort is any occurrence of 7 to 14 consecutive logic 1s used

    to prematurely terminate an SDLC frame. This is done only to accommodate high- priority

    messages, such as emergency link recovery procedures.

    Invert-on-Zero Encoding

    With SDLC, transmission and reception of data must be time synchronized to enable

    identification of sequential binary digits. Inver-on-zero encoding, also called NRZI

    (nonreturn-to-zero inverted) is the encoding scheme used with SDLC because it guarantees

    at least one transition in the data for every seven bits transmitted.

    The encoded waveform is unchanged by 1s in the NRZI encoder. But, logic 0s cause

    the encoded transmission level to invert from its previous state (i.e. from high to low or low

    to high). Consequently consecutive logic 0s are converted to an alternating high/low

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    22/24

    DCS Unit 8 Data-Link Protocols

    22Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    sequence. In a NRZI decoder, whenever a high/low or low/high transition occurs in the

    received data, a logic 0 is generated. The absence of transition generates a logic 1.

    High Level Data-Link Control

    In 1975, the ISO defined several sets of substandards that, when combined are high-level

    data-link control (HDLC). HDLC comprises three standards that outline the frame structure,

    control standards, and class of operation for a bit-oriented data-link control (DLC). The three

    standards are discussed below

    ISO 3309 1976 (E)The ISO 3309 standard defines the frame structure, delimiting sequence, transparency

    mechanism, and error-detection method used with HDLC. With HDLC, the frame structure

    and delimiting sequence are same as SDLC. Only change is that HDLC uses CRC-16 for error

    detection with a generating polynomial specified by CCITT V.41. At the receiver end, the

    remainder for an errorless transmission is always FOB8.

    HDLC has extended addressing capabilities and uses an eight bit address field or an

    extended addressing format that is virtually limitless. If b0 in the address field is logic 1, the

    seven remaining bits are the secondarys address. If b0 is logic 0, the next byte is also part of

    the address. If b0 of the second byte is also logic 0, then a third address byte follows and so

    on until an address byte with a logic 1 for the low-order bit is encountered. An example is

    shown below.

    Bit b0 in the first two bytes of the address field are logic 0s, indicating that one or

    more additional address bytes follow. Bit b0 in the third address byte is a logic 1 which

    terminates the address field. There are a total of 21 address bits.

    ISO 4335 1979 (E)The control and information fields have increased capabilities over SDLC and there

    are two additional operational modes allowed with HDLC

    Control field: With HDLC, the control field can be extended to 16 bits. Seven bits are for

    ns, and seven bits are for nr. So, there can be a maximum of 127 outstanding (unconfirmed)

    frames at any given time. Also, the supervisory format includes a fourth status condition:

    selective reject (SREJ). SREJ is identified by two logic 1s in bit positions b 4 and b5 of a

    supervisory control field. With SREJ, a single frame can be rejected and it calls for the

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    23/24

    DCS Unit 8 Data-Link Protocols

    23Mukesh Chinta,Asst Prof, CSE, VNRVJIET

    retransmission of only one frame identified by the three-bit nr code. A REJ calls for the

    retransmission of all frames beginning with frames identified by the three-bit nr code.

    Information field: HDLC permits any number of bits in the information field of an

    information command or response.

    HDLC has two operational modes not specified in SDLC: asynchronous response mode and

    asynchronous disconnect mode:

    1.Asynchronous response mode (ARM):-.With the ARM, secondary stations are allowed to

    send unsolicited responses. To transmit, a secondary does not need to have received a

    frame from the primary with the P bit set. However, if a secondary receives a frame with the

    P bit set, it must respond with a frame with the F bit set.

    2. Asynchronous disconnect mode (ADM):-. An ADM is identical to the normal disconnect

    mode except that the secondary can initiate a DM or RIM response at any time.

    ISO 7809 1985 (E)The ISO 7809 standard combines previous standards 6159 (E) (unbalanced) and 6256

    (E) (balanced) and outlines the class of operation necessary to establish the link-level

    protocol.

    Unbalanced operation: A single primary station is responsible for central control of the

    network. Data transmission may be either half or full duplex. It is logically equivalent to a

    multipoint private-line circuit with a polling environment.

    Balanced operation: It is logically equivalent to a two-point private-line circuit where each

    station has equal data-link responsibilities. Channel access is accomplished through

    contention on a two wire circuit using the asynchronous response mode. Data transmission

    is half duplex on two-wire circuit and full duplex on a four-wire circuit.

    w.jntuworld.com

    www.jntuworld.com

  • 7/28/2019 DCS_Unit-8

    24/24

    DCS Unit 8 Data-Link Protocols

    Assignment Questions

    1 (a). What is synchronous data link control (SDLC)? Describe, in detail, the various fields of

    the SDLC frame format.

    (b) What is the transparency mechanism used with SDLC? Illustrate with an example

    2 (a) What is a data link protocol? List and describe in detail the three data link protocol

    functions

    (b) What are the three frame formats uses with synchronous data link control (SDLC)? What

    are the purposes of: the ns bit sequence, nr bit sequence, P bit and F bit ?

    3 (a) What is line discipline of a data link protocol? Illustrate an ENQ/ACK line discipline

    with an example.

    (b) Compare synchronous data link control (SDLC) and high level data link control (HDLC).

    Describe the HDLC operational modes.

    4 (a) What is the difference between synchronous and asynchronous data link protocols ?

    Explain with neat format, how the XMODEM protocol works

    (b) What is an invert-on zero encoding? Obtain the non return-to-zero inverted (NRZI)

    encoding data stream: 100111001010100010111000111

    5 (a) How do binary synchronous communications achieve transparency?

    (b) Describe the character and block transmission modes

    6 Describe high level data link control

    w.jntuworld.com