HDLC performs OSI Layer 2 functions, so a brief review of the OSI Layer 2 functions covered in Chapter 3, "Data Link Fundamentals: Ethernet LANs," will be helpful:

■ Arbitration—Determines when it is appropriate to use the physical medium

■ Addressing—Ensures that the correct recipient(s) receives and processes the data that is sent

■ Error detection—Determines whether the data made the trip across the physical medium successfully

■ Identifying the encapsulated data—Determines the type of header that follows the datalink header

HDLC is very simple as compared with Ethernet. For instance, with Ethernet, the CSMA/CD algorithm arbitrates which device gets to send a frame next and how to recover when frames collide. In a point-to-point serial link, each router can send over the four-wire (two-pair) circuit at any time, so there is no need for any kind of arbitration.

HDLC defines framing that includes an address field, a frame check sequence (FCS) field, and a protocol type field. These three fields in the HDLC frame help provide the other three functions of the data link layer. Figure 4-6 outlines the framing.

Figure 4-6 HDLC Framing

1 1 1-2 Variable 4

HDLC defines a 1-byte address field, although on point-to-point links, it is not really needed. Having an address field in HDLC is sort of like when I have lunch with my friend Gary, and only Gary. I don't need to start every sentence with "Hey Gary..."—he knows I'm talking to him. On point-to-point WAN links, the router on one end of the link knows that there is only one possible recipient of the data —the router on the other end of the link—so the address does not really matter.

Historically, HDLC includes an address field because, in years past, the telco would sell you a multidrop circuit. With a multidrop circuit, one central site device could send and receive frames with multiple remote sites. HDLC defined the address field to identify the different remote sites on a multidrop link. Because routers use HDLC only for point-to-point links, the address field really is not needed to identify the other router. However, because the address field still is defined by HDLC, it is included in the header by routers. By the way, routers put the decimal value of 3 in the address field.

HDLC performs error detection just like Ethernet—it uses an FCS field in the HDLC trailer. And just like Ethernet, if a received frame has errors in it, the frame is discarded, with no error recovery performed by HDLC.

HDLC performs the function of identifying the encapsulated data just like Ethernet as well. When a router receives an HDLC frame, it wants to know what type of packet is held inside the frame. Cisco's implementation of HDLC includes a Protocol Type field, as seen in Figure 4-6, that identifies the type of packet inside the frame. Cisco uses the same values in its 2-byte HDLC Protocol Type field as it does in the Ethernet Protocol Type field.

The original HDLC standards did not include a Protocol Type field, so Cisco added one; by adding something to the HDLC header, Cisco made its version of HDLC proprietary. So, Cisco's HDLC will not work when connecting a Cisco router to another vendor's router. Figure 4-6 does not show the Cisco proprietary protocol type field; it sits between the control field and the data field in the frame.

HDLC is very simple. There simply is not a lot of work for the point-to-point data link protocols to perform.

0 0

Post a comment