Upload
madhumita-tamhane
View
219
Download
0
Embed Size (px)
Citation preview
DATA COMMUNICATION PROTOCOLS in Centralised Networks (in Master/slave environment)
DATA COMMUNICATION PROTOCOLS in Centralised Networks (in Master/slave environment)
✓Set of rules governing orderly exchange of information. ✓LCU controls the flow of data between application programs and
remote terminal. ✓Set of rules LCU follows are called Data Link Protocols. ✓Polling: An invitation from primary to secondary to transmit
message. ✓ A secondary can not poll a primary.
✓Selection: When primary has a data to send to a secondary, it identifies the secondary by ‘selecting’ it.
✓ It is interrogation of secondary to determine its status ✓ - whether ready to receive a message or not. ✓ Secondary can not select a primary.
✓Secondary transmits to primary only, while primary transmits to all.
Asynchronous Protocols
✓Use asynchronous data format and asynchronous modems. ✓Character oriented protocols. ✓Like ‘end of transmission (EOT)’ and ‘start of text (STX). ✓Character occurring anywhere can not be anything but mean the
action designated to them. ✓ e.g. 04H (EOT) if received by secondary , it clears all operations
and comes into line-monitor mode. ✓Data link characters must never occur in data. ✓Secondary station limited to single terminal/printer pair. ✓Commonly used protocols are:
✓ Bell System’s SELECTIVE CALLING SYSTEM(8A1/8B1). ✓ IBM’s ASYNCHRONOUS DATA LINK PROTOCOLS(83B).
Asynchronous Protocols
✓Polling Sequence: !!!
✓3 character sequence. ✓EOT-
✓ a clearing character, clears all actions of secondary. ✓ Precedes all polling sequences. ✓ Brings all secondaries in line monitor mode.
✓DC3 – ✓ Indicates that next character is the polling address of station. !
✓A , the polled secondary, must respond now.
E O T
D C 3
A ASCII Codes
EOT – End of transmission – 00000100 – 04H
DC3 – Device control 3 -- 00010011 - 13H
Acknowledgement sequences to Polling
✓ 1. !✓ No message to transmit but ready to receive. !!
✓2. !✓ No message to transmit, not ready to receive either. !
!✓3. Formatted data sent
\ \
\A C K
Asynchronous Protocols
✓Selection Sequence: !!!
✓2 character sequence. ✓EOT-
✓ A clearing character, clears all actions of secondary. ✓ Precedes all selection sequences. ✓ Brings all secondaries in line monitor mode.
✓X , the selected secondary, must respond now.
E O T
X
Acknowledgement sequences to Selection
✓ 1.Ready to receive.
!!
!✓ 2.Not ready to receive. Terminal in local or printer mode
!!!
✓ 3. Not ready to receive but has a formatted data to transmit.
\ \
\A C K
* *
Message format
!!!✓SOH is start of header. ✓Header can include special data e.g. date, time, message number,
message priority till STX is received. ✓STX is start of text.
✓ It terminates header and starts data. ✓STX blinds other stations to the data. Only EOT can bring them to line
monitor mode.
S O H
HeadingS T X
MessageE O T
Message format-
Acknowledgement to message
A C K
1. Acknowledged. No error--
N A K
2. Not Acknowledged. Message has error
C A N
3. Cancel or abort transmission
Asynchronous Protocols – TYPES XMODEM
✓By Ward Christiansen in 1979. ✓FTP for telephone line communication between PC’s. ✓Half Duplex. ✓Stop/wait ARQ. ✓Message divided into characters. ✓Each character contains start bit and stop bits. ✓CRC for data only. ✓CAN sent to abort transmission.
SOH CRC
Header 128 bytes data
Start bit Stop bit
Asynchronous Protocols – TYPES YMODEM
✓Same as XMODEM except… ✓Data 1024 bytes. ✓2 CAN sent to abort transmission. ✓2 Bytes CRC-16. ✓Multiple frames can be sent simultaneously.
!!!
✓Exercise: Find details for other asynchronous modems and submit.
Synchronous Protocols!!
✓Use synchronous data format and synchronous modems. ✓Can be Character oriented protocol or Bit oriented protocol. ✓ Secondary station LCU can serve up to 50 terminal/printer pair. ✓Commonly used protocols are: ✓Character oriented protocol –
✓ e.g. IBM’s 3270 Binary Synchronous Communication Protocol(BSC or Bisync).
✓Bit oriented protocol – ✓ e.g. IBM’s Synchronous Data Link Communication
Protocol(SDLC).
IBM’s Bisync Protocol (BSC)
!!
✓Point to point or multipoint. ✓Half duplex mode using stop and wait ARQ and flow
control. ✓Does not support full duplex mode or sliding window
protocol. ✓Bisync because sync characters are sent in pair.
IBM’s Bisync Protocol (BSC)!!!!!
✓PAD in beginning is called leading pad. ✓PAD can be 55H(01010101) or AAH(10101010). ✓Used for CLK recovery at receiver for bit synchronization.
!✓2 SYNC characters required for CLK recovery at receiver
for character synchronization. ✓SYNC can be 16H in ASCII ( 00010110)
OR 32H in EBCDIC repeated twice.
P A D
S Y N
S P A
S P A
S Y N
E O T
P A D
S Y N
S Y N
P A D
E N Q
“ “General Polling Sequence
IBM’s Bisync Protocol (BSC)!!!!!
✓EOT, a clearing character, brings all secondaries to line monitor mode.
!✓PAD is all 1’s string, gives enough time to secondaries to
clear their assignments and come to line monitor mode.
!✓2 SYNC characters available further to synchronize if PAD
disturbs synchronization.
P A D
S Y N
S P A
S P A
S Y N
E O T
P A D
S Y N
S Y N
P A D
E N Q
“ “General Polling Sequence
IBM’s Bisync Protocol (BSC)!!!!!
✓SPA will hold secondary station’s polling address in ASCII. ✓Transmitted twice to avoid any spurious sequence
initiating a poll. ✓Each secondary has unique SPA. ✓ “ is used as it is twice to indicate that it is a general poll. ✓Any device connected to secondary can transmit the data.
(keyboard, Scanner etc.) ✓If more than one ready, secondary’s LCU decides the
transmitter.
P A D
S Y N
S P A
S P A
S Y N
E O T
P A D
S Y N
S Y N
P A D
E N Q
“ “General Polling Sequence
IBM’s Bisync Protocol (BSC)!!!!!
✓ENQ – request for response – format line turn around character is an enquiry character.
✓Ending polling sequence, primary now wants a response. ✓H/D transmission. ✓ PAD at end is trailing pad. ✓7FH or DEL character. ✓Ensures that RLSD is kept active long enough for the DTE
to receive all character correctly from DCE. ✓Low RLSD will eliminate carrier and RD pin will be inactive.
P A D
S Y N
S P A
S P A
S Y N
E O T
P A D
S Y N
S Y N
P A D
E N Q
“ “General Polling Sequence
IBM’s Bisync Protocol (BSC)!!!!
!
✓It is not general poll, hence “ is not used. ✓A specific device with address mentioned in field DA ,
under station with address mentioned under SPA, is polled.
P A D
S Y N
S P A
S P A
S Y N
E O T
P A D
S Y N
S Y N
P A D
E N Q
D A
D A
Specific Polling Sequence
IBM’s Bisync Protocol (BSC)!!!!
✓Station polling address is replaced by station selection
address. ✓Selection is always specific. ✓It is for the station to divert the incoming data to
appropriate device.
P A D
S Y N
S S A
S S A
S Y N
E O T
P A D
S Y N
S Y N
P A D
E N Q
D A
!D A
Selection Sequence
IBM’s Bisync Protocol (BSC) Acknowledgement to polling!
!!!!
✓Handshake is negative acknowledgement to polling. ✓It has no formatted data to transmit.
P A D
S Y N
S Y N
E O T
P A D
1. Handshake
IBM’s Bisync Protocol (BSC) Acknowledgement to polling
!!!!!
✓Data 128 bytes minimum. ✓BCC is block check sequence. ✓1 byte LRC for ASCII or 2 bytes CRC for EBCDIC. ✓BCC is done between SOH and ETX, excluding the two.
P A D
S Y N
S Y N
S O H
header
2. Formatted Message
S T X
Data
P A D
B C C
E T X
IBM’s Bisync Protocol (BSC) Acknowledgement to polling
!!!!!!!
✓ Message can be broken into Multiple blocks and accommodated in one frame.
✓ ITB - intermediate text block.
✓ BCC done on smaller blocks is always preferred.
✓ Finally frame will be terminated by ETX.
Multi-block frame
P A D
S Y N
S Y N
S O H
header
S T X
Data
S T X
B C C
I T B
Data
P A D
B C C
E T X
IBM’s Bisync Protocol (BSC) Acknowledgement to polling
!!!!!!!!
✓If message too long to accommodate in one frame. ✓Multiple frames transmitted. ✓All frames except last, will be terminated in ETB.( More to come) ✓Last frame terminated in ETX.(End of message)
Multi-frame block
P A D
S Y N
S Y N
S O H
header
S T X
Data
S T X
B C C
I T B
Data
P A D
B C C
E T B
P A D
S Y N
S Y N
S O H
header
S T X
Data
S T X
B C C
I T B
Data
P A D
B C C
E T X
ACK More frames and ACK…
IBM’s Bisync Protocol (BSC) Acknowledgement to selection
!!!!!!
✓ Ready to receive first frame using ACK0.
✓ DLE is data link escape character.
✓ DLE 0 will be taken as number 0.
✓ ASCII for ACK0 is DLE and 0
P A D
S Y N
S Y N
D L E
0
1. Positive acknowledgement
P A D
IBM’s Bisync Protocol (BSC) Acknowledgement to selection
✓ 2.Negative acknowledgement- not ready to
receive
P A D
S Y N
S Y N
N A K
P A D
P A D
S Y N
S Y N
D L E
3.Reverse Interrupt (RVI) – Not ready to receive, but has urgent message to transmit.
<P A D
IBM’s Bisync Protocol (BSC) Acknowledgement to DATA
!!!!!!!!!!
✓Stop and wait error control. ✓DLE0 for all even frame correct reception. ✓DLE 1 for all odd frames correct reception.
1.Positive acknowledgement- No error
P A D
S Y N
S Y N
D L E
0P A D
P A D
S Y N
S Y N
D L E
1P A D
or
2. Negative acknowledgement- Error
P A D
S Y N
S Y N
N A K
P A D
IBM’s Bisync Protocol (BSC) Some more on BISYNC
1.Point to point connection asked
S Y N
S Y N
E N Q
2.Wait and ACK- ACK but not ready to receive more.
S Y N
S Y N
W A C K
3.Temporary delay S Y N
S Y N
T T D
4.Connection termination
S Y N
S Y N
E O T
TRANSPARENCY
✓LCU look-alike characters appearing in data force the LCU to go into control mode.
✓Data 03H appearing in data block will be taken as ETX and block will be terminated at receiver.
✓LCU is made transparent to data by DLE(Data link escape). ✓LCU will not search for data link control characters in the block of
data encapsulated by 2 DLE’s. ✓DLE STX places LCU in transparent mode. ✓DLE ETX, DLE ITB, and DLE ETB brings LCU out of transparent
mode. ✓DLE DLE if ASCII of DLE appears in data. ✓DLE SYN used only with transparent messages more than 1second
long. Two SYN characters to ensure character synchronization at receiver.