Published on

This presentation covers three data link layer protocols out of which HDLC is explained briefly.

Published in: Technology, Business


  1. 1. HDLC, PPP & SLIPPROTOCOLS By : Naveen Kumar M.E. ECE, NITTTR
  2. 2. CONTENTS Data link protocols HDLC Overview HDLC Basics HDLC Frame structure HDLC operation by some examples PPP introduction and Features PPP Frame structure SLIP Basics Applications of PPP & HDLC Summary 2 References
  3. 3. DATA LINK PROTOCOLS FOR POINT-TO- POINT LINKS HDLC (High-Level Data Link Control) : • Widely used and influential standard (1979) • Default protocol for serial links on Cisco routers • PPP is based on a variant of HDLC PPP (Point-to-Point Protocol): • Successor to SLIP (1992), with added functionality • Used for dial-in and for high-speed routers. SLIP (Serial Line IP)  First protocol for sending IP datagrams over dial-up links (from 1988)  Encapsulation, not much else 3
  4. 4. HDLC OVERVIEW - DEFINITION High-Level Data Link Control (HDLC) ---- “King of the Link” It is a bit-oriented synchronous data link layer protocol developed by the International Organization for Standardization (ISO). It provide both connectionless service and connection oriented services. It supports Half and Full duplex transmission. It uses synchronous transmission. All transmissions are in the form of frames. 4
  5. 5. HDLC OVERVIEW (CONTD.)Broadly HDLC features are as follows: Reliable protocol  selective repeat or go-back-N Full-duplex communication  receive and transmit at the same time Bit-oriented protocol  use bits to stuff flags occurring in data Flow control  adjust window size based on receiver capability 5
  6. 6. HDLC OVERVIEW (CONTD.) Why do we use it today?  Framing  Frame protection  Error recovery o Building Blocks  SDLC is now a subset of HDLC. 6
  7. 7. HDLC FAMILY 7
  8. 8. HDLC BASICS Stations:  Primary: sends data, controls the link with commands  Secondary: receives data, responds to control messages  Combined: can issue both commands and responses Link configuration:  Unbalanced: one primary station, one or more secondary stations  Balanced: two combined stations 8
  9. 9. HDLC BASICS (CONTD.) Data transfer modes (not a complete set; these are most common)  Normal response mode (NRM):  Used with unbalanced configuration  Primary initiates data transfer; secondary can only reply  Asynchronous balanced mode (ABM):  Used with balanced configurations  Either side may send data at any time • Asynchronous response mode (ARM): o Used with an unbalanced configuration . oThe secondary may initiate transmission without explicit permission 9 of the primary.
  10. 10. HDLC FRAME FORMAT 10
  11. 11. FLAG FIELDS Flag fields delimit the frame at both ends with the unique pattern 01111110. A single flag may be used as the closing flag for one frame and the opening flag for the next. The pattern 01111110 could be found inside a frame and thus using it as a delimiter will destruct inner structure of the frame thus a method name Bit Stuffing was used in which sender will insert 0 after occurrence of 5 consecutive 1 11
  12. 12. BIT STUFFINGWith the use of bit stuffing, arbitrary bit patterns can be inserted into the datafield of the frame. This property is known as data transparency. 12
  13. 13. ADDRESS FIELD : The address field identifies the secondary station that transmitted or is to receive the frame. This field is not needed for point-to-point links, but is always included for the sake of uniformity. The address field is usually eight bits long but, by prior agreement, an extended format may be used in which the actual address length is a multiple of seven bits. The least significant bit of each octet is 1 or 0, depending on whether it is or is not the last octet of the address field. The single-octet address of 11111111 is interpreted as the all-stations address 13
  14. 14. CONTROL FIELD : Three main types of frames : 1) Information frames (I-frames) carry the data to be transmitted for the user. Additionally, flow- and error-control data are piggybacked on an information frame2) Supervisory frames (S-frames) provide the ARQ mechanism when piggybacking is not used.3)Unnumbered frames (U-frames) provide supplemental link control functions 14
  15. 15. INFORMATION FIELDo The information field is present only in I-frames and some U- frames.o The field can contain any sequence of bits but must consist of an integral number of octets. The length of the information field is variable up to some system-defined maximum. 15
  16. 16. FCS FIELD The frame check sequence (FCS) is an error-detecting code calculated from the remaining bits of the frame, exclusive of flags. The normal code is the 16-bit CRC CCITT . An optional 32-bit FCS, using CRC-32, may be employed if the frame length or the line reliability dictates this choice. 16
  17. 17. HDLC OPERATIONThe operation of HDLC involves three phases : First, one side or another initializes the data link so that frames may be exchanged in an orderly fashion. During this phase, the options that are to be used are agreed upon. After initialization, the two sides exchange user data and the control information to exercise flow and error control. Finally, one of the two sides signals the termination of the operation. 17
  18. 18. HDLC OPERATION (CONTD.) One of the messages SNRM, SABM, SABME, … is used to set up the link initially.  Sets the mode, and the length of sequence numbers UA is used as a positive acknowledgment for U-frames After setting up the link, data transfer can occur. The DISC message is used to terminate the connection. If a damaged U-frame is received, FRMR is sent as a reply. 18
  19. 19. EXAMPLE Command to connect with balanced extended set mode SABM Time Out Station1 Satation2 SABM UA
  20. 20. EXAMPLE (CONT) Disc Command Disc Station1 Station2 UA
  21. 21. EXAMPLE(CONT) Busy State 1,3,0 RNR,4 Station 1 Station 2 RR 1,4,0
  22. 22. EXAMPLE (CONT) N(S) Full Duplex Data Exchange N(R) 1,0,0 1,0,1 Station 1 Station 2 1,1,3 1,1,4
  23. 23. POINT TO POINT DATA LINK CONTROL Goal of PPP  Convey datagrams over a serial link  Both synchronous or asynchronous serial links are supported  Both bit or byte oriented transmissions are supported. Basically, PPP consists of  One Link Control Protocol (LCP)  Several Network Control Protocols (NCPs) 23
  24. 24. PPP FEATURES Packet framing - encapsulation of network-layer datagram in data link frame Multi-protocol - carry network layer data of any network layer protocol (not just IP) at same time ability to demultiplex upwards Bit transparency - must carry any bit pattern in the data field (even if underlying channel cant) Error detection - not correction 24
  25. 25. PPP FEATURES (CONTD.)The extra stuff: Connection aliveness: detect, signal link failure to network layer Network layer address negotiation: endpoint can learn/configure each other’s network address and other characteristics. Authentication: who are you (or at least whose account do I bill for your dial-in time?)  This information is used by traffic management software to control bandwidth to individual subscribers Management features: loopback detection 25
  26. 26. LINK CONRTOL PROTOCOL (LCP) Link Control Protocol (LCP)  Setup, configure, test and terminate PPP connection  Supports various environments LCP negotiates  Encapsulation format options  Maximal packet sizes  Identification and authentification of peers (!)  Determination of proper link functionality 26
  27. 27. NETWORK CONTROL PROTOCOLS(NCP) Network Control Protocols (NCPs)  Helper to establish various network protocols  IP uses "IPCP" Typical tasks  Assignment and management of IP addresses  Compression and authentication 27
  28. 28. PPP DATA FRAME Flag: delimiter (framing) Address: ignored. (historical) Control: ignored. (historical) Protocol: upper layer protocol to which frame delivered (e.g., PPP- LCP, IP, IPCP, etc) info: upper layer data being carried check: cyclic redundancy check for error detection 28
  29. 29. SERIAL LINE IP (SLIP) Serial Line IP (SLIP)  Asynchronous, character oriented, 8 bit, no parity  Simple layer 2 frame format for serial lines Only provides framing Only encapsulates IP packets No flow control with XON/XOFF possible. Used in earlier "dial In" modem connections. 29
  30. 30. SLIP DISADVANTAGES IP addresses must be preconfigured  No dynamic assignment No protocol (type) field  Only defined to transport IP packets No Frame Check Sequence (FCS)  Higher layers must care!  But higher layers just use checksums (CRC would be better) Inconstant overhead 30  Depends on data pattern!
  31. 31. APPLICATIONS OF PPP & HDLC PPP :  Dial-up – PPP over async. serial, over modem  ADSL – PPP over Ethernet  Backbone – Packet over SONET HDLC :  In public networks that uses X.25 protocol  ISDN D channel  LLC in LAN (IEEE 802.2) Why?  Framing (dialup)  Efficiency 31  Authentication, address negotiation (PPPoE)
  32. 32. SUMMARY Overview of HDLC & PPP protocols. Frame structures of these protocols are studied. Functions of some fields are similar. HDLC supports half & full duplex links while PPP supports only full duplex links. 32
  33. 33. REFERENCES Behrouz A. Forouzan, “Data Communication and Networking(3rd Ed.)”, 4th Chapter 11 & 12. Andrew S. Tanenbaum, “Computer Networks (3rd Ed.)”, Chapter 3 Data link Layer. Herbert Haas, “King of the link”, www.perihel.at/2/basics/04- HDLC.pdf 33
  34. 34. 34