Bit Oriented Data Link Protocols Examples: ! High-level Data Link ...
Bit Oriented Data Link Protocols Examples: ! High-level Data Link ...
Bit Oriented Data Link Protocols Examples: ! High-level Data Link ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Bit</strong> <strong>Oriented</strong> <strong>Data</strong> <strong>Link</strong> <strong>Protocols</strong><br />
<strong>Examples</strong>:<br />
! <strong>High</strong>-<strong>level</strong> <strong>Data</strong> <strong>Link</strong> Control (HDLC) - ISO<br />
! Advanced <strong>Data</strong> Communications Control Procedures<br />
(ADCCP) - ANSI<br />
! Synchronous <strong>Data</strong> <strong>Link</strong> Control (SDLC) - IBM<br />
! <strong>Link</strong> Access Procedure, Balanced (LAPB) - ITU-T (for<br />
X.25)<br />
! <strong>Link</strong> Access Procedure, D-Channel (LAPD) - ITU-T (for<br />
ISDN)<br />
! <strong>Link</strong> Access Procedure for Frame-Mode Bearer Services<br />
(LAPF)<br />
! Logical <strong>Link</strong> Control (LLC) - IEEE 802.2<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-1
HDLC<br />
! Type of Stations:<br />
1. Primary (issues commands)<br />
2. Secondary (issues responses)<br />
3. Combined<br />
! <strong>Link</strong> Configurations:<br />
1. Unbalanced:<br />
Consists of one primary and one or more<br />
secondaries.<br />
2. Balanced:<br />
Consists of two combined stations only.<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-2
HDLC <strong>Data</strong> Transfer Modes:<br />
! Normal Response Mode (NRM):<br />
This is an unbalanced configuration. The primary<br />
uses polling and selection.<br />
! Asynchronous Response Mode (ARM):<br />
This is an unbalanced configuration. The secondary<br />
may send response frames without explicit<br />
permission from the primary.<br />
! Asynchronous Balanced Mode (ABM):<br />
This is a balanced configuration. Either combined<br />
station may initiate transmission.<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-3
HDLC Frame Structure<br />
! All transmissions use frames w ith follow ing fields:<br />
- Flag: 8 bits (01111110) with bit stuffing<br />
- Address: One or more octets (for multipoint lines)<br />
- Control: 8 or 16 bits<br />
- Information: variable length<br />
- Frame Check Sequence (FCS): 16 or 32 bits<br />
- Flag: 8 bits<br />
! Types of Frames:<br />
- Information Frames (I Frames)<br />
- Supervisory Frames (S Frames)<br />
- Unnumbered Frames (U Frames) (IBM - NS)<br />
! HDLC uses synchronous transmission<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-4
HDLC Command/Response Repertoire<br />
Format Commands Responses C-Field Format<br />
8 7 6 5 4 3 2 1<br />
Information<br />
Transfer<br />
I<br />
(Information)<br />
I<br />
(Information)<br />
N(R)<br />
P<br />
F<br />
N(S) 0<br />
RR<br />
(Receive Ready)<br />
RR<br />
(Receive Ready)<br />
N(R)<br />
P<br />
F<br />
0 0 0 1<br />
Supervisory<br />
RNR<br />
(Receive Not<br />
Ready)<br />
REJ<br />
(Reject)<br />
RNR<br />
(Receive Not<br />
Ready)<br />
REJ<br />
(Reject)<br />
N(R)<br />
N(R)<br />
P<br />
F<br />
P<br />
F<br />
0 1 0 1<br />
1 0 0 1<br />
SREJ<br />
(Selective Reject)<br />
SREJ<br />
(Selective Reject)<br />
N(R)<br />
P<br />
F<br />
1 1 0 1<br />
SNRM<br />
(Set Normal<br />
Response Mode)<br />
1 0 0 P 1 1 1 1<br />
SARM<br />
Set Asynch.<br />
Response Mode)<br />
DM<br />
(Disconnect Mode)<br />
0 0 0 P<br />
F<br />
1 1 1 1<br />
Unnumbered<br />
SABM<br />
(Set Asynch.<br />
Balanced Mode)<br />
SNRME<br />
(Set Normal<br />
Response Mode)<br />
SARME<br />
Set Asynch.<br />
Response Mode)<br />
SABME<br />
(Set Asynch.<br />
Balanced Mode)<br />
0 0 1 P 1 1 1 1<br />
1 1 0 P 1 1 1 1<br />
0 1 0 P 1 1 1 1<br />
0 1 1 P 1 1 1 1<br />
DISC<br />
(Disconnect)<br />
RD<br />
(Request Disc.)<br />
0 1 0 P<br />
F<br />
0 0 1 1<br />
UA<br />
(Unnumbered Ack)<br />
0 1 1 F 0 0 1 1<br />
SIM<br />
(Set<br />
Initialization Mode)<br />
RIM<br />
(Request<br />
Initialization Mode)<br />
0 0 0 P<br />
F<br />
0 1 1 1<br />
FRMR<br />
(Frame Reject)<br />
1 0 0 F 0 1 1 1<br />
RSET<br />
(Reset)<br />
UP<br />
(Unnumbered Poll)<br />
1 0 0 P 1 1 1 1<br />
0 0 1 P 0 0 1 1<br />
UI<br />
(Unnumbered Info)<br />
UI<br />
(Unnumbered Info)<br />
0 0 0 P<br />
F<br />
0 0 1 1<br />
XID<br />
(Exchange ID)<br />
XID<br />
(Exchange ID)<br />
1 0 1 P<br />
F<br />
1 1 1 1<br />
TEST<br />
(Test)<br />
TEST<br />
(Test)<br />
1 1 1 P<br />
F<br />
0 0 1 1<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-5
HDLC I Frame & S Frame Extended Numbering Formats<br />
Format Commands Responses C-Field Format<br />
8 7 6 5 4 3 2 1<br />
Information<br />
Transfer<br />
I<br />
(Information)<br />
I<br />
(Information)<br />
N(S) 0<br />
N(R)<br />
P<br />
F<br />
RR<br />
(Receive Ready)<br />
RR<br />
(Receive Ready)<br />
0 0 0 0 0 0 0 1<br />
N(R)<br />
P<br />
F<br />
Supervisory<br />
RNR<br />
(Receive Not<br />
Ready)<br />
RNR<br />
(Receive Not<br />
Ready)<br />
0 0 0 0 0 1 0 1<br />
N(R)<br />
P<br />
F<br />
REJ<br />
(Reject)<br />
REJ<br />
(Reject)<br />
0 0 0 0 1 0 0 1<br />
N(R)<br />
P<br />
F<br />
SREJ<br />
(Selective Reject)<br />
SREJ<br />
(Selective Reject)<br />
0 0 0 0 1 1 0 1<br />
N(R)<br />
P<br />
F<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-6
HDLC Operation<br />
1. I-Frames:<br />
! Contains user data<br />
! Contains the sequence number of the transmitted<br />
frame<br />
! Contains a piggybacked acknowledgement for<br />
received I-frames (N(r) = Next frame expected)<br />
! Maximum window size is 7 or 127<br />
! I-frame contains a poll/final (P/F) bit.<br />
- In NRM the primary sets the P-bit to issue a<br />
POLL. The secondary sets the F-bit in last<br />
I-frame of a response.<br />
- In ARM and ABM, the P/F bit is used to force<br />
a response.<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-7
2. S-Frames:<br />
Used for both flow control and error control<br />
a) Receive Ready (RR)<br />
! Used as positive acknowledgement (thru<br />
N(r)-1) when no I-frame is available for<br />
piggybacking.<br />
! Primary can issue a POLL by setting P-bit.<br />
! Secondary response w ith F-bit set if it has no<br />
data to send.<br />
b) Receive Not Ready (RNR)<br />
! Used as positive acknowledgement (thru<br />
N(r)-1) and a request that no more I-frames<br />
be sent until a subsequent RR is used.<br />
! Primary or Combined station can set P-bit to<br />
solicit the receive status of a<br />
secondary/combined station.<br />
! Secondary/Combined station response to Poll<br />
w ith F-bit set if the station is busy.<br />
c) Reject (REJ)<br />
! Go-Back-N technique (Retransmit from N(r))<br />
d) Selective Reject (SREJ)<br />
! Selective Repeat technique (Repeat N(r))<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-8
3. U-Frames:<br />
Categories:<br />
! Mode Setting<br />
SNRM, SNRME, SARM, SARME, SABM, SABME<br />
UA, DM<br />
RIM, SIM<br />
RD, DISC<br />
! Information Transfer<br />
UP<br />
UI<br />
! Recovery<br />
FRMR, RSET<br />
! Miscellaneous<br />
XID<br />
TEST<br />
- Invalid Control Field<br />
- <strong>Data</strong> Field Too Long<br />
- <strong>Data</strong> Field Not Allow ed With Received<br />
Frame Type<br />
- Invalid Receive Count<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-9
HDLC Command/Response Repertoire Options<br />
Basic Repertoire:<br />
Commands:<br />
I, RR, RNR, (SNRM or SARM or SABM), DISC<br />
Responses:<br />
I, RR, RNR, UA, DM, FRMR<br />
Functional Extensions (Options):<br />
1. For Switched Circuits<br />
Commands: ADD - XID; Responses: ADD - XID, RD<br />
2. For 2-way Simultaneous<br />
Commands & Responses: ADD - REJ<br />
3. For Single Frame Retransmission<br />
Commands & Responses: ADD - SREJ<br />
4. For Information<br />
Commands & Responses: ADD - UI<br />
5. For Initialization<br />
Commands: ADD - SIM; Responses: ADD - RIM<br />
6. For Group Polling<br />
Commands: ADD - UP<br />
7. Extended Addressing<br />
8. Delete Response I Frames<br />
9. Delete Command I Frames<br />
10. Extended Numbering<br />
11. For Mode Reset (ABM only)<br />
Commands: ADD - RSET<br />
12. <strong>Data</strong> <strong>Link</strong> Test<br />
Commands & Responses: ADD - TEST<br />
13. Request Disconnect<br />
Responses: ADD - RD<br />
14. 32-bit FCS<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-10
<strong>Examples</strong> of HDLC Operation<br />
<strong>Link</strong> Establishment and Termination - NRM<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-11
<strong>Data</strong> Transfer - NRM<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-12
<strong>Link</strong> Establishment and Termination - ABM<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-13
<strong>Data</strong> Transfer - Balanced Mode<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-14
Busy Condition<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-15
Reject Recovery<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-16
Selective Reject Recovery<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-17
Timeout Recovery<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-18
LAPB State Diagram<br />
! LAPB Addresses:<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-19
LAPB Commands and Responses<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-20
Various <strong>Data</strong> <strong>Link</strong> Control Frame Formats<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-21
The Point-to-Point Protocol (PPP)<br />
! Used on the Internet for router-to-router and home<br />
user-to-ISP data links.<br />
! PPP provides three features:<br />
- A framing method that delineates frames. the frame<br />
format also handles error detection.<br />
- A <strong>Link</strong> Control Protocol (LCP) for bringing lines up,<br />
testing them, negotiating options, and bring<br />
them down gracefully. This protocol supports<br />
both synchronous and asynchronous circuits and<br />
both byte-oriented and bit-oriented encodings.<br />
- A w ay to negotiate netw ork layer options in a w ay<br />
that is independent of the network layer protocol<br />
used. A different Network Control Protocol<br />
(NCP) is used for each network layer supported.<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-22
PPP State Diagram for Line Activation<br />
! Dead (or IDLE):<br />
No active carrier or connection exists.<br />
! Establish:<br />
LCP option negotiation begins.<br />
! Authenticate (optional):<br />
The two end points authenticate each other.<br />
! Network:<br />
The appropriate NCP protocol is invoked.<br />
! Open:<br />
<strong>Data</strong> transport takes place.<br />
! Terminate:<br />
The connection is closed.<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-23
PPP Frame Format<br />
! The PPP frame format is similar to HDLC.<br />
! The address and control fields are always constant.<br />
! The Protocol field indicates what kind of packet is in<br />
the Payload field (e.g., LCP, NCP, IP, IPX, AppleTalk,<br />
etc.)<br />
! The Payload field has a variable length and its<br />
maximum is negotiated. The default maximum is<br />
1500 bytes.<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-24
The <strong>Link</strong> Control Protocol (LCP)<br />
! LCP Packet Encapsulated in a PPP Frame:<br />
- Code: Defines the type of LCP packet.<br />
- ID: Value used to match a request w ith a response.<br />
! LCP Packets (Protocol field = C021<br />
16):<br />
Options: packet size, authentication, compression. etc.<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-25
The Password Authentication Protocol (PAP)<br />
! Authentication means validating a user w ho needs to<br />
access a set of resources.<br />
! PPP has two protocols for authentication: Password<br />
Authentication Protocol (PAP) and Challenge<br />
Handshake Authentication Protocol (CHAP).<br />
! PAP:<br />
! PAP Packets (Protocol field = C023<br />
16):<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-26
Challenge Handshake Authentication Protocol (CHAP)<br />
! CHAP - 3-w ay handshake (passw ord is never sent):<br />
! CHAP Packets (Protocol field = C223<br />
16):<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-27
The Network Control Protocol (NCP)<br />
! NCP is a set of control protocols to allow the<br />
encapsulation of data from various netw ork layer<br />
protocols; such as, IP, IPX, AppleTalk, etc..<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-28
The Internetwork Protocol Control Protocol (IPCP)<br />
! IPCP is the protocol used to establish a netw ork layer<br />
connection for carrying IP data.<br />
! IPCP Packet Encapsulation in a PPP Frame:<br />
! IPCP Packets: (protocol field = 802116):<br />
- Configure-request<br />
- Configure-ack<br />
- Configure-nak<br />
- Configure-reject<br />
- Terminate-request<br />
- Terminate-ack<br />
- Code-reject<br />
! Note:<br />
After configuration, the link is ready to carry IP data<br />
in the payload field of a PPP frame. The protocol field<br />
value is set to 002116<br />
to indicate IP data is being<br />
carried.<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-29
Example PPP Session<br />
Copyright © December 21, 2004 by Chaim Ziegler, Ph.D.<br />
<strong>Data</strong><strong>Link</strong>2-30