HDLC (High-Level Data Link Control)

      Bit oriented (treats frames as bit streams)

      Supports both half-duplex and full-duplex

      Data Link protocol

 

Three types of stations run the HDLC protocol:

1.      Primary manages stations by issuing commands to other stations and acting on their responses.

2.      Secondary responds to commands issued by a primary station

3.      Combined can act as primary and secondary

 

Stations running HDLC can communicate by:

         NRM (Normal Response Mode) primary station controls the communication.

         ARM (Asynchronous Response Mode) secondary is more independent and can send data & control information (not commands) to primary without explicit instructions from primary.

         ABM (Asynchronous Balanced Mode) connecting combined stations.Either station can send data, control information, or commands.This is the X.25 standard.

 

Frame format is given in handout.

         Flag:(8 bits) 01111110

         Address:(8 bits extendable)In NRM and ABM, this field is the field of the secondary when both sending and receiving (secondary stations send only to primary).An address could be a group address or a broadcast address (all ones) and in this case, any secondary station can retrieve the information.

         FCS:(16 or 32 bits)Frame Check Sequence CRC error detection.

         Data Information:variable length

         Control:Defines type of frame.There are three types:

 

1.Information used to transfer information using either the go-back-n or selective repeat sliding window protocols.

 

I-Frame (given in handout)

Number of bits:

1

3

1

3

 

0

N(S)

P/F

N(R)

N(R):number of received frame, piggyback acknowledgement indicating that all frames up to N(R) 1 have been received.

N(S):number of the frame being sent.

P/F:��final poll bit is the frame being sent by a primary (poll bit) or secondary (final bit).If final bit, then indicates whether the current frame is the last frame.

 


2.Supervisory - used by any station to indicate its status or the NAK frames received incorrectly.

S-Frame (given in handout)

Number of bits:

1

1

2

1

3

 

1

0

S

P/F

N(R)

S:is either:

00

RR:Receive Ready

Used to indicate a station is ready and able to receive information or when an acknowledgement is needed and no data needs to be sent.

01

REJ:Reject

Resend all outstanding frames starting with the frame number specified in N(R).

10

RNR:Receive Not Ready

To stop the flow of incoming frames (when a stations buffers are filling up or there's an error detected)

11

SREJ:Selective Reject

Resend frame number N(R).

 

3.      Unnumbered used to establish how the protocol will proceed (additional link control)

U-Frame (given in handout)

Number of bits:

1

1

2

1

3

 

1

1

U

P/F

U

Five bits of the U field yield 25 = 32 possible commands under the following four categories:

1.      Mode-setting commands and responses used by primary/combined station to initialize or change the mode of the secondary/combined station. (SNRM/SNRME, SARM/SARME, SABM, SABME, UA, UI, DISC, DM, RIM, RD)

2.      Information transfer commands and responses used to exchange information between stations. (UI, UP)

3.      Recovery commands and responses used when normal mechanisms do not work.(FRMR, RSET)

4.      Miscellaneous commands and responses XID (exchange identification) and TEST.

 

 

X.25

 

The X series of protocols was developed to standardize public data networks, especially between countries.These are commonly packet-switched networks.These networks operate (typically) in one of two modes:

1.      Virtual circuit between two points.Connection is established between two points and the route is fixed. Packets are sent along this route (but the route is not dedicated to this circuit).

2.      Datagram service.Each packet contains the source and destination addresses, routers route the packet to the destination.

 

X.25 defines a protocol (not a network) between a DTE (data terminal equipment) and a DCE (data circuit terminating equipment). It defines a synchronous transmission similar to the three lowest layers of OSI.


 

Network Layer

<- packet layer ->

Network Layer

Data Link Layer

<- LAPB ->

Data Link Layer

Physical Layer

<- X.21 or X.21bis ->

Physical Layer

 

Format of an X.25 packet is given in handout. There are two types of packets:a control packet and a data packet. Packet level specifies a virtual-circuit service.There are 2 types of vc:virtual call (dynamically established using a call setup and call clearing procedure similar to X.21) and permanent vc (transfer occurs as with virtual calls, but no setup or clearing required).

 

 

Data packet

Q

D

0

1

Group #

Channel #

P(R)

M

P(S)

0

Data

 

Generic Control Packet

0

0

0

1

Group #

Channel #

Packet Type

1

Additional Information

 

 

Call Request, Indication

0

0

0

1

Group #

Channel #

0

0

0

0

1

0

1

1

Source Address Length

Destination Addr. Length

Addresses

0

0

Facilities Length

Facilities

Data (16 or 128 octets)

 

Clear Request, Indication

0

0

0

1

Group #

Channel #

0

0

0

1

0

0

1

1

Cause

 

Confirmation, Accepted

0

0

0

1

Group #

Channel #

-

-

-

-

-

1

1

1

 

 

GFI General Format Indentifier (4 bits) specifies the packet format.QD01 (3-bit sequence numbers) or QD10 (7-bit sequence numbers). D:if 0, acks come from DCE, if 1, acks come from DTE.


X.21

 

X.21 is a standard defined as an interface between DTE (data terminal equipment) and DCE (Data circuit terminating equipment) you can think of DTE being a station and DCE a node.

 

X.21 consists of three parts, which correspond to OSI layers 1, 2, and 3.

 

Layer 1:It provides a general-purpose interface that can be used for station attachment to a circuit-switched or packet-switched network.

 

Layer 2: Concerned with the transfer of control information between DTE and DCE over the transmit (T) and receive (R) circuits. The eighth bit of each byte is an odd parity bit.X.21 does not encapsulate data being transmitted to the network nor decapsulate data coming from the network.It passes data transparently so that once a connection is established it functions as a direct point-to-point link.Once a circuit is established, the DTEs may use HDLC (or some other data link control protocol) for end-to-end transfer.

 

 

Layer 3:Defines the procedures for identifying DTEs and requesting, establishing, and terminating data connections.

 

References:

Stallings, William, Data and Computer Communications.