Вы находитесь на странице: 1из 34

HDLC, PPP & SLIP

PROTOCOLS

By : Naveen Kumar

M.E. ECE,
NITTTR

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
References

DATA LINK PROTOCOLS FOR POINT-TOPOINT


LINKSData Link Control) :
HDLC
(High-Level

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

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

HDLC OVERVIEW (CONTD.)


Broadly HDLC features are as follows:

Reliable protocol

Full-duplex communication

receive and transmit at the same time

Bit-oriented protocol

selective repeat or go-back-N

use bits to stuff flags occurring in data

Flow control

adjust window size based on receiver capability


5

HDLC OVERVIEW (CONTD.)

Why do we use it today?

Framing

Frame protection

Error recovery

Building Blocks
SDLC is now a subset of HDLC.

HDLC FAMILY

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

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
of the primary.

HDLC FRAME FORMAT

10

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

BIT STUFFING

With the use of bit stuffing, arbitrary bit patterns can be inserted into the data
field of the frame. This property is known as data transparency.

12

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

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 frame

2) Supervisory frames (S-frames) provide the ARQ mechanism when


piggybacking is not used.
3)Unnumbered frames (U-frames) provide supplemental link control
functions
14

INFORMATION FIELD
o 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

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

HDLC OPERATION
The 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

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

EXAMPLE

Command to connect with balanced extended set mode

SABM

Station1

Time Out
SABM
UA

Satation2

EXAMPLE (CONT)

Disc Command

Disc
Station1

Station2
UA

EXAMPLE(CONT)

Busy State

1,3,0

Station 1

RNR,4

RR
1,4,0

Station 2

EXAMPLE (CONT)

N(S)

Full Duplex Data Exchange


N(R)

1,0,0

Station 1

1,0,1

1,1,3
1,1,4

Station 2

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

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 can't)

Error detection - not correction

24

PPP FEATURES (CONTD.)


The extra stuff:

Connection aliveness: detect, signal link failure to network layer

Network layer address negotiation: endpoint can learn/configure


each others 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

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

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

PPP DATA FRAME

Flag: delimiter (framing)

Address: ignored. (historical)

Control: ignored. (historical)

Protocol: upper layer protocol to which frame delivered (e.g., PPPLCP, IP, IPCP, etc)

info: upper layer data being carried

check: cyclic redundancy check for error detection

28

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

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
But

layers must care!

higher layers just use checksums (CRC would be better)

Inconstant overhead
Depends

on data pattern!

30

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

Authentication, address negotiation (PPPoE)

31

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

REFERENCES

Behrouz A. Forouzan, Data Communication and Networking(3 rd


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/04HDLC.pdf

33

34

Вам также может понравиться