William Stallings Data and Computer Communications 8 Edition
William Stallings Data and Computer Communications 8 Edition
Flow Control
Ensuring the sending entity does not
overwhelm the receiving entity
Preventing buffer overflow
Transmission time
Time taken to emit all bits into medium
Propagation time
Time for a bit to traverse the link
Fragmentation
Large block of data may be split into small
frames
Limited buffer size
Errors detected sooner (when whole frame
received)
On error, retransmission of smaller frames is
needed
Prevents one station occupying medium for
long periods
Error Detection
Additional bits added by transmitter for
error detection code
Parity
Value of parity bit is such that character has
even (even parity) or odd (odd parity) number
of ones
Even number of bit errors goes undetected
Error Control
Go Back N (1)
Based on sliding window
If no error, ACK as usual with next frame
expected
Use window to control number of outstanding
frames window size should always be at
least one less than range of sequence
numbers.
If error, reply with rejection
Discard that frame and all future frames until
error frame received correctly
Transmitter must go back and retransmit that
frame and all subsequent frames
Frame i lost
Transmitter sends i+1
Receiver gets frame i+1 out of sequence
Receiver send reject i
Transmitter goes back to frame i and
retransmits
Go Back N - Damaged
Acknowledgement
Receiver gets frame i and send
acknowledgement (i+1) which is lost
Acknowledgements are cumulative, so
next acknowledgement (i+n) may arrive
before transmitter times out on frame i
If transmitter times out, it sends
acknowledgement with P bit set as before
This can be repeated a number of times
before a reset procedure is initiated
Go Back N Diagram
Selective Reject
Also called selective retransmission/ repeat
Only rejected frames are retransmitted
Subsequent frames are accepted by the
receiver and buffered
Minimizes retransmission
Receiver must maintain large enough buffer
More complex login in transmitter
Window size must be no more than half the
range of the sequence numbers
Secondary station
Under control of primary station
Frames issued called responses
Combined station
May issue commands and responses
Balanced
Two combined stations
Supports full duplex and half duplex
Frame Structure
Synchronous transmission
All transmissions in frames
Single frame format for all data and
control exchanges
Frame Structure
Flag Fields
Bit Stuffing
Example with
possible errors
Address Field
Identifies secondary station that sent or will receive
frame
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)
Control Field
Different for different frame type
Information - data to be transmitted to user
(next layer up)
Flow and error control piggybacked on information
frames
Poll/Final Bit
Use depends on context
Command frame
P bit
1 to solicit (poll) response from peer
Response frame
F bit
1 indicates response to soliciting command
Information Field
Only in information and some
unnumbered frames
Must contain integral number of octets
Variable length
FCS
Error detection
16 bit CRC
Optional 32 bit CRC
HDLC Operation
Exchange of information, supervisory and
unnumbered frames
Three phases
Initialization
Data transfer
Disconnect
Required Reading
Stallings chapter 7
Web sites on HDLC