Escolar Documentos
Profissional Documentos
Cultura Documentos
frame synchronization flow control error control addressing control and data link management
Flow Control
ensure
influenced
by:
transmission time
time taken to emit all bits into medium
propagation time
time for a bit to traverse the link
assume
transmits frame destination receives frame and replies with acknowledgement (ACK) source waits for ACK before sending next one destination can stop flow by not sending ACK works well for a few large frames Stop and wait becomes inadequate if large block of data is split into small frames
= Number of bits that can be present in the link at a time D = Distance or Length of the link V = Velocity of propagation R = Data rate of the link = f (D, V, R) # 200-m optical fiber link operating at 1Gbps, V = 2*108 m/s, B = ? Total time (including ACK) for 8000 bits = ?
B
allows multiple numbered frames to be in transit receiver has buffer W long transmitter sends up to W frames without ACK ACK includes number of next frame expected sequence number is bounded by size of field (k)
receiver can ACK frames without permitting further transmission (Receive Not Ready) must send a normal acknowledge to resume if have full-duplex link, can piggyback ACks
Sliding Window
#
200-m optical fiber link operating at 1Gbps, V = 2*108 m/s, B = ? Total time for frame of 8000 bits (in Stop & wait) = ? 10 s for a frame and ACK. (105 frames / s) With Sliding Window, after every 8 s the sender can send frames. (1.25 * 105 frames / s) => 25 % improvement
common
error detection positive acknowledgment retransmission after timeout negative acknowledgement & retransmission
name for such error control mechanisms, including: stop and wait ARQ go back N ARQ selective reject (selective retransmission) ARQ
source transmits single frame wait for ACK if received frame damaged, discard it
transmitter has timeout if no ACK within timeout, retransmit transmitter will retransmit receiver gets two copies of the frame use alternate frame numbering and ACK0 / ACK1
simple inefficient
Problem
# Computer A and B uses Stop-and-wait ARQ. Distance between them is 4000 KM. Calculate the time needed to receive ACK for a packet (after its transmission) considering speed of light for propagation. For a packet size of 1000 bytes, also find the transmission time with a data rate of 100000 Kbps and the idle time for an entity.
Go Back N
based
on sliding window if no error, ACK as usual use window to control number of outstanding frames 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
Go Back N - Handling
Damaged
Frame
Lost
Frame
or
transmitter times out and send ACK with P bit set which receiver must respond to with RR i
Go Back N - Handling
receiver gets frame i, sends ack (i+1) which is lost acks are cumulative, so next ack (i+n) may arrive before transmitter times out on frame i - OK if transmitter times out, it sends ack with P bit set can be repeated a number of times before a reset procedure is initiated reject for damaged frame is lost handled as for lost frame when transmitter times out
Damaged Rejection
Selective Reject
also called selective retransmission only rejected frames are retransmitted subsequent frames are accepted by the receiver and buffered minimizes retransmission receiver must maintain large enough buffer more complex logic in transmitter hence less widely used useful for satellite links with long propagation delays
Problem
# Draw the sender and receiver windows for Go-back-N ARQ given the following: a) Frame 0 is sent; frame 0 is acknowledged. b) Frames 1 and 2 are sent; frames 1 and 2 are acknowledged. c) Frames 3, 4, and 5 are sent; frame 4 is acknowledged; timer for frame 5 expires. d) Frames 5, 6 and 7 are sent; frames 4 through 7 are acknowledged. (initial window is from 0 to 7 for both entities)
Problem
# Computer A and B uses Go-back-N ARQ. Distance between them is 4000 KM. Calculate the time needed to receive ACK for a packet considering speed of light for propagation. For a packet size of 1000 bytes, also find the transmission time with a data rate of 100000 Kbps and the minimum window size if the idle time for the sending entity is to be zero (assuming error free transmission).
important data link control protocol specified as ISO 33009, ISO 4335 station types:
Primary - controls operation of link Secondary - under control of primary station Combined - issues commands and responses
link
configurations
unbalanced configuration, primary initiates transfer used on multi-drop lines, e.g. host + terminals
balanced configuration, either station initiates transmission, has no polling overhead, widely used unbalanced configuration, secondary may initiate transmit without permission from primary, rarely used
delimit frame at both ends with 01111110 sequence receiver hunts for flag sequence to synchronize bit stuffing used to avoid confusion with data containing flag sequence 01111110
0 inserted after every sequence of five 1s if receiver detects five 1s it checks next bit if next bit is 0, it is deleted (was stuffed bit) if next bit is 1 and seventh bit is 0, accept as flag if sixth and seventh bits 1, sender is indicating abort
# Bit stuff the following data: 0001111110111110011110011111001 Is bit stuffing absolutely necessary in all the cases above?
Address Field
identifies secondary station that sent or will receive frame usually 8 bits long may be extended to multiples of 7 bits
Control Field
Supervisory provides ARQ when piggyback not used Unnumbered - supplementary link control
Control Field
use of Poll/Final bit depends on context in command frame, P bit is set to1 to solicit (poll) response from peer in response frame, F bit is set to 1 to indicate response to soliciting command sequence number usually 3 bits
Field
in information and some unnumbered frames must contain integral number of octets variable length
Frame
used for error detection either 16 bit CRC or 32 bit CRC (for reliability)
HDLC Operation
consists
initialization
by either side, set mode & sequence number
data transfer
with flow and error control using both I & S-frames (RR, RNR, REJ, SREJ)
disconnect
when ready or fault noted
U-Frame:
SABM
010 # Show the three (SABM, UA, DISC) complete frames for HDLC operation example of (a).
Problem
# In a Go-back-N sliding window ARQ, sender received ACK 7. Now frames 7, 0, 1, 2, and 3 are sent. State the significance of receiving (separate scenarios): a) ACK 1 b) ACK 4 c) ACK 3 # For n data packets in stop-and-wait protocol, how many acknowledgements are needed? (n-1, n, n+1)
Problem
# 1-Mbps satellite channel (with 270 ms one way delay) uses 1000-bit frames. Find link utilization for: a) stop-and-wait protocol b) Sliding window with size of 7 c) Sliding window with size of 127 d) Sliding window with size of 255
Summary
introduced
need for data link protocols flow control error control HDLC