Wednesday, November 6, 2013

Data Link Layer

We are nearing the bottom of the OSI model now. Layer 2 is the data link layer. As the packet moved down the protocol stack, information has been added that tells the recipient what kind of data the packet contains, if it's part of an ongoing conversation, where this packet falls in the sequence of total packets, and if this packet is indeed intended for them. Now it is time to translate the packet to the proper format for the technology that it will be broadcast over. This is the job of the data link layer.

LAN and WAN technologies can use different protocols and mediums for transmission. Each has it's own specifications for how data should be packaged for transmission and for how it interprets electrical signals. If a computer is communicating over an Ethernet network then the headers must be a certain length with the flags properly set. If the specifications of the transmission technology are not followed the receiving system will not be able to properly interpret the data.

The data link layer handles preparing a packet to be transmitted. The layers above it do not know how the packet is going to be transmitted and do not need to be concerned with it. The data link layer will add the necessary information to the packet headers, change the data into the necessary format, and fix sequencing of received packets. If there are transmission errors then the data link layer will also alert upper-layer protocols.

The data link layer is divided into two functional sub-layers. The top of the these two sub-layers is the Logical Link Control (LLC). This sub-layer works with the network layer directly above it. The logical link control handles flow control and error-checking. So if a packet is received out of sequence or there is an error, the LLC will alert the network layer to take action. Below the LLC is the Media Access Control (MAC) sub-layer. This is where a packet is translated to the necessary format for the technology it will be placed on. The technology at the MAC layer knows if the network is an Ethernet, Token Ring, FDDI, or something else and will place the final headers and convert the data to it's appropriate electrical signal. Note that once the data link layer applies the last header and trailer the unit of data is now called a frame.

Some protocols that work at the data link layer include Point-to-Point Protocol (PPP), ATM, Layer 2 Tunneling Protocol (L2TP), FDDI, Ethernet, and Token Ring. Each network technology (Ethernet, FDDI, ATM, Token Ring) also defines the compatible physical transmission type (coaxial cable, twisted pair, fiber) and electrical signaling and encoding. The MAC sub-layer understands these requirements and tells the physical layer what type of electrical signal to create.

No comments:

Post a Comment