Skip to content
Home » Data Link Protocols: HDLC and PPP

Data Link Protocols: HDLC and PPP

HDLC and PPP are important Data Link Layer protocols used for communication over point-to-point links.

  • HDLC = High-Level Data Link Control
  • PPP = Point-to-Point Protocol

Both provide framing, error detection and link management, but they are designed with somewhat different goals.


1. HDLC — High-Level Data Link Control

HDLC is a bit-oriented Data Link Layer protocol standardized by ISO for reliable communication over point-to-point and multipoint links.

It uses frames to carry data.

Simple idea

Network Layer
      ↓
    Packet
      ↓
     HDLC
      ↓
   HDLC Frame
      ↓
Physical Link

2. HDLC Frame Format

The basic HDLC frame is:

┌──────┬─────────┬─────────┬──────────┬──────┬──────┐
│ Flag │ Address │ Control │   Data   │ FCS  │ Flag │
└──────┴─────────┴─────────┴──────────┴──────┴──────┘

Let’s understand each field.

1. Flag

The flag marks the beginning and end of an HDLC frame.

01111110

So a frame looks conceptually like:

01111110 | Header | Data | FCS | 01111110
  Flag                              Flag

2. Address Field

Identifies the station involved in the communication.

In traditional HDLC, this field identifies the relevant secondary station or destination.


3. Control Field

Contains control information.

It is used for:

  • Flow control
  • Error control
  • Sequence numbers
  • Acknowledgements
  • Supervisory functions

4. Data / Information Field

Contains the actual user data.

Data = Packet received from Network Layer

5. FCS — Frame Check Sequence

FCS is used for error detection.

It is generally based on a CRC calculation.

Data → CRC calculation → FCS

If the receiver detects an error, appropriate control/retransmission procedures may be used.


3. HDLC Bit Stuffing

HDLC uses bit stuffing to make sure the flag pattern does not accidentally appear inside the data.

The flag is:

01111110

Whenever the sender encounters five consecutive 1s in the data, it inserts a 0.

Example

Original data:

01111110

After bit stuffing:

011111010

At the receiver, the extra 0 is removed.

This allows the receiver to distinguish:

Flag → 01111110

from data containing similar bit patterns.


4. HDLC Frame Types

HDLC has three major types of frames:

  1. I-Frame
  2. S-Frame
  3. U-Frame

A. I-Frame — Information Frame

I = Information

Used to carry actual user data.

I-Frame
┌─────────┬─────────────┐
│ Control │ User Data   │
└─────────┴─────────────┘

It can also carry sequence and acknowledgement information.

Main purpose:

Transfer user data.


B. S-Frame — Supervisory Frame

S = Supervisory

Used for control and error/flow management.

Examples include:

  • RR — Receive Ready
  • RNR — Receive Not Ready
  • REJ — Reject
  • SREJ — Selective Reject

Main purpose:

Acknowledgement, flow control and error control.


C. U-Frame — Unnumbered Frame

U = Unnumbered

Used for link management and control functions.

Examples:

  • Establishing a connection
  • Disconnecting a connection
  • Mode setting
  • Other management operations

Main purpose:

Link management.


5. HDLC Modes

HDLC can operate in different modes.

Important ones include:

Normal Response Mode — NRM

The secondary station normally transmits only when permitted by the primary station.

Asynchronous Balanced Mode — ABM

Both stations can initiate transmission.

Station A  ⇄  Station B

ABM is commonly associated with balanced point-to-point communication.


6. Advantages of HDLC

  • Reliable communication
  • Efficient framing
  • Strong error detection
  • Supports flow control
  • Supports different frame types
  • Uses bit stuffing
  • Suitable for synchronous communication

Disadvantages

  • More complex than simpler protocols.
  • Some implementations/configurations are less interoperable than PPP for Internet-style point-to-point connections.
  • Designed as a general link-control protocol rather than specifically for negotiating network-layer protocols over Internet links.

7. PPP — Point-to-Point Protocol

PPP is a Data Link Layer protocol designed for direct point-to-point communication between two devices.

It became widely used for links such as:

  • Dial-up Internet
  • Serial connections
  • Router-to-router links
  • WAN connections

Simple diagram

Computer/Router A
        │
        │
       PPP
        │
        │
Computer/Router B

8. PPP Frame Format

A basic PPP frame is:

┌──────┬─────────┬────────┬──────────┬──────┬──────┐
│ Flag │ Address │ Control│ Protocol │ Data │ FCS  │
└──────┴─────────┴────────┴──────────┴──────┴──────┘

Let’s understand it.

1. Flag

Usually:

01111110

Marks the beginning/end of a frame.


2. Address

In basic PPP framing, the address field is normally:

11111111

It represents the broadcast address.

Because PPP is a point-to-point connection, there is normally only one other endpoint.


3. Control

Normally:

00000011

This indicates an unnumbered information frame in the standard PPP format.


4. Protocol

Identifies what is carried in the data field.

For example, it can indicate:

IP
IPv6
LCP
NCP

This is an important feature of PPP.


5. Data

Contains the actual payload.

For example:

IP Packet

6. FCS

Frame Check Sequence is used for error detection.

It normally uses a CRC-based calculation.


9. Important Components of PPP

PPP is more than just a frame format.

It has important protocols for managing the link.

A. LCP — Link Control Protocol

LCP is used to establish, configure, test and terminate the PPP link.

LCP
 ↓
Establish
Configure
Test
Terminate

B. NCP — Network Control Protocol

NCP is used to configure the Network Layer protocol carried over PPP.

For example:

PPP
 │
 ├── LCP → Manage PPP link
 │
 └── NCP → Configure network-layer protocols

For IP, one historically important NCP is IPCP (IP Control Protocol).


10. PPP Authentication

PPP can support authentication.

Two common authentication methods are:

PAP — Password Authentication Protocol

Simple username/password authentication.

User → Username + Password → Server

It is relatively simple but less secure than CHAP.

CHAP — Challenge Handshake Authentication Protocol

Uses a challenge-response mechanism.

Server → Challenge
Client → Response
Server → Verify

CHAP avoids sending the password directly over the link.


11. PPP Working

PPP communication can be understood in stages:

      Start
        ↓
   Establish Link
        ↓
       LCP
        ↓
 Authentication
   (if configured)
        ↓
       NCP
        ↓
 Exchange Network Data
        ↓
     Terminate

Example

Suppose a router wants to establish a PPP connection with another router:

Router A                         Router B
   │                                │
   │────── LCP negotiation ────────>│
   │<───── LCP response ────────────│
   │                                │
   │──── Authentication ───────────>│
   │                                │
   │────── NCP configuration ──────>│
   │                                │
   │<══════ IP Data ═══════════════>│

12. HDLC vs PPP

This is an important examination question.

FeatureHDLCPPP
Full formHigh-Level Data Link ControlPoint-to-Point Protocol
TypeBit-orientedByte-oriented/byte-oriented framing with HDLC-like flag structure
Main useGeneral synchronous data linksPoint-to-point Internet/WAN links
StandardizationISO-basedIETF
FramingYesYes
Error detectionFCS/CRCFCS/CRC
Flow/error controlRich control mechanismsBasic link control; reliability typically handled by higher layers
AuthenticationNot a core PPP-style featurePAP, CHAP
Link negotiationLess focused on Internet-style negotiationLCP
Network-layer configurationNot PPP’s main focusNCP
IP supportPossible depending on implementationStrong built-in support through protocol field/NCPs
ComplexityRelatively more general/control-orientedDesigned for point-to-point interoperability

13. Key Difference

The easiest way to remember:

HDLC

General-purpose bit-oriented link-control protocol.

PPP

Point-to-point protocol designed to carry network-layer protocols and negotiate/manage the link.

PPP provides a complete framework around the link:

              PPP
               │
       ┌───────┴────────┐
       ↓                ↓
      LCP               NCP
       ↓                ↓
 Manage Link       Configure Network

14. HDLC and PPP Similarities

Both:

  • Operate at the Data Link Layer
  • Use frames
  • Use a flag field
  • Use FCS/CRC-based error detection
  • Can be used on point-to-point links
  • Provide mechanisms for link-level control
  • Encapsulate network-layer data

⭐ Exam Summary

HDLC

HDLC = High-Level Data Link Control

  • Bit-oriented protocol.
  • Uses frames.
  • Flag = 01111110.
  • Uses bit stuffing.
  • FCS provides error detection.
  • Three major frame types:
    • I-frame → Information
    • S-frame → Supervisory
    • U-frame → Unnumbered
  • Important mode: ABM.

PPP

PPP = Point-to-Point Protocol

  • Designed for point-to-point communication.
  • Uses HDLC-like framing.
  • Uses FCS for error detection.
  • LCP → establishes/configures/tests/terminates the link.
  • NCP → configures network-layer protocols.
  • Supports authentication such as PAP and CHAP.
  • Commonly used for point-to-point WAN/Internet links.

One-line memory

HDLC = Bit-oriented framing and link control.
PPP = Point-to-point framing + LCP + NCP + authentication.