+ All Categories
Home > Documents > Bit Oriented Data Link Protocols - Computer and ...ziegler/CIS49.2/BitOrientedProtocols.pdf · Bit...

Bit Oriented Data Link Protocols - Computer and ...ziegler/CIS49.2/BitOrientedProtocols.pdf · Bit...

Date post: 19-Jul-2018
Category:
Upload: buikhanh
View: 214 times
Download: 0 times
Share this document with a friend
30
DataLink2-1 Copyright © December 21, 2004 by Chaim Ziegler, Ph.D. Bit Oriented Data Link Protocols Examples: ! High-level Data Link Control (HDLC) - ISO ! Advanced Data Communications Control Procedures (ADCCP) - ANSI ! Synchronous Data Link Control (SDLC) - IBM ! Link Access Procedure, Balanced (LAPB) - ITU-T (for X.25) ! Link Access Procedure, D-Channel (LAPD) - ITU-T (for ISDN) ! Link Access Procedure for Frame-Mode Bearer Services (LAPF) ! Logical Link Control (LLC) - IEEE 802.2
Transcript

DataLink2-1Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

Bit Oriented Data Link Protocols

Examples:

! High-level Data Link Control (HDLC) - ISO

! Advanced Data Communications Control Procedures(ADCCP) - ANSI

! Synchronous Data Link Control (SDLC) - IBM

! Link Access Procedure, Balanced (LAPB) - ITU-T (forX.25)

! Link Access Procedure, D-Channel (LAPD) - ITU-T (forISDN)

! Link Access Procedure for Frame-Mode Bearer Services(LAPF)

! Logical Link Control (LLC) - IEEE 802.2

DataLink2-2Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

HDLC

! Type of Stations:1. Primary (issues commands)2. Secondary (issues responses)3. Combined

! Link Configurations:1. Unbalanced:

Consists of one primary and one or moresecondaries.

2. Balanced:Consists of tw o combined stations only.

DataLink2-3Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

HDLC Data Transfer Modes:

! Normal Response Mode (NRM):This is an unbalanced configuration. The primaryuses polling and selection.

! Asynchronous Response Mode (ARM):This is an unbalanced configuration. The secondarymay send response frames w ithout explicitpermission from the primary.

! Asynchronous Balanced Mode (ABM):This is a balanced configuration. Either combinedstation may init iate transmission.

DataLink2-4Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

HDLC Frame Structure

! All transmissions use frames w ith follow ing f ields:- Flag: 8 bits (01111110) w ith bit stuff ing- Address: One or more octets (for mult ipoint lines)- Control: 8 or 16 bits- Information: variable length- Frame Check Sequence (FCS): 16 or 32 bits- Flag: 8 bits

! Types of Frames:- Information Frames (I Frames)- Supervisory Frames (S Frames)- Unnumbered Frames (U Frames) (IBM - NS)

! HDLC uses synchronous transmission

DataLink2-5Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

HDLC Command/Response Repertoire

Format Commands Responses C-Field Format

8 7 6 5 4 3 2 1

InformationTransfer

I(Information)

I(Information)

N(R) PF

N(S) 0

Supervisory

RR(Receive Ready)

RR(Receive Ready)

N(R) PF

0 0 0 1

RNR(Receive Not

Ready)

RNR(Receive Not

Ready)

N(R) PF

0 1 0 1

REJ(Reject)

REJ(Reject)

N(R) PF

1 0 0 1

SREJ(Selective Reject)

SREJ(Selective Reject)

N(R) PF

1 1 0 1

Unnumbered

SNRM(Set Normal

Response Mode)

1 0 0 P 1 1 1 1

SARMSet Asynch.

Response Mode)

DM(Disconnect Mode)

0 0 0 PF

1 1 1 1

SABM(Set Asynch.

Balanced Mode)

0 0 1 P 1 1 1 1

SNRME(Set Normal

Response Mode)

1 1 0 P 1 1 1 1

SARMESet Asynch.

Response Mode)

0 1 0 P 1 1 1 1

SABME(Set Asynch.

Balanced Mode)

0 1 1 P 1 1 1 1

DISC(Disconnect)

RD(Request Disc.)

0 1 0 PF

0 0 1 1

UA(Unnumbered Ack)

0 1 1 F 0 0 1 1

SIM(Set

Initialization Mode)

RIM(Request

Initialization Mode)

0 0 0 PF

0 1 1 1

FRMR(Frame Reject)

1 0 0 F 0 1 1 1

RSET(Reset)

1 0 0 P 1 1 1 1

UP(Unnumbered Poll)

0 0 1 P 0 0 1 1

UI(Unnumbered Info)

UI(Unnumbered Info)

0 0 0 PF

0 0 1 1

XID(Exchange ID)

XID(Exchange ID)

1 0 1 PF

1 1 1 1

TEST(Test)

TEST(Test)

1 1 1 PF

0 0 1 1

DataLink2-6Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

HDLC I Frame & S Frame Extended Numbering Formats

Format Commands Responses C-Field Format

8 7 6 5 4 3 2 1

InformationTransfer

I(Information)

I(Information)

N(S) 0

N(R) PF

Supervisory

RR(Receive Ready)

RR(Receive Ready)

0 0 0 0 0 0 0 1

N(R) PF

RNR(Receive Not

Ready)

RNR(Receive Not

Ready)

0 0 0 0 0 1 0 1

N(R) PF

REJ(Reject)

REJ(Reject)

0 0 0 0 1 0 0 1

N(R) PF

SREJ(Selective Reject)

SREJ(Selective Reject)

0 0 0 0 1 1 0 1

N(R) PF

DataLink2-7Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

HDLC Operation

1. I-Frames:

! Contains user data

! Contains the sequence number of the transmittedframe

! Contains a piggybacked acknow ledgement forreceived I-frames (N(r) = Next frame expected)

! Maximum w indow size is 7 or 127

! I-frame contains a poll/f inal (P/F) bit .

- In NRM the primary sets the P-bit to issue aPOLL. The secondary sets the F-bit in lastI-frame of a response.

- In ARM and ABM, the P/F bit is used to forcea response.

DataLink2-8Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

2. S-Frames:

Used for both f low control and error control

a) Receive Ready (RR)

! Used as posit ive acknow ledgement (thruN(r)-1) w hen no I-frame is available forpiggybacking.

! Primary can issue a POLL by sett ing P-bit.! Secondary response w ith F-bit set if it has no

data to send.

b) Receive Not Ready (RNR)

! Used as posit ive acknow ledgement (thruN(r)-1) and a request that no more I-framesbe sent until a subsequent RR is used.

! Primary or Combined station can set P-bit tosolicit t he receive st at us of asecondary/combined station.

! Secondary/Combined station response to Pollw ith F-bit set if the stat ion is busy.

c) Reject (REJ)

! Go-Back-N technique (Retransmit from N(r))

d) Selective Reject (SREJ)

! Selective Repeat technique (Repeat N(r))

DataLink2-9Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

3. U-Frames:

Categories:

! Mode Sett ing

SNRM, SNRME, SARM, SARME, SABM, SABMEUA, DMRIM, SIMRD, DISC

! Information Transfer

UPUI

! Recovery

FRMR, RSET

- Invalid Control Field- Data Field Too Long- Data Field Not Allow ed With Received

Frame Type- Invalid Receive Count

! Miscellaneous

XIDTEST

DataLink2-10Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

HDLC Command/Response Repertoire Options

Basic Repertoire:Commands:

I, RR, RNR, (SNRM or SARM or SABM), DISCResponses:

I, RR, RNR, UA, DM, FRMR

Functional Extensions (Options):1. For Sw itched Circuits

Commands: ADD - XID; Responses: ADD - XID, RD2. For 2-w ay Simultaneous

Commands & Responses: ADD - REJ3. For Single Frame Retransmission

Commands & Responses: ADD - SREJ4. For Information

Commands & Responses: ADD - UI5. For Init ialization

Commands: ADD - SIM; Responses: ADD - RIM6. For Group Polling

Commands: ADD - UP7. Extended Addressing8. Delete Response I Frames9. Delete Command I Frames10. Extended Numbering11. For Mode Reset (ABM only)

Commands: ADD - RSET12. Data Link Test

Commands & Responses: ADD - TEST13. Request Disconnect

Responses: ADD - RD14. 32-bit FCS

DataLink2-11Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

Link Establishment and Termination - NRM

Examples of HDLC Operation

DataLink2-12Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

Data Transfer - NRM

DataLink2-13Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

Link Establishment and Termination - ABM

DataLink2-14Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

Data Transfer - Balanced Mode

DataLink2-15Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

Busy Condit ion

DataLink2-16Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

Reject Recovery

DataLink2-17Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

Select ive Reject Recovery

DataLink2-18Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

Timeout Recovery

DataLink2-19Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

LAPB State Diagram

! LAPB Addresses:

DataLink2-20Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

LAPB Commands and Responses

DataLink2-21Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

Various Data Link Control Frame Formats

DataLink2-22Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

The Point-to-Point Protocol (PPP)

! Used on the Internet for router-to-router and homeuser-to-ISP data links.

! PPP provides three features:

- A framing method that delineates frames. the frameformat also handles error detection.

- A Link Control Protocol (LCP) for bringing lines up,testing them, negotiat ing options, and bringthem dow n gracefully. This protocol supportsboth synchronous and asynchronous circuits andboth byte-oriented and bit-oriented encodings.

- A w ay to negotiate netw ork layer options in a w aythat is independent of the netw ork layer protocolused. A dif ferent Netw ork Control Protocol(NCP) is used for each netw ork layer supported.

DataLink2-23Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

PPP State Diagram for Line Activation

! Dead (or IDLE):No active carrier or connection exists.

! Establish:LCP option negotiat ion begins.

! Authenticate (optional):The tw o end points authenticate each other.

! Netw ork:The appropriate NCP protocol is invoked.

! Open:Data transport takes place.

! Terminate:The connection is closed.

DataLink2-24Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

PPP Frame Format

! The PPP frame format is similar to HDLC.

! The address and control f ields are alw ays constant.

! The Protocol f ield indicates w hat kind of packet is inthe Payload f ield (e.g., LCP, NCP, IP, IPX, AppleTalk,etc.)

! The Payload f ield has a variable length and itsmaximum is negotiated. The default maximum is1500 bytes.

DataLink2-25Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

The Link Control Protocol (LCP)

! LCP Packet Encapsulated in a PPP Frame:

- Code: Defines the type of LCP packet.- ID: Value used to match a request w ith a response.

16! LCP Packets (Protocol f ield = C021 ):

Options: packet size, authentication, compression. etc.

DataLink2-26Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

The Password Authentication Protocol (PAP)! Authentication means validating a user w ho needs to

access a set of resources.! PPP has tw o protocols for authentication: Passw ord

Authentication Protocol (PAP) and ChallengeHandshake Authentication Protocol (CHAP).

! PAP:

16! PAP Packets (Protocol f ield = C023 ):

DataLink2-27Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

Challenge Handshake Authentication Protocol (CHAP)! CHAP - 3-w ay handshake (passw ord is never sent):

16! CHAP Packets (Protocol f ield = C223 ):

DataLink2-28Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

The Network Control Protocol (NCP)

! NCP is a set of control protocols to allow theencapsulation of data from various netw ork layerprotocols; such as, IP, IPX, AppleTalk, etc..

DataLink2-29Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

The Internetwork Protocol Control Protocol (IPCP)

! IPCP is the protocol used to establish a netw ork layerconnection for carrying IP data.

! IPCP Packet Encapsulation in a PPP Frame:

16! IPCP Packets: (protocol f ield = 8021 ):

- Configure-request- Configure-ack- Configure-nak- Configure-reject- Terminate-request- Terminate-ack- Code-reject

! Note:After configuration, the link is ready to carry IP datain the payload f ield of a PPP frame. The protocol f ield

16value is set to 0021 to indicate IP data is beingcarried.

DataLink2-30Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.

Example PPP Session


Recommended