Download presentation
Presentation is loading. Please wait.
Published byPearl Harris Modified over 8 years ago
1
HDLC High-level Data Link Control
2
10/1/2016 Telecom & Management SudParis 2 Summary ● Overview and features ● The frame structure
3
10/1/2016 Telecom & Management SudParis 3 Overview ● Synchronous ● Bit-oriented ● Full duplex ● Transparent ● Point-to-point or multipoint links
4
10/1/2016 Telecom & Management SudParis 4 Features ● One frame structure ● Several elements of procedure
5
10/1/2016 Telecom & Management SudParis 5 Frame structure ● Data and control information are transmitted within a single structure: The frame Flag 01111110 Flag 01111110 Address 8 bits FCS 16 bits Information 0 ≤ n < ∞ bits Control 8 bits
6
10/1/2016 Telecom & Management SudParis 6 Frame fields ● Flag Sequence for synchronisation and delimitation Eight-bit pattern: 01111110 ● Address Address of the secondary station A secondary station receives “command” frames and transmits “response” frames
7
10/1/2016 Telecom & Management SudParis 7 Frame fields (2) ● Information Contains the user data The field has no maximum length defined ● FCS Frame check sequence 16-bit field; contains a CRC (CRC-16) Used to detect transmission errors
8
10/1/2016 Telecom & Management SudParis 8 Frame fields (3) ● Control Controls the protocol behaviour Identifies the frames Numbers the information frames Acknowledges the information frames Supervises the data link
9
10/1/2016 Telecom & Management SudParis 9 Frame characteristics ● Transparency Allows to transmit any bit pattern Insertion of one “0” after five “1”s Suppression of every “0” after five “1”s The flags must not be modified! ● Frame inter-filling Maintains the synchonisation Continuous transmission of flags
10
10/1/2016 Telecom & Management SudParis 10 Frame characteristics (2) ● Frame abandon Forces the receiver to discard a frame Sequence of M bits, with M ≥ 7 ● Invalid frames Shorter than 32 bits Frame “too long”
11
10/1/2016 Telecom & Management SudParis 11 Frame types ● N(S): number of the frame sent ● N(R): number of the next expected frame ● P/F: poll/final bit ● S, U: supervision and extra functions 87654312 N(R) P/FN(S) SS UUUU U 0 1 1 0 1 P/F FACINF O FCSF Information Supervision Unnumbere d
12
10/1/2016 Telecom & Management SudParis 12 Information frames ● The information field is not empty and its content is defined by the user ● The frame counters are modulo 8 N(S) number of the sent frame N(R) number of the next expected frame
13
10/1/2016 Telecom & Management SudParis 13 Supervision frames ● No information field ● A counter is transmitted by the frame: N(R) ● This type of frame is used to: acknowledge information frames reject information frames specify the state of the receiving station
14
10/1/2016 Telecom & Management SudParis 14 Supervision frames (2) ● All the supervision frames acknowledge information frames whose number N(S) is less or equal to N(R) – 1 (modulo n).
15
10/1/2016 Telecom & Management SudParis 15 Unnumbered frames ● No information field ● No frame counter ● Basic control of the data link initialization (connection) connection reject disconnection indication of protocol errors
16
10/1/2016 Telecom & Management SudParis 16 Supervision functions ● S4, S3 = 0,0 RR Receiver Ready ● S4, S3 = 1,0 REJ Reject ● S4, S3 = 0,1 RNR Receiver Not Ready ● S4, S3 = 1,1 SREJ Selective Reject 87654312 N(R)SS 1 0P/F FACINF O FCSF
17
10/1/2016 Telecom & Management SudParis 17 RRReceiver Ready ● The receiver is ready to process new information frames. ● The previous received information frames (up to N(R) - 1) have been correctly processed and their content has been delivered to the user.
18
10/1/2016 Telecom & Management SudParis 18 RR example ● The receiver can receive several information frames before sending an RR frame. ● N(R) is the next expected frame. NETWOR K DTE DLDTreq DLDTind I 1,0 RR 2 I 0,0
19
10/1/2016 Telecom & Management SudParis 19 REJReject ● The receiver requests the retransmission of all information frames starting from the number N(R). ● The frames received up to N(R) - 1 are acknowledged. ● All the frames received from N(R) are discarded.
20
10/1/2016 Telecom & Management SudParis 20 REJ example ● Frame N(S)=1: bad FCS ● Frame N(S)=2: discarded ● REJ 1 requests the retransmission from 1 and acknowledged the frame N(S)=0. NETWOR K DTE DLDTreq DLDTind REJ 1 I 0,0 DLDTreq I 1,0 I 2,0 I 1,0 I 2,0 DLDTind
21
10/1/2016 Telecom & Management SudParis 21 RNRReceiver Not Ready ● The receiver temporarily cannot receive extra information frames. ● The previous frames (up to N(R) - 1) were correctly received but their content could not be delivered to the user.
22
10/1/2016 Telecom & Management SudParis 22 RNR example ● The upper layers cannot receive data ● The frames are acknowledged (RNR) ● After reception by the upper layers, the normal transfer can resume (RR) NETWOR K DTE DLDTreq DLDTind I 1,0 RNR 2 I 0,0 NETWOR K DTE DLDTreq RR 2
23
10/1/2016 Telecom & Management SudParis 23 SREJSelective Reject ● The receiver requests the retransmission of the information frame whose number is N(R). ● The next received frames (after N(R)) have been correctly received, and have been stored; the content of these frames has not been delivered to the user. ● The use of this supervision frame is optional.
24
10/1/2016 Telecom & Management SudParis 24 Extra functions ● Follow the format of the control field of the unnumbered frames
25
10/1/2016 Telecom & Management SudParis 25 SABM ● Frame nature: command. ● Select the balanced mode (LAPB). ● The stations can both manage the data link. ● The acceptation of the connection is done with a UA frame. ● The rejection of the connection is done with a DM frame.
26
10/1/2016 Telecom & Management SudParis 26 DISC ● Frame nature: command. ● Generates the logical disconnection of the data link between two stations. ● The receiving station must answer with a UA.
27
10/1/2016 Telecom & Management SudParis 27 UA ● Frame nature: response. ● Accepts a command.
28
10/1/2016 Telecom & Management SudParis 28 FRMR/CMDR ● Frame nature: response. ● Rejects a command: after an error; if the requested command is not implemented.
29
10/1/2016 Telecom & Management SudParis 29 DM ● Frame nature: response. ● Two functions: Indicates that a station is not logically connected. Rejects a command
30
10/1/2016 Telecom & Management SudParis 30 Restart rules ● Some error conditions or abnormal behavior may occur. The rules of restart resolve these problems. Overflow Transmission error Wrong N(S) etc.
31
10/1/2016 Telecom & Management SudParis 31 Overflow ● A station, which cannot receive any more information frames, sends a RNR frame with N(R) indicating the first unaccepted frame. ● The station sends a RR frame as soon as it is ready again to receive new information frames.
32
10/1/2016 Telecom & Management SudParis 32 Transmission error ● Any frame, whose FCS computation indicates a transmission error, must be discarded. ● No other specific action should be undertaken by the receiver.
33
10/1/2016 Telecom & Management SudParis 33 Wrong N(S) ● Any information frame whose N(S) does not contain the expected value must be discarded; the next frames must be ignored too. ● The station receiving such a frame must then send a REJ frame with N(R) indicating the expected frame number.
34
10/1/2016 Telecom & Management SudParis 34 Wrong N(S) [SREJ] ● Any information frame whose N(S) does not contain the expected value must be discarded. The eventual next information frames should be stored. ● A station receiving such a frame must then send a SREJ frame with N(R) indicating the expected frame number.
35
10/1/2016 Telecom & Management SudParis 35 Restart after time-out ● A station which does not receive any acknowledgment before T1 seconds, must retransmit the first unacknowledged information frame. ● The P/F bit of this information frame must be set. ● The station can then resume the transmission after the reception of an acknowledgment with the P/F bit set.
36
10/1/2016 Telecom & Management SudParis 36 Restart after time-out (1) ● The first frame occurence is lost (bad FCS) ● After a time-out (T1), the frame is sent again ● The frame is normally acknowledged NETWOR K DTE DLDTreq DLDTind I 0,0 I 0,0 P/F T1 RR 1 P/F
37
10/1/2016 Telecom & Management SudParis 37 Restart after time-out (2) ● The first frame occurrence is correct ● The RR is lost (bad FCS) ● After T1, the second frame occurrence is discarded (wrong N(S)) NETWOR K DTE DLDTreq DLDTind I 0,0 I 0,0 P/F T1 RR 1 REJ 1 P/F
38
10/1/2016 Telecom & Management SudParis 38 Bit P/F ● A station which receives a command frame with the P/F bit set, must send a response frame with the P/F bit also set. ● The P/F bit is called P (Poll) in a command frame (e.g. Information frames) ● The P/F bit is called F (Final) in a response frame (e.g. RR, RNR or REJ frames)
39
10/1/2016 Telecom & Management SudParis 39 Flow control ● The mechanism used is a window. ● A station can send up to W information frames before receiving any acknowledgment. ● The window is closed if the station has sent W frames and did not receive any acknowledgment. ● A station cannot send other information frames if its window is closed.
40
10/1/2016 Telecom & Management SudParis 40 Flow control ( cont’d ) ● The receiver can acknowledge one, several, or all the information frames previously received. ● When a station acknowledges some information frames, it opens more or less the window of its peer.
41
10/1/2016 Telecom & Management SudParis 41 Flow control example ● W = 3 → the window size is 3. ● DLDTreq → primitive of service sent by the user of the level 2 (DTE side): DLDTreq = Data Link Data request. ● DLDTind → primitive of service sent by the user of the level 2 (network side): DLDTind = Data Link Data indication. ● I,2,0 → information frame, N(S)=2, N(R)=0 ● RR,2 → supervision frame RR, N(R)=2 NETWOR K DT E DLDTreq DLDTind W = 3 I 0,0 I 1,0 I 2,0 RR 2 I 3,0 RR 4
42
10/1/2016 Telecom & Management SudParis 42 Some parameters ● Timer T1 On timeout of this timer, the first unacknowledged information frame must be sent again. Standard values: T1 = 100, 200, 400, 800, 1600, 2500 ms ● Timer T2 Maximum time that a receiver can wait to acknowledge an information frame.
43
10/1/2016 Telecom & Management SudParis 43 Some parameters ( cont’d ) ● N1 Maximum size of an information frame. ● N2 Maximum number of retransmission of the same information frame. If this value is reached, the link is considered to be out-of-order. Standard value: 10
44
10/1/2016 Telecom & Management SudParis 44 Exchange modes definitions SOURCEDESTINATION INFORMATION ACKNOWLEDGMENT PRIMARYSECONDARY COMMAND RESPONSE
45
10/1/2016 Telecom & Management SudParis 45 Assymetric point-to-point PRIMARY SECONDARY SOURCE Station AStation B DEST.SOURCE SEL I POLLACK I I I I I DEST.
46
10/1/2016 Telecom & Management SudParis 46 Symetric point-to-point PRIMARY SECONDARY DEST. SOURCE Station A Station B DEST. SOURCE I ACK I I I I I PRIMARYSECONDARY
47
10/1/2016 Telecom & Management SudParis 47 Balanced point-to-point DEST. Station A Station B SOURCE DEST. Combined station
48
10/1/2016 Telecom & Management SudParis 48 Credits ● These slides have been realized with OpenOffice.org 3.1.1 ● Creation date: 17 October 2008 ● Last modification date: 6 October 2009 ● Drawings: Trash/dustbin: http://pleindetrucs.com/galerie/details.php?image_id=13872 Other drawings made with OOo 3.1.1 draw.
49
10/1/2016 Telecom & Management SudParis 49 Public Documentation licence Notice ● The contents of this Documentation are subject to the Public Documentation License Version 1.0 (the "License"); you may only use this Documentation if you comply with the terms of this License. A copy of the License is available at http://www.openoffice.org/licenses/PDL.html. ● The Original Documentation is HDLC, High-level Data Link Control. The Initial Writer of the Original Documentation is Michel Gardie Copyright © 2007. All Rights Reserved. (Initial Writer contact(s): michel.gardie@it-sudparis.eu). ● Contributor(s): none. ● NOTE: The text of this Appendix may differ slightly from the text of the notices in the files of the Original Documentation. You should use the text of this Appendix rather than the text found in the Original Documentation for Your Modifications.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.