data link control protocol(2)
DESCRIPTION
Lecture Slides on Data Link Protocols from Chapter 23 of the book Electronic Communications Systems by TomasiTRANSCRIPT
1
Lecture 02Data-Link Protocols
Chapter 23Electronic Communications Sytems , Fifth Editon
By: Wayne Tomasi
ECE @Saint Louis University, Baguio City
Prepared by: Engr. Jeffrey Des B. Binwag
ECE @Saint Louis University, Baguio City 2
CLASSIFICATONS OF DLCP
• CHARACTER ORIENTED PROTOCOLS– Interpret a frame of data as a group of successive
bits combined into predefined patterns of fixed length bits each representing a unique character
– Data frames for these protocols include control characters that convey important information pertaining to DLCP functions
– Also called BYTE ORIENTED Protocols– Examples: X-Modem, Y-Modem, Z-Modem, BLAST,
IBM 83B, IBM BSC
ECE @Saint Louis University, Baguio City 3
CLASSIFICATONS OF DLCP
• BIT-ORIENTED PROTOCOLS– A discipline for serial bit-by-bit information
transfer over a data communications channel– 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 as opposed to a fixed length group of bits
– Examples: SDLC, HDLC
ECE @Saint Louis University, Baguio City 4
CLASSIFICATONS OF DLCP• ASYNCHRONOUS PROTOCOLS– Simple, character oriented protocols generally
used on two-point networks using asynchronous data and asynchronous modems
– Examples: X-MODEM, Y-MODEM, IBM 83B• SYNCHRONOUS PROTOCOLS– Protocols used on point to multi-point networks
using synchronous data and synchronous modems– Examples: IBM BSC, SDLC, HDLC
ECE @Saint Louis University, Baguio City 5
ASYNCHRONOUS DLCP
• XMODEM– Developed by Ward Christiansen in 1979– The first file transfer protocol (FTP) designed as an
asynchronous, character-oriented protocol to facilitate transferring data between two personal computers
– Specifies a half-duplex stop-and-wait protocol using a data frame comprised of four fields
ECE @Saint Louis University, Baguio City 6
ASYNCHRONOUS DLCP• XMODEM PROCEDURAL SEQUENCE
– Destination station sends a negative acknowledgement (NAK) to the source station
– The source sends the first data frame and waits for an acknowledgement
– The destination receives and evaluates the data frame from the source. It responds with an ACK if there is no error or a NAK if an error is detected
– If the source receives an ACK it sends the next frame. If it receives a NAK it retransmits the previous frame. If it does not receive an ACK or a NAK after a predetermined length of time, it times out and retransmits the previous frame
– A single cancel (CAN) character may be used to abort an ongoing transmission
ECE @Saint Louis University, Baguio City 7
ASYNCHRONOUS DLCP
• XMODEM FRAME FORMAT
SOH
CRC
8Bits
8Bits
8Bits
8Bits
Header Field Data Field128 bytes
Fixed length
Error Detection
(8 bits)
(Sequence Number with Complementary Redundancy)
Start of Heading
ECE @Saint Louis University, Baguio City 8
ASYNCHRONOUS DLCP• YMODEM– Similar to XMODEM except for the following:
1. The information field has a 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 NAK characters (Sliding window flow control)
ECE @Saint Louis University, Baguio City 9
SYNCHRONOUS DLCP• BINARY SYNCHRONOUS COMMUNICATION (BSC)– A synchronous character-oriented data-link protocol
developed by IBM– Also called bisync or bisynchronous communication– Each data transmission is preceded by a unique
synchronization character sent twice
ECE @Saint Louis University, Baguio City 10
SYNCHRONOUS DLCP• BSC FRAME FORMAT
SYN Message
Bisync FieldSynchronization Characters
Transmitted in Pairs
SYN
• Poll• Selection• Message• Acknowledgement
• ASCII : 16H (00010110)• EBCDIC : 32H (00110010)
ECE @Saint Louis University, Baguio City 11
BSC POLLING SEQUENCES• GENERAL POLLING SEQUENCE
PAD
• PAD. Pad• Leading Pad (55H or AAH)• Trailing Pad (FFH)
• EOT. End of Transmission• ENQ. Inquiry (Line Turnaround)
SYN
SYN
EOT
PAD
SYN
ENQ
PAD
SPA
SYN
SPA
“ “
• SYN. Synchronization Character• SPA. Station Polling Address• “. General Poll
ECE @Saint Louis University, Baguio City 12
BSC POLLING SEQUENCES• SPECIFIC POLLING SEQUENCE
PAD
• PAD. Pad• Leading Pad (55H or AAH)• Trailing Pad (FFH)
• EOT. End of Transmission• ENQ. Inquiry (Line Turnaround)
SYN
SYN
EOT
PAD
SYN
ENQ
PAD
SPA
SYN
SPA
DA DA
• SYN. Synchronization Character• SPA. Station Polling Address• DA. Device Address
ECE @Saint Louis University, Baguio City 13
BSC POLLING SEQUENCES• POLLING SEQUENCE NEGATIVE ACKNOWLEDGEMENT
• PAD. Pad• Leading Pad (55H or AAH)• Trailing Pad (FFH)
• EOT. End of Transmission• SYN. Synchronization Character
PAD
SYN
SYN
EOT
PAD
ECE @Saint Louis University, Baguio City 14
BSC SELECTION SEQUENCES• SELECTION SEQUENCE
PAD
• PAD. Pad• Leading Pad (55H or AAH)• Trailing Pad (FFH)
• EOT. End of Transmission• ENQ. Inquiry (Line Turnaround)
SYN
SYN
EOT
PAD
SYN
ENQ
PAD
SSA
SYN
SSA
DA DA
• SYN. Synchronization Character• SSA. Station Selection Address• DA. Device Address
ECE @Saint Louis University, Baguio City 15
BSC SELECTION SEQUENCES• SELECTION SEQUENCE POSITIVE ACK
• PAD. Pad• Leading Pad (55H or AAH)• Trailing Pad (FFH)
• SYN. Synchronization Character• DLE. Data Link Escape
PAD
SYN
SYN
DLE
PAD
0
ECE @Saint Louis University, Baguio City 16
BSC SELECTION SEQUENCES• SELECTION SEQUENCE NAK (RVI. Reverse Interrupt)
• PAD. Pad• Leading Pad (55H or AAH)• Trailing Pad (FFH)
• SYN. Synchronization Character• DLE. Data Link Escape
PAD
SYN
SYN
DLE
PAD
6
ECE @Saint Louis University, Baguio City 17
BSC MESSAGE SEQUENCES• MESSAGE SEQUENCE
• PAD. Pad• Leading Pad (55H or AAH)• Trailing Pad (FFH)
• SYN. Synchronization Character• SOH. Start of Heading • STX. Start of Text
• ETX. End of Text • ETB. End of Text Block• May be used in place of ETX
• BCC. Block Check Character• LRC for ASCII• CRC-16 for EBCDIC
PAD
SYN
SYN
SOH Heading
BCC
PAD
STX
ETXMessage
ECE @Saint Louis University, Baguio City 18
BSC MESSAGE SEQUENCES• MESSAGE SEQUENCE POSITIVE ACKNOWLEDGEMENT
PAD
SYN
SYN
DLE
PAD
0
PAD
SYN
SYN
DLE
PAD
1
FOR EVEN-NUMBERED BLOCKS
FOR ODD-NUMBERED BLOCKS
ECE @Saint Louis University, Baguio City 19
BSC MESSAGE SEQUENCES• MESSAGE SEQUENCE NEGATIVE ACKNOWLEDGEMENT
PAD
SYN
SYN
NAK
PAD
• PAD. Pad• Leading Pad (55H or AAH)• Trailing Pad (FFH)
• SYN. Synchronization Character• NAK. Negative Acknowledgement
ECE @Saint Louis University, Baguio City 20
BSC TRANSPARENCY
• A process that disables the BSC controller’s capability to identify data link control characters
• Used for communication with devices that use non-ASCII and non-EBCDIC codes such as those in microprocessor controlled security alarm systems or environmental monitoring systems
• Transparent mode is activated when the STX character is preceded by a DLE
ECE @Saint Louis University, Baguio City 21
OTHER DLE APPLICATIONS1. DLE ETB. Used to terminate all blocks of data
except the final block2. DLE ITB. Used to terminate blocks of transparent
text other than the final block when ITB (end of intermittent block) is used for block-terminating character
3. DLE SYN. With bisync, two SYN characters are inserted in the text in messages lasting more than one second to ensure that the receive controller maintains character synchronization
ECE @Saint Louis University, Baguio City 22
BSC CHARACTER CODESCharacter Hex UseACK0 / ACK1 (Alternating positive acknowledgements)
1070 1061
Indicates that text was received without errors. Also is a positive response (acknowledgement) to an ENQ (bid) on a point-to-point line. In 3780 Bisynchronous Communications, this positive acknowledgement alternates between 1070 (even) and 1061(odd).
DISC (Disconnect) 1037 Indicates a mandatory disconnect on a switched line connection. The station sending this message will disconnect without having to receive confirmation from the receiving station.
DLE (Data Link Escape) 10 Changes the meaning of the control character immediately following the DLE. For example, the sequence DLE EOT indicates that both stations on a switched connection should disconnect from the line.
ENQ (Enquiry) 2D Has the following uses:-- Initiates (bids for) control of transmission on a point-to-point connection-- Indicates the end of a polling or address sequence on a multi-point connection-- Indicates a request for a station to repeat its response (received from target station)-- Indicates that a block of text should be ignored (if the blocks ends with a ENQ)-- Indicates the end of an identification sequence on a switched connection
ECE @Saint Louis University, Baguio City 23
BSC CHARACTER CODESEOT (End Of Transmission) 37 Indicates the end of a transmission for the sending system. This is also sent
when the sending system exhausts its retry limit of sending an ENQ to a remote system without a response.
ETB (End Of Text Block) 26 Indicates the end of a block of data, but not the last block transmitted (more data will be coming from the station that transmits this).
ETX (End Of Text) 03 Indicates the end of a message if ETBs are used (text is transmitted in blocks). Also can indicate the end of the last block of text transmitted (completed text transmission)
ITB (Intermediate Text Block)
1F Divides a block of text into smaller groups of text (Intermediate Text Blocks) for error checking.
NAK 3D Indicates a Not Ready condition (most common), or indicates that an error occurred. Also is sent as a negative response to a line bid or switched line security identification.
Pad (Leading Pad Character)
55 or AA
At least 2 leading pad characters are transmitted to synchronize the clocks at the transmitting and receiving stations.
Pad (Trailing Pad Character)
FF A trailing pad character ensures that all bits of the last character of a message are transmitted.
ECE @Saint Louis University, Baguio City
BSC CHARACTER CODES
24 (END)
RVI (Reverse Interrupt) 107C Transmitted by the receiving station rather than an ACK to indicate a positive acknowledgement and to request that the transmitting station stop transmitting so that the receiving station can transmit. (some people may refer to this as a "turnaround request")
SOH (Start Of Header) 01 Indicates the start of heading information.
STX (Start Of Text) 02 Indicates the start of text.
SYN (Sync) 32 Establishes and maintains character synchronization.
TTD (Temporary Text Delay)
022D Indicates to the receiving station that the transmitting station is temporarily not ready to transmit. (station that transmits this is having an issue)
WACK (Wait Before Transmitting)
106B Transmitted by the receiving station to indicate to the transmitting station a positive acknowledgement and a temporary not-ready-to-receive condition (this is usually recovered by the application at which point the transmission continues).