Logical Link Control 1. HDLC - Provides reliable delivery of data frames over a communications link. Provides framing, data transparency, error detection and correction, and flow control. Many other link protocols are drivatives. Frame format: 1. 8-bit flag - 01111110 - Note that bit stuffing is used. The data string 0011 1111 1111 1111 1100 becomes 0011 1110 1111 1011 1110 100 which the transmitter changes back to 0011 1111 1111 1111 1100 2. 8-bit address - for multidrop lines. For command, send the destination address. For response, send you own address. 3. 8-bit control - Information, Supervisory, or Unnumbered frames. sss is send sequence number, rrr is receive sequence number p is poll (command) or final (response) bit, xx is supervisory op code a. 0sssprrr - information frame a'. 0sssssssprrrrrrr - extended control field b. 10xxprrr - supervisory frame - Receive Ready (RR or ack), Reject go back N (REJ or NAK), Selective Reject (SREJ), Receive Not Ready (RNR or WACK) b'. 10xx0000prrrrrrr - extended control field c. 11mmpmmm - unnumbered information, (see below) 4. data - (many bytes) 5. 16 or 32-bit CRC 6. 8-bit flag - 01111110 2. Coding of 8-bit control field (information, supervisory, and unnumbered frames. format 1 2 3 4 5 6 7 8 command response info 0 <-- N(S) -> P/F <-- N(R) -> I I super 1 0 0 0 P/F <-- N(R) -> RR RR 1 0 0 1 P/F <-- N(R) -> REJ REJ 1 0 1 0 P/F <-- N(R) -> RNR RNR 1 0 1 1 P/F <-- N(R) -> SREJ SREJ unnumb 1 1 0 0 P/F 0 0 0 UI UI 1 1 0 0 P 0 0 1 SNRM 1 1 0 0 P/F 0 1 0 DISC RD 1 1 0 0 P 1 0 0 UP 1 1 0 0 F 1 1 0 UA 1 1 0 1 P/F 0 0 0 NR0 NR0 1 1 0 1 P/F 0 0 1 NR1 NR1 1 1 0 1 P/F 0 1 0 NR2 NR2 1 1 0 1 P/F 0 1 1 NR3 NR3 1 1 1 0 P/F 0 0 0 SIM RIM 1 1 1 0 F 0 0 1 FRMR 1 1 1 1 P/F 0 0 0 SARM DM 1 1 1 1 P 0 0 1 RESET 1 1 1 1 P 0 1 0 SARME 1 1 1 1 P 0 1 1 SNRME 1 1 1 1 P 1 0 0 SABM 1 1 1 1 P/F 1 0 1 XID XID 1 1 1 1 P 1 1 0 SABME 3. HDLC commands and responses. Primary station transmits commands containing address of secondary. Secondary station transmits responses containing its own address. (If frame sent to you contains your address, it is a command and you are a secondary. Otherwise, it is response and you are a primary). I Information - Virtual circuit service with flow control RR Receive Ready (ACK) - Always with I. RNR Receive Not Ready (WACK = ACK but my buffers are full) - With I. REJ REJect (NAK) - With I for full duplex service (HDLC extension 2) SREJ Selective REJect - (HDLC extension 3) Basic HDLC uses one of three "modes" (SNRM, SARM, or SABM) below with UA, DISC, DM and FRMR) plus the I, RR, and RNR commands and responses above SNRM Set Normal Response Mode - Primary sends commands, secondary replies with responses). Multidrop lines OK. SARM Set Asynchronous Response Mode - Like SNRM but secondary doesn't have to wait for a command to send response. No multidrop. SABM Set Asynchronous Balanced Mode - Two combined stations (each is primary and secondary) send commands and responses. UA Unnumbered Acknowledgment - response to SRNM, SARM, or SABM command DISC DISConnect - command to terminate communication DM Disconnect Mode - Response when secondary is not operational. FRMR Frame Reject - Response to illegal frame XID eXchange ID - Option 1 command and response for switched circuits. RD Request Disconnect - Option 1 request lets secondary ask for DISC UI Unnumbered information - Option 4 command and response for "datagram" service (like Ethernet) SIM Set Initialization Mode - Option 5 command for down line load. RIM Request Initailization Mode - Option 5 response to let secondary ask for SIM UP Unnumbered Poll - Option 6 command for group polling RESET RESET - Option 11 command to reset N(R) and N(S) TEST TEST - Option 12 command and response to test the link SNRME, SARME, and SABME (option 10) are just like SNRM, SARM, and SABM except that N(S) and N(R) are Extended from 3 to 7 bits. option 7 provides for multi-byte addresses. (If the address byte doesn't end in a 1 bit, you have not reached the last address byte yet). option 14 uses 32-bit CRC instead of the default 16-bit CRC 4. IBM's SDLC (Synchronous Data Link Control). Basis for HDLC. Includes basic HDLC in Normal Response Mode (SNRM, RR, RNR, UA, DISC, DM, and FRMR) with extensions 1, 2, 4, 5, 6 and 12, which adds XID and RD, REJ, UI, SIM and RIM, UP, and TEST resectively. 5. LAP-B (Link Access Protocol - Balanced) is the link layer protocol used by X.25 networks. Includes basic HDLC in Asynchronous Balanced Mode (SABM, RR, RNR, UA, DISC, DM, and FRMR) with HDLC extensions 2 (add REJ for full duplex) 8 (don't respond to poll with I frame), and 10 (SABME for 7-bit sequence numbers). 6. X.25 is a network layer access prototol that can be used to access a public public packet switching network. X.25 uses X.21 or RS-232 for the phyical layer, LAP-B for the link layer, and X.25 at the network layer. Once the X.25 has been used to set up virtual circuits between you host and other hosts, X.25 info and supervisory packets are used to exchange data between your host and the other hosts. info frame 1 2 3 4 5 6 7 8 byte 1 a a 0 1 b b b b byte 2 b b b b b b b b byte 3 <-- N(R) -> P/F <-- N(S) -> 0 note bit refersal byte 4 <--------- 8 bits of data ---------> ... byte n <--------- 8 bits of data ---------> super frame 1 2 3 4 5 6 7 8 byte 1 a a 0 1 b b b b byte 2 b b b b b b b b byte 3 <-- N(R) -> 0 x x 0 1 note bit refersal byte 4 <--------- 8 bits of data ---------> ... byte n <--------- 8 bits of data ---------> aa = general format identifier (local or remote ack, user data or higher level protocol, ignore) bbb = 12 bit logical channel and group number to distinguish 4095 connections. N(S) = the send sequence number (SDLC, HDLC, LAP-B, ADCCP, 802.2) N(R) = the receive sequence number xx = 00 (RR), 01 (RNR), or 10 (REJ) 7. IEEE 802.2 Logical Link Control Frame. All of the IEEE 802 LAN's, including IEEE 802.3 CSMA, IEEE 802.4 token bus, IEEE 802.5 token ring, IEEE 802.6 DQDB, and FDDI, deliver only 802.2 LLC frames. 1. Type 1 stations - Unacknowledged Connectionless Service - UI, XID, and TEST commands and responses. (UI is like an Ethernet datagram). 2. Type 2 stations - Connection-mode Service - I, RR, RNR, REJ, SABME, UA, FRMR, DISC, and DM commands and responses. 3. Type 3 stations - Acknowledged Connectionless Service - AC0 and AC1 commands and responses (really ACK0 with data and ACK1 with data). 4. Type 4 stations - all of the above 5. IEEE 802.2 LLC frame format 1. 8-bit DSAP - Destination Service Access Point, I/G D D D D D D D 2. 8-bit SSAP - Source Service Access Point, C/R S S S S S S S S 3. 8 or 16-bit control field - sssssss is send sequence number, rrrrrrr is receive sequence number, p is poll or final bit a. 0sssssssprrrrrrr - information frame b. 10xx0000prrrrrrr - supervisory frame - RR, RNR, REJ, SREJ c. 11mmpmmm - unnumbered information, (32 opcodes) 4. Information - arbitrary number of bytes 6. Famous SAP's 0000 0000 00 Null LSAP 0101 0101 AA SNAP 0100 0010 82 Bridge Spanning Tree Protocol 0100 0000 02 Individual LLC sublayer management 1100 0000 03 Group LLC sublayer management 0010 0000 04 SNA Path Control 0110 0000 06 DoD IP protocol 0111 1111 FE OSI network protocol 1111 1111 FF Global DSAP 8. Ethernet packet on 802.3 CSMA LAN using SubNetwork Access Protocol (SNAP) 1. 48-bit destination address 2. 48-bit source address 3. 16-bit length field 4. 1 byte DSAP with value AA hexadecimal or 170 decimal 5. 1 byte SSAP with value AA hexadecimal or 170 decimal 6. 1 byte control filed with value 03 hex (unnumbered information) 7. 3 byte organization number (000000 hex for Ethernet) 8. 16-bit Ethernet type code 9. Ethernet data field up to 1494 bytes 10. 32-bit CRC Ethernet packet on 802.4, 802.5, for FDDI LAN using SNAP - obvious 9. LAP-M (Link Access Protocol - Modems) or V.42 - HDLC Asynchronous Balanced Mode (SABM, RR, RNR, UA, DISC, DM, and FRMR) with HDLC extensions 1 (XID and RD for switched circuits), 2 (REJ for full duplex), 4 (UI for datagram service), 7 (multibyte addresses), and 10 (SABME for 7-bit sequence numbers). Following SABME and UA, CID commands and responses are used to negotiate parameters, and then I frames are used to exchange data. 10. PPP (Point to Point Protocol) for transporting frames between routers. 1. 8-bit flag 011111110 2. 8-bit address 11111111 3. 8-bit control 00000011 or HDLC UA 4. 8-bit protocol (see RFC 1700, page 200) 5. Network Layer PDU 6. 16-bit FCS The protocols include 0021 (IP), 002D (Van Jacobson Compressed IP 1) 002F (Van Jacobson Compressed IP 2), and 8021 (IP control protocol). Variable length, so last byte of protocol ends with a "1" bit. 11. LAP-D. Basic Rate ISDN (Integrated Services Digital Network) provides two 64 kbps B (Bearer) channels for voice and high-speed data and one 16 kbps D (Data) channel for signaling (like dialing a number) and slow speed data. (The basic rate 2B+D standard is I.430). I.431 is the primary rate ISDN standard that provides 23B+D or 30B+D. LAP-D (Link Access Procedure - D channel or I.441/Q.921) is the link layer protocol for the D channel. LAP-D uses HDLC Asynchronlus Balanced Mode (SABM, RR, RNR, UA, DISC, DM, and FRMR) with extensions 2 (add REJ for full duplex), 7 (multibyte addresses), 8 (don't respond to poll with I frame), 10 (SABME for 7-bit sequence numbers). In addition, LAP-D includes the SI0 and SI1 (Sequenced Information zero and one) commands and responses for acknowledged connectionless service. The two byte address is coded as: 1 2 3 4 5 6 7 8 s s s s s s c/r 0 t t t t t t t 1 c/r identifies the frame as a Command or a Response ssssss specifies the 6 bit SAPI (Service Access Port Identifier) ttttttt is the 7 bit TEI (Terminal Endpoint Identifier) SAPI (Service Access Port Identifier) assignments 0 - Call-control procedures (call this number, hand up, etc) 16 - This frame is part of an X.25 level 3 conversation 32 to 61 - Reserved for frame relay (see below) 63 - Layer 2 management procedures (e.g. assigning TEI's) others - reserved TEI (Terminal Endpoint Identifier) assignments 0 to 63 - Manually assigned to user equipment 64 to 126 - Automatic assignment using "broadcast" TEI of 127 Automatic Assignment of TEI - User equipment sends LAPD UI frame with SAPI of 63, TEI of 127 and an "identity Request" information field containing a random number. Phone company responds whith a UI frame with SAPI of 63, TEI of 127, and an "identity assigned" information field containing the random number and a new TEI between 64 and 126. 12. Frame Relay - Used to transfer digital information over an ISDN "B" (or bearer) "D" (Data or Delta) or "H" (for Higher speed, I guess) channel or to connect a users DTE to the DCE of a frame relay service provider. Frame relay uses the Q.922 link layer standard takes the LAP-D standard (I.441/Q.921) and divides it into two parts. The core functions of Q.922 eliminate the HDLC control byte (so all frames contains connectionless unacknowledged data). (Full Q.922 adds back the control byte to get HDLC). Frame relay uses the core functions of Q.922 to connect users to a frame relay network. A Q.922 frame consists of a 1 byte flag, a 2 to 4 byte address (the last byte ends in "1"), a variable length information field, and another flag. The default two byte address contains: 1 2 3 4 5 6 7 8 d d d d d d c/r 0 d d d d FECN BECN DE 1 dddd is the 10-bit DLCI (Data Link Connection Identifier) for multiplexing FECN is the forward explicit congestion notification (set by network) BECN is the backward explicit congestion notification (set by network) DI (Discard Elegibility) is a 1 bit "importance" indicator set by the user For operation over the "D" channel, two byte addresses are used and DLCI's are limited to 480-1007 in order distinguish them from the LAP-D frames using the same channel. The DLCI's of 480-1007 correspond to SAPI's of 32 to 61.