Vous êtes sur la page 1sur 30

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

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-1

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 more secondaries. 2. Balanced: Consists of tw o combined stations only.

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-2

HDLC Data Transfer Modes:

! Normal Response Mode (NRM):


This is an unbalanced configuration. The primary uses polling and selection.

! Asynchronous Response Mode (ARM):


This is an unbalanced configuration. The secondary may send response frames w ithout explicit permission from the primary.

! Asynchronous Balanced Mode (ABM):


This is a balanced configuration. Either combined station may initiate transmission.

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-3

HDLC Frame Structure

! All transmissions use frames w ith follow ing fields:


- Flag: 8 bits (01111110) w ith bit stuffing - Address: One or more octets (for multipoint 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
Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-4

HDLC Command/Response Repertoire


Format Commands Responses 8 Information Transfer I (Information) RR (Receive Ready) RNR (Receive Not Ready) Supervisory REJ (Reject) SREJ (Selective Reject) SNRM (Set Normal Response Mode) SARM Set Asynch. Response Mode) SABM (Set Asynch. Balanced Mode) SNRME (Set Normal Response Mode) SARME Set Asynch. Response Mode) SABME (Set Asynch. Balanced Mode) DISC (Disconnect) RD (Request Disc.) UA (Unnumbered Ack) SIM (Set Initialization Mode) RIM (Request Initialization Mode) FRMR (Frame Reject) RSET (Reset) UP (Unnumbered Poll) UI (Unnumbered Info) XID (Exchange ID) TEST (Test) UI (Unnumbered Info) XID (Exchange ID) TEST (Test) DM (Disconnect Mode) I (Information) RR (Receive Ready) RNR (Receive Not Ready) REJ (Reject) SREJ (Selective Reject) 1 7 N(R) N(R) N(R) 6 C-Field Format 5 P F P F P F P F P F 0 P 0 0 4 3 N(S) 0 1 0 0 2 1 0 1 1

N(R) N(R) 0

1 1 1

0 1 1

0 0 1

1 1 1

P F P

Unnumbered

0 0 0

1 1 0

0 1 0

P F F P F F P P P F P F P F

0 0 0

0 0 1

1 1 1

1 1 1

1 1 0 0 1 1

0 0 0 0 0 1

0 0 1 0 1 1

0 1 0 0 1 0

1 1 0 0 1 0

1 1 1 1 1 1

1 1 1 1 1 1

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-5

HDLC I Frame & S Frame Extended Numbering Formats


Format Commands Responses 8 Information Transfer I (Information) I (Information) 7 6 C-Field Format 5 N(S) N(R) 0 0 0 0 N(R) 0 0 0 0 N(R) 0 0 0 0 N(R) 0 0 0 0 N(R) 1 1 0 1 0 0 0 1 0 0 0 0 4 3 2 1 0 P F 1 P F 1 P F 1 P F 1 P F

RR (Receive Ready)

RR (Receive Ready)

Supervisory

RNR (Receive Not Ready) REJ (Reject)

RNR (Receive Not Ready) REJ (Reject)

SREJ (Selective Reject)

SREJ (Selective Reject)

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-6

HDLC Operation 1. I-Frames:

! Contains user data ! Contains the sequence number of the transmitted


frame

! Contains a piggybacked acknow ledgement for


received I-frames (N(r) = Next frame expected)

! Maximum w indow size is 7 or 127 ! I-frame contains a poll/final (P/F) bit.


- In NRM t he primary sets the P-bit to issue a POLL. The secondary sets the F-bit in last I-frame of a response. - In ARM and ABM, the P/F bit is used to force a response.

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-7

2. S-Frames: Used for both flow control and error control a) Receive Ready (RR)

! Used as positive acknow ledgement (thru


N(r)-1) w hen no I-frame is available for piggybacking. ! Primary can issue a POLL by setting P-bit. ! Secondary response w ith F-bit set if it has no data to send. b) Receive Not Ready (RNR)

! Used as positive acknow ledgement (thru


N(r)-1) and a request that no more I-frames be sent until a subsequent RR is used. ! Primary or Combined station can set P-bit to solicit t he receive st at us of a secondary/combined station. ! Secondary/Combined station response to Poll w ith F-bit set if the station is busy. c) Reject (REJ)

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


d) Selective Reject (SREJ)

! Selective Repeat technique (Repeat N(r))

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-8

3. U-Frames: Categories:

! Mode Setting
SNRM, SNRME, SARM, SARME, SABM, SABME UA, DM RIM, SIM RD, DISC

! Information Transfer
UP UI

! Recovery
FRMR, RSET - Invalid Control Field - Data Field Too Long - Data Field Not Allow ed With Received Frame Type - Invalid Receive Count

! Miscellaneous
XID TEST

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-9

HDLC Command/Response Repertoire Options Basic Repertoire: Commands: I, RR, RNR, (SNRM or SARM or SABM), DISC Responses: I, RR, RNR, UA, DM, FRMR Functional Extensions (Options): 1. For Sw itched Circuits Commands: ADD - XID; Responses: ADD - XID, RD 2. For 2-w ay Simultaneous Commands & Responses: ADD - REJ 3. For Single Frame Retransmission Commands & Responses: ADD - SREJ 4. For Information Commands & Responses: ADD - UI 5. For Initialization Commands: ADD - SIM; Responses: ADD - RIM 6. For Group Polling Commands: ADD - UP 7. Extended Addressing 8. Delete Response I Frames 9. Delete Command I Frames 10. Extended Numbering 11. For Mode Reset (ABM only) Commands: ADD - RSET 12. Data Link Test Commands & Responses: ADD - TEST 13. Request Disconnect Responses: ADD - RD 14. 32-bit FCS

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-10

Examples of HDLC Operation

Link Establishment and Termination - NRM

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-11

Data Transfer - NRM

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-12

Link Establishment and Termination - ABM

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-13

Data Transfer - Balanced Mode

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-14

Busy Condition

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-15

Reject Recovery

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-16

Selective Reject Recovery

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-17

Timeout Recovery

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-18

LAPB State Diagram

! LAPB Addresses:

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-19

LAPB Commands and Responses

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-20

Various Data Link Control Frame Formats

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-21

The Point-to-Point Protocol (PPP)

! Used on the Internet for router-to-router and home


user-to-ISP data links.

! PPP provides three features:


- A framing method that delineates frames. the frame format also handles error detection. - A Link Control Protocol (LCP) for bringing lines up, testing them, negotiating options, and bring them dow n gracefully. This protocol supports both synchronous and asynchronous circuits and both byte-oriented and bit-oriented encodings. - A w ay to negotiate netw ork layer options in a w ay that is independent of the netw ork layer protocol used. A different Netw ork Control Protocol (NCP) is used for each netw ork layer supported.

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-22

PPP State Diagram for Line Activation

! Dead (or IDLE): ! ! ! ! !


No active carrier or connection exists. Establish: LCP option negotiation 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.

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-23

PPP Frame Format

! The PPP frame format is similar to HDLC. ! The address and control fields are alw ays constant. ! The Protocol field indicates w hat kind of packet is in
the Payload field (e.g., LCP, NCP, IP, IPX, AppleTalk, etc.)

! The Payload field has a variable length and its


maximum is negotiated. The default maximum is 1500 bytes.

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-24

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.

! LCP Packets (Protocol field = C021 1 6 ):

Options: packet size, authentication, compression. etc.

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-25

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 Challenge Handshake Authentication Protocol (CHAP).

! PAP:

! PAP Packets (Protocol field = C023 1 6 ):

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-26

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

! CHAP Packets (Protocol field = C223 1 6 ):

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-27

The Network Control Protocol (NCP)

! NCP is a set of control protocols to allow the


encapsulation of data from various netw ork layer protocols; such as, IP, IPX, AppleTalk, etc..

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-28

The Internetwork Protocol Control Protocol (IPCP)

! IPCP is the protocol used to establish a netw ork layer


connection for carrying IP data.

! IPCP Packet Encapsulation in a PPP Frame:

! IPCP Packets: (protocol field = 8021 1 6 ):


Configure-request Configure-ack Configure-nak Configure-reject Terminate-request Terminate-ack Code-reject After configuration, the link is ready to carry IP data in the payload field of a PPP frame. The protocol field value is set to 0021 1 6 to indicate IP data is being carried.

! Note:

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-29

Example PPP Session

Copyright December 2 1, 2004 by Chaim Ziegler, Ph.D.

DataLink2-30