hdlc, ppp and slip

34
HDLC, PPP & SLIP PROTOCOLS By : Naveen Kumar M.E. ECE, NITTTR

Upload: naveen-kumar

Post on 11-May-2015

6.940 views

Category:

Technology


7 download

DESCRIPTION

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

TRANSCRIPT

Page 1: HDLC, PPP and SLIP

HDLC, PPP & SLIP PROTOCOLS

By : Naveen Kumar

M.E. ECE,

NITTTR

Page 2: HDLC, PPP and SLIP

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

References

Page 3: HDLC, PPP and SLIP

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

Page 4: HDLC, PPP and SLIP

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

Page 5: HDLC, PPP and SLIP

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 capability5

Page 6: HDLC, PPP and SLIP

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

Page 7: HDLC, PPP and SLIP

HDLC FAMILY

7

Page 8: HDLC, PPP and SLIP

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

Page 9: HDLC, PPP and SLIP

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.9

Page 10: HDLC, PPP and SLIP

HDLC FRAME FORMAT

10

Page 11: HDLC, PPP and SLIP

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

Page 12: HDLC, PPP and SLIP

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

Page 13: HDLC, PPP and SLIP

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

Page 14: HDLC, PPP and SLIP

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

Page 15: HDLC, PPP and SLIP

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

Page 16: HDLC, PPP and SLIP

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

Page 17: HDLC, PPP and SLIP

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

Page 18: HDLC, PPP and SLIP

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

Page 19: HDLC, PPP and SLIP

EXAMPLE

Command to connect with balanced extended set mode

Station1 Satation2

SABM

Time Out

SABM

UA

Page 20: HDLC, PPP and SLIP

EXAMPLE (CONT)

Disc Command

Station1 Station2

Disc

UA

Page 21: HDLC, PPP and SLIP

EXAMPLE(CONT)

Busy State

Station 1 Station 2

1,3,0

RNR,4

RR

1,4,0

Page 22: HDLC, PPP and SLIP

EXAMPLE (CONT)

Full Duplex Data Exchange

Station 1 Station 2

1,0,0

1,0,1

1,1,3

1,1,4

N(R)

N(S)

Page 23: HDLC, PPP and SLIP

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

Page 24: HDLC, PPP and SLIP

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

Page 25: HDLC, PPP and SLIP

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 detection25

Page 26: HDLC, PPP and SLIP

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

Page 27: HDLC, PPP and SLIP

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

Page 28: HDLC, PPP and SLIP

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

Page 29: HDLC, PPP and SLIP

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

Page 30: HDLC, PPP and SLIP

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

Depends on data pattern! 30

Page 31: HDLC, PPP and SLIP

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

Page 32: HDLC, PPP and SLIP

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

Page 33: HDLC, PPP and SLIP

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

Page 34: HDLC, PPP and SLIP

34