bit oriented protocols
TRANSCRIPT
-
8/13/2019 Bit Oriented Protocols
1/30
-
8/13/2019 Bit Oriented Protocols
2/30
DataLink2-2Copyright December 21, 200 4 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 two combined stations only.
-
8/13/2019 Bit Oriented Protocols
3/30
DataLink2-3Copyright December 21, 200 4 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 initiate transmission.
-
8/13/2019 Bit Oriented Protocols
4/30
DataLink2-4Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
HDLC Frame Structure
!All transmissions use frames w ith following fields:- Flag: 8 bits (01111110) with 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
-
8/13/2019 Bit Oriented Protocols
5/30
DataLink2-5Copyright December 21, 200 4 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 NotReady)
RNR(Receive NotReady)
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
-
8/13/2019 Bit Oriented Protocols
6/30
DataLink2-6Copyright December 21, 200 4 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
-
8/13/2019 Bit Oriented Protocols
7/30
DataLink2-7Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
HDLC Operation
1. I-Frames:
!Contains user data
!Contains the sequence number of the transmittedframe
! Contains a piggybacked acknowledgement forreceived I-frames (N(r) = Next frame expected)
!Maximum window size is 7 or 127
!I-frame contains a poll/final (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.
-
8/13/2019 Bit Oriented Protocols
8/30
DataLink2-8Copyright December 21, 200 4 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) when no I-frame is available forpiggybacking.
!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 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 the receive status of asecondary/combined station.
!Secondary/Combined station response to Pollwith 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))
-
8/13/2019 Bit Oriented Protocols
9/30
DataLink2-9Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
3. U-Frames:
Categories:
!Mode Setting
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
-
8/13/2019 Bit Oriented Protocols
10/30
DataLink2-10Copyright December 21, 200 4 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, FRMRFunctional Extensions (Options):1. For Switched Circuits
Commands: ADD - XID; Responses: ADD - XID, RD2. For 2-way Simultaneous
Commands & Responses: ADD - REJ3. For Single Frame Retransmission
Commands & Responses: ADD - SREJ
4. For InformationCommands & Responses: ADD - UI
5. For InitializationCommands: ADD - SIM; Responses: ADD - RIM
6. For Group PollingCommands: ADD - UP
7. Extended Addressing8. Delete Response I Frames
9. 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
-
8/13/2019 Bit Oriented Protocols
11/30
DataLink2-11Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
Link Establishment and Termination - NRM
Examples of HDLC Operation
-
8/13/2019 Bit Oriented Protocols
12/30
DataLink2-12Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
Data Transfer - NRM
-
8/13/2019 Bit Oriented Protocols
13/30
DataLink2-13Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
Link Establishment and Termination - ABM
-
8/13/2019 Bit Oriented Protocols
14/30
DataLink2-14Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
Data Transfer - Balanced Mode
-
8/13/2019 Bit Oriented Protocols
15/30
DataLink2-15Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
Busy Condition
-
8/13/2019 Bit Oriented Protocols
16/30
DataLink2-16Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
Reject Recovery
-
8/13/2019 Bit Oriented Protocols
17/30
DataLink2-17Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
Selective Reject Recovery
-
8/13/2019 Bit Oriented Protocols
18/30
DataLink2-18Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
Timeout Recovery
-
8/13/2019 Bit Oriented Protocols
19/30
DataLink2-19Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
LAPB State Diagram
!LAPB Addresses:
-
8/13/2019 Bit Oriented Protocols
20/30
DataLink2-20Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
LAPB Commands and Responses
-
8/13/2019 Bit Oriented Protocols
21/30
DataLink2-21Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
Various Data Link Control Frame Formats
-
8/13/2019 Bit Oriented Protocols
22/30
DataLink2-22Copyright December 21, 200 4 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, negotiating options, and bringthem down 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 waythat is independent of the netw ork layer protocolused. A different Network Control Protocol
(NCP) is used for each netw ork layer supported.
-
8/13/2019 Bit Oriented Protocols
23/30
DataLink2-23Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
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.
!Network:The appropriate NCP protocol is invoked.
!Open:Data transport takes place.
!Terminate:The connection is closed.
-
8/13/2019 Bit Oriented Protocols
24/30
DataLink2-24Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
PPP Frame Format
!The PPP frame format is similar to HDLC.
!The address and control f ields are always constant.
!The Protocol f ield indicates what kind of packet is inthe Payload f ield (e.g., LCP, NCP, IP, IPX, AppleTalk,
etc.)
! The Payload field has a variable length and itsmaximum is negotiated. The default maximum is1500 bytes.
-
8/13/2019 Bit Oriented Protocols
25/30
DataLink2-25Copyright December 21, 200 4 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.
-
8/13/2019 Bit Oriented Protocols
26/30
DataLink2-26Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
The Password Authentication Protocol (PAP)!Authentication means validat ing a user who needs to
access a set of resources.! PPP has tw o protocols for authentication: Password
Authent ication Protocol (PAP) and ChallengeHandshake Authentication Protocol (CHAP).
!PAP:
16!PAP Packets (Protocol field = C023 ):
-
8/13/2019 Bit Oriented Protocols
27/30
DataLink2-27Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
Challenge Handshake Authentication Protocol (CHAP)!CHAP - 3-way handshake (password is never sent):
16!CHAP Packets (Protocol field = C223 ):
-
8/13/2019 Bit Oriented Protocols
28/30
DataLink2-28Copyright December 21, 200 4 by Chaim Ziegler, Ph.D.
The Network Control Protocol (NCP)
! NCP is a set of control protocols to allow theencapsulation of data from various network layerprotocols; such as, IP, IPX, AppleTalk, etc..
-
8/13/2019 Bit Oriented Protocols
29/30
DataLink2-29Copyright December 21, 200 4 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 field = 8021 ):
- Configure-request- Configure-ack- Configure-nak- Configure-reject- Terminate-request
- Terminate-ack- Code-reject
!Note:After conf iguration, 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.
-
8/13/2019 Bit Oriented Protocols
30/30
Example PPP Session