Download presentation
Presentation is loading. Please wait.
1
Flow Control zEnsuring the sending entity does not overwhelm the receiving entity yPreventing buffer overflow zTransmission time yTime taken to emit all bits into medium zPropagation time yTime for a bit to traverse the link
2
Model of Frame Transmission
3
Stop and Wait zSource transmits frame zDestination receives frame and replies with acknowledgement zSource waits for ACK before sending next frame zDestination can stop flow by not send ACK zWorks well for a few large frames
4
Fragmentation zLarge block of data may be split into small frames yLimited buffer size yErrors detected sooner (when whole frame received) yOn error, retransmission of smaller frames is needed yPrevents one station occupying medium for long periods zStop and wait becomes inadequate
5
Stop and Wait Link Utilization
6
Sliding Windows Flow Control zAllow multiple frames to be in transit zReceiver has buffer W long zTransmitter can send up to W frames without ACK zEach frame is numbered zACK includes number of next frame expected zSequence number bounded by size of field (k) yFrames are numbered modulo 2 k
7
Sliding Window Diagram
8
Example Sliding Window
9
Sliding Window Enhancements zReceiver can acknowledge frames without permitting further transmission (Receive Not Ready) zMust send a normal acknowledge to resume zIf duplex, use piggybacking yIf no data to send, use acknowledgement frame yIf data but no acknowledgement to send, send last acknowledgement number again, or have ACK valid flag (TCP)
10
Error Detection zAdditional bits added by transmitter for error detection code zParity yValue of parity bit is such that character has even (even parity) or odd (odd parity) number of ones yEven number of bit errors goes undetected
11
Cyclic Redundancy Check zFor a block of k bits transmitter generates n bit sequence zTransmit k+n bits which is exactly divisible by some number zReceive divides frame by that number yIf no remainder, assume no error yFor math, see Stallings chapter 7
12
Error Control zDetection and correction of errors zLost frames zDamaged frames zAutomatic repeat request yError detection yPositive acknowledgment yRetransmission after timeout yNegative acknowledgement and retransmission
13
Automatic Repeat Request (ARQ) zStop and wait zGo back N zSelective reject (selective retransmission)
14
Stop and Wait zSource transmits single frame zWait for ACK zIf received frame damaged, discard it yTransmitter has timeout yIf no ACK within timeout, retransmit zIf ACK damaged,transmitter will not recognize it yTransmitter will retransmit yReceive gets two copies of frame yUse ACK0 and ACK1
15
Stop and Wait - Diagram
16
Stop and Wait - Pros and Cons zSimple zInefficient
17
Go Back N (1) zBased on sliding window zIf no error, ACK as usual with next frame expected zUse window to control number of outstanding frames zIf error, reply with rejection yDiscard that frame and all future frames until error frame received correctly yTransmitter must go back and retransmit that frame and all subsequent frames
18
Go Back N - Damaged Frame zReceiver detects error in frame i zReceiver sends rejection-i zTransmitter gets rejection-i zTransmitter retransmits frame i and all subsequent
19
Go Back N - Lost Frame (1) zFrame i lost zTransmitter sends i+1 zReceiver gets frame i+1 out of sequence zReceiver send reject i zTransmitter goes back to frame i and retransmits
20
Go Back N - Lost Frame (2) zFrame i lost and no additional frame sent zReceiver gets nothing and returns neither acknowledgement nor rejection zTransmitter times out and sends acknowledgement frame with P bit set to 1 zReceiver interprets this as command which it acknowledges with the number of the next frame it expects (frame i ) zTransmitter then retransmits frame i
21
Go Back N - Damaged Acknowledgement zReceiver gets frame i and send acknowledgement (i+1) which is lost zAcknowledgements are cumulative, so next acknowledgement (i+n) may arrive before transmitter times out on frame i zIf transmitter times out, it sends acknowledgement with P bit set as before zThis can be repeated a number of times before a reset procedure is initiated
22
Go Back N - Damaged Rejection zAs for lost frame (2)
23
Go Back N - Diagram
24
Selective Reject zAlso called selective retransmission zOnly rejected frames are retransmitted zSubsequent frames are accepted by the receiver and buffered zMinimizes retransmission zReceiver must maintain large enough buffer zMore complex login in transmitter
25
Selective Reject - Diagram
26
High Level Data Link Control zHDLC zISO 33009, ISO 4335
27
HDLC Station Types zPrimary station yControls operation of link yFrames issued are called commands yMaintains separate logical link to each secondary station zSecondary station yUnder control of primary station yFrames issued called responses zCombined station yMay issue commands and responses
28
HDLC Link Configurations zUnbalanced yOne primary and one or more secondary stations ySupports full duplex and half duplex zBalanced yTwo combined stations ySupports full duplex and half duplex
29
HDLC Transfer Modes (1) zNormal Response Mode (NRM) yUnbalanced configuration yPrimary initiates transfer to secondary ySecondary may only transmit data in response to command from primary yUsed on multi-drop lines yHost computer as primary yTerminals as secondary
30
HDLC Transfer Modes (2) zAsynchronous Balanced Mode (ABM) yBalanced configuration yEither station may initiate transmission without receiving permission yMost widely used yNo polling overhead
31
HDLC Transfer Modes (3) zAsynchronous Response Mode (ARM) yUnbalanced configuration ySecondary may initiate transmission without permission form primary yPrimary responsible for line yrarely used
32
Frame Structure zSynchronous transmission zAll transmissions in frames zSingle frame format for all data and control exchanges
33
Frame Structure Diagram
34
Flag Fields zDelimit frame at both ends z01111110 zMay close one frame and open another zReceiver hunts for flag sequence to synchronize zBit stuffing used to avoid confusion with data containing 01111110 y0 inserted after every sequence of five 1s yIf receiver detects five 1s it checks next bit yIf 0, it is deleted yIf 1 and seventh bit is 0, accept as flag yIf sixth and seventh bits 1, sender is indicating abort
35
Bit Stuffing zExample with possible errors
36
Address Field zIdentifies secondary station that sent or will receive frame zUsually 8 bits long zMay be extended to multiples of 7 bits yLSB of each octet indicates that it is the last octet (1) or not (0) zAll ones (11111111) is broadcast
37
Control Field zDifferent for different frame type yInformation - data to be transmitted to user (next layer up) xFlow and error control piggybacked on information frames ySupervisory - ARQ when piggyback not used yUnnumbered - supplementary link control zFirst one or two bits of control filed identify frame type zRemaining bits explained later
38
Control Field Diagram
39
Poll/Final Bit zUse depends on context zCommand frame yP bit y1 to solicit (poll) response from peer zResponse frame yF bit y1 indicates response to soliciting command
40
Information Field zOnly in information and some unnumbered frames zMust contain integral number of octets zVariable length
41
Frame Check Sequence Field zFCS zError detection z16 bit CRC zOptional 32 bit CRC
42
HDLC Operation zExchange of information, supervisory and unnumbered frames zThree phases yInitialization yData transfer yDisconnect
43
Examples of Operation (1)
44
Examples of Operation (2)
45
Other DLC Protocols (LAPB,LAPD) zLink Access Procedure, Balanced (LAPB) yPart of X.25 (ITU-T) ySubset of HDLC - ABM yPoint to point link between system and packet switching network node zLink Access Procedure, D-Channel yISDN (ITU-D) yABM yAlways 7-bit sequence numbers (no 3-bit) y16 bit address field contains two sub-addresses xOne for device and one for user (next layer up)
46
Other DLC Protocols (LLC) zLogical Link Control (LLC) yIEEE 802 yDifferent frame format yLink control split between medium access layer (MAC) and LLC (on top of MAC) yNo primary and secondary - all stations are peers yTwo addresses needed xSender and receiver yError detection at MAC layer x32 bit CRC yDestination and source access points (DSAP, SSAP)
47
Other DLC Protocols (Frame Relay) (1) zStreamlined capability over high speed packet witched networks zUsed in place of X.25 zUses Link Access Procedure for Frame-Mode Bearer Services (LAPF) zTwo protocols yControl - similar to HDLC yCore - subset of control
48
Other DLC Protocols (Frame Relay) (2) zABM z7-bit sequence numbers z16 bit CRC z2, 3 or 4 octet address field yData link connection identifier (DLCI) yIdentifies logical connection zMore on frame relay later
49
Other DLC Protocols (ATM) zAsynchronous Transfer Mode zStreamlined capability across high speed networks zNot HDLC based zFrame format called “cell” zFixed 53 octet (424 bit) zDetails later
50
Required Reading zStallings chapter 7 zWeb sites on HDLC, frame relay, Ethernet and ATM
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.