Post on 06-Mar-2018
transcript
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Other Data Link Protocols:
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Data Link Protocol CategoriesA protocol in data communications is the set of rules or
specifications used to implement partially a layer or
one or more layers of the OSI model.
Above protocol is used to implement the data link layer
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Asynchronous protocols- treat each character in a bit stream independently
- use start and stop bits to frame the data units
- inexpensive
- used primarily in modems
Synchronous protocols- take the whole bit stream and chop it into characters
of equal size
- faster than asynchronous transmission
Data Link Protocol Categories
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Other Data Link Protocols:
Examples
A: Asynchronous Protocols
X-Modem, Y-Modem, Z-Modem, BLAST, KERMIT
B: Synchronous Protocols
Char Oriented Protocols like BSC
Bit Oriented Protocols like SDLC,HDLC, LAPs
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Asynchronous Protocol XMODEM Frame
Half-duplex stop-and-wait ARQ protocol
SOH –Start of Header (1 byte)
CRC - Cyclic Redundancy Check
Signal from receiver side
- ACK
- NAK
- CAN (cancel)
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Example: Find out the maximum possible channel utilization by X Modem
Asynchronous Protocol, assuming a text file of 100 characters for transmission.
Asynchronous Protocols
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Example:
Text document of 100 characters.
Each character is represented
8 bits per character + 1 Bit Start + 1 Bit Stop = 10 bits.
So for 100 character = 100x10 = 1000 bits.
Ideally we must take 800 bits, but practically we need 1000 bits.
Over head bits are
1000-800=200 bits
In terms of character = 200/8=25 character.
Hence we can say that on behalf of 100 character we are transmitting (100+25)
characters extra.
= (100/125) x 100 = 80 % maximum
Efficiency will further decrease , if we add transmission overhead, Retransmission
etc.
Asynchronous Protocols
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
• YMODEM– similar to XMODEM
– Major differences
• Data unit = 1024 bytes
• CANs = 2
• Follows ITU-T CRC-16 format
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
What is CRC-16 CRC-12…?
• Example:
– CRC-12 = x12+x11+x3+x2+x+1
CRC-16 = x16+x15+x2+1
CRC-CCITT = x16+x12+x5+1
– CRC-16 and CRC-CCITT catch all
• Single and double errors
• Odd number of bit errors
• Bursts of length 16 or less
• 99.997% of 17-bit error bursts
• 99.998% of 18-bit and longer error bursts
CCITT :(Consultative Committee for International Telephony and
Telegraphy)
CRC-16 calculation link
http://www.piclist.com/techref/method/error/quickcrc16.htm
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Features of Blast:
•bit-oriented data encoding
•CRC (cyclic redundancy check) error detection
•a sliding window transmission scheme
•selective retransmission of corrupted blocks
•simultaneous bi-directional data transfer
BLAST (BLocked ASynchronous Transmission), like
XMODEM, it is a communications protocol for file transfer
over asynchronous communication ports and dial-up
modems by ANSI.
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Kermit:
It is ftp by Columbia university
It is a computer file transfer/management protocol.
It provides a consistent approach to file transfer, terminal
emulation, and character set conversion across many
different computer hardware and OS platforms.
Emulation:
Hardware and Software that enables one computer to behave like
another computer.
Terminal emulation: Composed of
CLI: Command line interface
TUI : Text User Interface
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Z Modem:
Telenet funded a project
Application file transfer protocol.
Throughput problems of XMODEM and KERMIT resolved
Reliability over packet switched networks while
preserving XMODEM's simplicity.
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Summary for Asynchronous:
1. Transmission of two extra bits (2 per byte) reduce data
throughput.
2. Synchronization is achieved for each character only.
3. When the sender has no data to transmit (idle line) then
the sender and receiver are NOT synchronized.
4. Asynchronous protocols are suited for low speed data
communications.
Asynchronous transmission, we relied on the start bit to start the motor
and thus begin the preparation to decode the incoming character.
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Synchronous Protocols
Character-oriented protocols (or byte-oriented protocols)
- the frame or packet is interpreted as a series of characters
Bit-oriented protocols
- the frame or packet is interpreted as a series of bits
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Character Oriented Protocol:
BSC (Binary Synchronous Protocols)
Bit Oriented Protocol:
SDLC (Synchronous Data Link Controll)
HDLC (High Data Link Controll)
LAPs (Link Access Procedure Balance)
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Features of Synchronous Protocols:
1. Efficiency is achieved by grouping characters together called BLOCKS
2. No start and stop bits for each character.
3. Send more characters between the start and end sequences.
4. HEDER: start type sequence, prefixes each block of characters.
5. TAIL: A stop type sequence, suffixes each block of characters.
6. An extra ending sequence is added to perform error checking.
7. The tail is expanded to include a check code
8. Group multiple characters into BLOCKS.
9. Developed for High Speed Networks.
No start bit, hence the transmitter sends a special code when it has nothing
to send. To keep the receiver in a state of readiness.
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Character-Oriented
Protocols
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Binary Synchronous
Communication (BSC)
Supports half-duplex transmission
Uses stop-and-wait ARQ flow control and error correction
- the best-known character-oriented protocol
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
BSC
• Half duplex, can be used with ASCII, EBCDIC, and
Six Bit Transcode
• Control information is in the form of code words
taken from the character set(Example..?)
• Control information is carried in separate frames
as well as within data frames
– Line control, flow control, error control
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
BSCData Frames:
S
Y
N
S
Y
N
S
O
H
S
T
X
E
T
X
B
C
C
B
C
CHeader …Data…
SYN: Synchronization Characters, used to alert receiver for
initialization of timing/counter w.r.t the sender.
SOH: Indication of beginning of header.
Header: Includes Address of sender and the Receiver along with
ID of frame number i.e. 0 or 1.
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
BSC
Data Frames:S
Y
N
S
Y
N
S
O
H
S
T
X
E
T
X
B
C
C
B
C
CHeader …Data…
STX: Indicated that the control information is ending and the data is
starting.
ETX: Indicates end of text and start of control character.
BCC: Block Check Count is same as LRC(1 char), or CRC(2 Char)
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Previous Lecture we have seen following topic:
Asynchronous Protocols: X-Modem Y-Modem Z-Modem,
BLAST, KERMIT
Synchronous Protocol:
Character Oriented BSC
Bit Oriented : SDLC HDLC LAP-B
Question 1: While using Character Based Protocol, and using ETX, EOT
Control Characters, do we generate 3 bytes or it is single byte..?
Question 2: How a multi frame transmission is handled in BSC protocol?
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
BSC
• Multiblock frame:
S
Y
N
S
Y
N
S
O
H
S
T
X
I
T
B
B
C
C
B
C
CHeader …Data…
S
T
X
E
T
X
B
C
C
B
C
C…Data…
Block Block
Multi Block: One frame may have multi blocks(Data Field)
inside.
ITB: Intermediate Text Block: Used to separate data fields.
ETX: Is on behalf of all blocks of a frame.
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
BSCMulti-frame transmission:
One block may have multiple data field
Each frame is ended with ETB
For every ETB we get ACK
When the last frame is transmitted then we send ETX
ACK is generated on behalf of ETB as well as ETX
S
Y
N
S
Y
N
S
O
H
S
T
X
I
T
B
B
C
C
B
C
CHeader …Data…
S
T
X
E
T
B
B
C
C
B
C
C…Data…
B
C
C
B
C
C
A
C1
K
S
Y
N
S
Y
N
S
Y
N
S
Y
N
S
O
H
S
T
X
I
T
B
B
C
C
B
C
CHeader …Data…
S
T
X
E
T
X
B
C
C
B
C
C…Data…
B
C
C
B
C
C
A
C0
K
S
Y
N
S
Y
N
End of 4 th data segment, end of second Block , end of first frame
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
BSC• Role of Control Frames:
– Frames used only for signaling
• SYN SYN {Control Characters} BCC
– Connection establishment
– Connection termination (end of transmission)
– Flow and error control(ACK0, ACK1, NAK)
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
BSC• Data Transparency
– When sending binary data, certain information
may be identical to control characters
– Solution: Define transparent blocks and use
character stuffing
– Start transparent text block with DLE STX
– End transparent text block with DLE ETX, DLE
ITB, DLE ETB
– To send DLE character, send DLE DLE
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Bit Oriented Protocol
SDLC HDLC LAP B
Synchronous Data link Control High Data Link Control Link Access Protocol (Balanced);
ISO 3309 ISO 4335
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
What is the role of HDLC …?
General Features:
Provides Frame Format (Standard)
Classifies Systems
Deals with Link configuration(How link is used..?)
Defines mode of transmission (Who will initiate..?)
Flow / Error control
Synchronous Transmission
Bit oriented system
Developed by ISO , examples are ISO 3309 & ISO 4335.
HDLC (High Data Link Protocol)
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
HDLC
3:Supports Three station type 4: HDLC Link Configurations
5: Supports Three Modes of transmission
1:Transmission Details
2: Supports three frame types
Half Duplex and Full Duplex transmission.
Switched and non Switched Channels.
Point to Point and Multipoint Lines.
I frame: Information frame Six fields
S frame: Supervisory frame Five fields
U frame:Unnumbered frame Six fields
Primary
Secondary
Combine
Balance
Unbalance
Symmetric
NRM (Normal Response Mode)
ARM (Asynchronous Response Mode)
ABM (Asynchronous Balance Mode)
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Supports Three station type
Combine Station:
May issue commands and responses
Primary Station:
Controls operation of link
Frames issued are called commands
Maintains separate logical link to each secondary station.
Secondary Station:
Under control of primary station
Frames issued called responses
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
HDLC Link Configuration
One primary and one or more secondary stations
Supports full duplex and half duplex
Two combined stations
Supports full duplex and half duplex
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
HDLC Link Configuration
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Mode of Transmission
(1)Normal Response Mode
•Normal Response Mode (NRM)
Unbalanced configuration
Primary initiates transfer to secondary
Secondary may only transmit data in response to command from primary
Used on multi-drop lines
Host computer as primary
Terminals as secondary
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Mode of Transmission
(2)Asynchronous Balance Mode
•Asynchronous Balanced Mode (ABM)
Balanced configuration
Either station may initiate transmission without receiving permission
Most widely used
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
(3) Asynchronous Response Mode (ARM)
Unbalanced configuration
Secondary may initiate transmission without
permission from primary
Primary responsible for line
Rarely used
Mode of Transmission
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
HDLC Frame Types
I frame: Information frame Six fields
S frame: Supervisory frame Five fields
U frame: Unnumbered frame Six fields.
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Details of HDLC Fields
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Details of HDLC Fields
• Delimit frame at both ends 01111110
• May close one frame and open another
• Receiver hunts for flag sequence to synchronize
• Bit stuffing used to avoid confusion with data containing 01111110
– 0 inserted after every sequence of five 1s
– If receiver detects five 1s it checks next bit
– If 0, it is deleted
– If 1 and seventh bit is 0, accept as flag
HDLC Flag Field
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Flag field is also used for following purposeBreaks a long single frame into multiple frames.
Bit stuffing is used to avoid confusion.
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Bit stuffing and removal process
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
• Identifies secondary stations that sent or will receive frame
• Addressing is done irrespective of , who is sending (Primary or Secondary)
• Usually 8 bits long
• May be extended to multiples of 7 bits
– LSB of each octet indicates that it is the last octet (1) or not (0)
• All ones (11111111) is broadcast
HDLC Address Field
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
HDLC Address Field
Bit streams are;.
00010110 01001010 01101101 00101101 00100100 10110101It is difficult to identify end of last byte of address frame
00010110 01001010 01101100 00101100 00100100 10110101
Address bits
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
• First one or two bits of control filed identify frame type
HDLC Control Field (Used to identify Frame Type)
P/F Poll / Final bit “POLL : To prompt receiver to know what is happening”
N(S) Sequence no of frame sent
N(R) Sequence no of frame expecting
CODE Code for supervisory or unnumbered frame
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Poll/Final
•Application depends on the context
•Command frame (P bit is set)
•Response frame (F bit is set)
Poll
Final
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
HDLC Information Field
•Only in I frame and some U frames
•Variable length
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
HDLC FCS Field
•Error detection
•16 bit CRC
•Optional 32 bit CRC
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
I 0,0
I 1,0
I 0,2
I 2,1
I-frame control field in HDLC
Explanation of N(S) and N(R)
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
S-frame control field in HDLC
I 1,0
REJ , 1
I 1,0
RR, 2
Explanation of CODE field of S-frame
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
11.21 U-frame control field in HDLC
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Table 11.1 U-frame control command and response
Command/response Meaning
SNRM Set normal response mode
SNRME Set normal response mode (extended)
SABM Set asynchronous balanced mode
SABME Set asynchronous balanced mode (extended)
UP Unnumbered poll
UI Unnumbered information
UA Unnumbered acknowledgment
RD Request disconnect
DISC Disconnect
DM Disconnect mode
RIM Request information mode
SIM Set initialization mode
RSET Reset
XID Exchange ID
FRMR Frame reject
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
HDLC Operation
Exchange of
Information frame
Supervisory frames and
Unnumbered frames
Three phase
Initialization
Data transfer
Disconnect
Timing diagram
Link setup & disc
Two way data Exchange
Busy Condition
Reject Recovery
Time out recovery
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Timing Diagram to Explain
1. Link Set up & Disconnect
2. Two Way Exchange of Data
3. Busy Condition
4. Reject Recovery
5. Time out Recovery
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Examples of Operation1: Link Setup and Disconnect
SABM
“T”
SABM
UA
DISC
UA
A B
Identify the frame type
All are U frames
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Examples of Operation2:Two way Data Exchange
I 0,0
I 1,1
I 0,1
I 2,1
I 1,3
I 3,2
I 2,4
I 3,4
RR 4
A B
Identify the frame type
All are I frames
except RR4(S Frame)
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Examples of Operation3:Busy Condition (M/c A is not sending next frame and not receiving further frames from
B
RNR 4 ( Busy)
I 3,0
RR 0,P(Command)
RNR 4,F(Response)
RR 0,P ( Command)
RR 4,F ( Response)
A B
I4,0
Busy
Identify the frame type
I frame as well as S Frame
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Examples of Operation4: Reject Recovery
I 3,0
REJ 4
A B
I 5,0
I 4,0
I 4,0
I 5,0
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Examples of Operation5:Time out Recovery with P/F bits
I 2,0A B
I 3,0RR 3
T
RR 0,P
RR 3,F
I 3,0
RR 4
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering Computer Networks by Prof Kamal K Mehta Associate Professor Department of Computer Science & Engineering SSCET Bhilai (C.G.)
IEEE Protocols
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
IEEE Network Protocols
Computer Networks by Prof Kamal K Mehta Associate Professor Department of Computer Science & Engineering SSCET Bhilai (C.G.)
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Number Topic
802.1 Overview & Architecture of LAN’s
802.2 Logical Link Control
802.3 Ethernet
802.4 Token Bus
802.5 Token Ring ( IBM entry into LAN world)
802.6 Dual queue dual bus( Early metropolitan area Network)
802.7 Technical advise on broadband tech
802.8 Technical advise on fiber optic technology
802.9 Isochroous LAN
802.10 Virtual LAN’s and security
802.11 Wireless LAN’s
802.12 Demand Priority ( Hewlett-Packard’s LAN)
802.13 Unlucky no, No body wanted it.
802.14 Cable modems
802.15 Personal Area Net ( BLUE TOOTH)
802.16 Broad band networks
802.17 Resilience Packet Ring.
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Introduction to the following MAC (Media Access Control) Technique
CSMA /CD: Carrier Sense Multiple Access/Collision Detect
As soon as collision is detected, then protocol will send JAM signal to all other station.
Token Bus:
Token Ring:
DQDB(Dual Queue Dual Bus):
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Two Unwanted situations:
Collision
Congestion
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Function of Media Access Control Sub Layer
1. Provides Access to Shared Media
2. Allow Multiple device to uniquely identify each other in DLL
3. Control of Access to media
4. Detection of Error
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Goal of Media Access Control Sub Layer
1. Initialization: When power on, it will enable all station of enter into
state of readiness.
2. Fairness: Treat each station equally, as per the specification
3. Priority: To assign priority as per the application need.
4. Limitation to one station: Must allow only station at one time
5. Receipt: Ensure reception of packet in only one copy to correct
destination, in correct order.
Computer Networks by Prof Kamal K Mehta Associate Professor Dept of Computer Science & Engineering
Goal of Media Access Control Sub Layer
6. Error Limitation: Protocol must be able to implement suitable Error
handling mechanism
7. Recovery: If 2 packets collides , then it must be able to recover (able to
halt the transmission and select one station to retransmit).
8. Re configurability: Must support addition/deletion of nodes
9. Compatibility: Must support the devices supplied by all vendors.
10. Reliability: Must ensure network operation in spite of failure of one or
more stations.