World current time now,
Calendar monthly, yearly

IT. Articles. Servers, programming, web pages

Previous articlePage bottomNext article  ALL TOPICS

Computer network. TCP/IP. HDLC, LLC

High-Level Data Link Control (HDLC)   HDLC is the protocol which is now considered an umbrella under which many Wide Area protocols sit. ITU-T developed HDLC in 1979, and within HDLC there are three types of stations defined:
  1. Primary Station - this completely controls all data link operations issuing commands from secondary stations and has the ability to hold separate sessions with different stations.
  2. Secondary Station - this can only send responses to one primary station. Secondary stations only talk to each other via a Primary station.
  3. Combined Station - this can transmit and receive commands and responses from one other station.
Configuring a channel for use by a station can be done in one of three ways:
  1. Unbalanced - this configuration allows one primary station to talk to a number of secondary stations over half-duplex, full-duplex, switched, unswitched, point-to-point or multipoint paths.
  2. Symmetrical - where commands and responses are multiplexed over one physical channel when two stations with primary and secondary parts have a point-to-point link joining them.
  3. Balanced - where two combined stations communicate over a point-to-point link which can be full/half-duplex or switch/unswitched.
When transferring data, stations are in one of three modes:
  1. Normal Response Mode (NRM) where the secondary station needs permission from the primary station before it can transmit data. Mainly used on multi-point lines.
  2. Asynchronous Response Mode (ARM) where the secondary station can send data without receiving permission from the primary station. This is hardly ever used.
  3. Asynchronous Balanced Mode (ABM) where either station can initiate transmission without permission from the other. This is the most common mode used on point-to-point links.
The following diagram details the HDLC frame format:   image10   The HDLC frame begins and ends the error checking procedure with 0x7E which is 01111110 in binary.   There are three types of HDLC frame types defined by the control field:
  1. Information Frames are used for the data transfer between stations. The send sequence, or next send N(S), and the receive sequence, or next receive N(R), hold the frame sequence numbers. The Poll/Final bit is called Poll when used by the primary station to obtain a response from a secondary station, and Final when used by the secondary station to indicate a response or the end of transmission.
  2. Supervisory Frames are used to acknowledge frames, request for retransmissions or to ask for suspension of transmission. The Supervisory code denotes the type of supervisory frame being sent.
  3. Unnumbered Frames are used for link initialisation or link disconnection. The Unnumbered bits indicate the type of Unnumbered frame being used.
Logical Link Control (LLC)
  LLC is a subset of High-Level Data Link Control (HDLC) and uses the Asynchronous Balanced Mode (ABM) subclass of HDLC. It sits in the Data Link layer between the MAC layer and the layer 3 protocols and forms an important part of the 802.2 specification.   There are three Classes of LLC:
  1. LLC Class 1 - Connection-less (CL), this service sends and receives Link Service Data Units (LSDU) without the need for acknowledgement. It supports point-to-point, multipoint and broadcast communication and is suitable for higher level protocols that do all the sequencing, addressing, routing and recovery. These include IPX, TCP/IP, Vines, XNS, AppleTalk etc. LLC1 is less intense on network resources than LLC2 or LLC3 as there is less requirement for the data-integrity measures included within the following two methods. The responsibility for data flow and integrity rests with the layer 3 protocols. LLC1 operates Type 1 operations which means that Protocol Data Units (PDU) are exchanged without connections, there is no sequencing, acknowledgement or error-checking of PDUs.
  2. LLC Class 2 - Connection-Oriented (CO), this is a connection-oriented service that provides a point-to-point link between Link Service Access Points (LSAP). Although LLC2 responds to the higher layer protocol with respect to opening and closing connections, LLC2 is responsible for flow control, sequencing the frames and error recovery. LLC2 can operate Type 1 or Type 2 operations, where a connection has to be established, acknowledgement, sequencing and error checking all take place in the LLC sublayer. LLC2 is generally required in environments that run protocols such as NetBIOS and SNA.
  3. LLC Class 3 - Acknowledged-Connectionless (AC), this is a 'connectionless-acknowledged' implementation that is rarely used.
The following diagram shows the structure of the LLC PDU.   image11   This sits at the start of the data part of the Ethernet frame (see the IPX/SPX document).   The following table lists the LLC command PDUs:  
Operation Command Response Format Control Field Hex. Value
Type 1 (CL) Unnumbered Information (UI)   Unnumbered (U) 03
  Exchange Identification (XI) Exchange Identification (XI) Unnumbered (U) AF, BF
  Test (TEST) Test (TEST) Unnumbered (U) E, F3
Type 2 (CO) Information (I) Information (I) Information (I) 00 00 to FE FF
  Receiver Ready (RR) Receiver Ready (RR) Supervisory (S) 01 00 to 01 FF
  Receiver Not Ready (RNR) Receiver Not Ready (RNR) Supervisory (S) 05 00 to 05 FF
  Reject (REJ) Reject (REJ) Supervisory (S) 09 00 to 09 FF
  Set Asynchronous Balance Mode Extended (SABME) Unnumbered Acknowledgement (UA) Unnumbered (U) 6F, 7F (SABME) and 63, 73 (UA)
  Disconnect (DISC) Disconnected Mode (DM) Unnumbered (U) 43, 53 (DISC) and 0F, 1F (DM)
    Frame Reject (FRMR) Unnumbered (U) 87, 97
Type 3 (AC) Ack Connectionless, seq 0 (AC0) Ack Connectionless, seq 0 (AC0) Unnumbered (U) 67, F7
  Ack Connectionless, seq 0 (AC1) Ack Connectionless, seq 0 (AC1) Unnumbered (U) E7, F7
  The LLC SAP's job is to sort the up and coming MAC frames and direct them to the appropriate application or upper layer protocol. NetBIOS uses the SAP address of F0, IP uses 06 whilst DLSw uses 04 and Network Management uses F4. The Null SAP, address 00 does not identify any SAP to any protocol.   A more complete list follows:  
SAP Protocol
00 Null SAP
04 SNA
05 SNA
06 TCP
08 SNA
42 Spanning Tree
7F ISO 802.2
80 XNS
FF Global SAP
  The complete list can be found at http://www.iana.org/assignments/ieee-802-numbers.   The Control field identifies sequencing and/or commands/responses. There are three types:   image12  
  1. The Information Transfer (I) PDU carries out a numbered information transfer in Type 2 operations.
  2. The Supervisory (S) PDU carries out acknowledgement, retransmit requests and suspends of I PDUs in Type 2 operations.
  3. The Unnumbered (U) PDU carries out some control functions and unsequenced information transfer in Type 1 operations.
There is the special case of Subnetwork Access Protocol (SNAP) where the DSAP and SSAP are set to AA and the Control field set to 03. Then, immediately after the control field there are three bytes set aside for the Organisational Unique Identifier (OUI) and then two bytes for the Protocol Identifier (PID) (see the IPX/SPX document).   The SAP is generally used for the 802.x compliant protocols, however, the idea of SNAP is to allow non-IEEE compliant protocols to become pseudo-compliant without a major re-write of code for network drivers. An OUI of 00-00-00 indicates that the frame is an Ethernet frame rather than an 802.3 frame that is not assigned to any particular vendor. This useful for when the frame crosses different media. On coming out the other side it will be rebuilt as an Ethernet frame rather than something else.   
Previous articlePage topNext article  ALL TOPICS

 Use username: Guest, Anonymous, Programmer

We make our friends; we make our enemies; but God makes our next door neighbour.
G. K. Chesterton
I just love it when people ask me food and I have questions in my mouth!
A friend loveth at all times, and a brother is born for adversity.
Proverbs 1717 Bible