Main Page>Table of contents>Data Link Layer>


The Data Link layer ensures that messages are delivered to the proper device and translates messages from the Network layer into bits for the Physical layer to transmit. It formats the message into data frames and adds a customized header containing the hardware destination and source address.

We need to understand that routers, which work at the Network layer, do not care about where a host is located but only where networks are located. They also keep track of the best way to get to a remote network. The Data Link layer is responsible for uniquely identifying each device on a local network.

For a host to send packets to individual hosts and between routers, the Data Link layer uses hardware addressing. Each time a packet is sent between routers, it is framed with control information at the Data Link layer, but that information is stripped off at the receiving router and only the original packet is left completely intact. This framing of the packet continues

for each hop until the packet is finally delivered to the receiving host. It is important to understand that the packet was never altered along the route, only encapsulated with the type of control information to be passed on to thedifferent media types.

The IEEE Ethernet Data Link layer has two sublayers:

Media Access Control (MAC) 802.3 This defines how packets are placed on the media. Contention media access is first come, first served access where everyone shares the same bandwidth. Physical addressing is defined here, as well as logical topologies. Logical topology is the signal path through a physical topology. Line discipline, error notification (not correction), ordered delivery of frames, and optional flow control canalso be used at this sublayer.

Logical Link Control (LLC) 802.2 This sublayer is responsible for identifying Network layer protocols and then encapsulating them. An LLC header tells the Data Link layer what to do with a packet once a frame is received. For example, a host will receive a frame and then look in the LLC header to understand that the packet is destined for the IP protocol at the Network layer. The LLC can also provide flow control and sequencing of control bits.

Switches and Bridges at the Data Link Layer

Switches and bridges both work at the Data link layer and filter the network using hardware (MAC) addresses. Layer-2 switching is considered hardware-based bridging because it uses a specialized hardware called Application-Specific Integrated Circuits (ASICs). ASICs can run up to gigabit speeds with very low latency.

Bridges and switches read each frame as it passes through the network.

The layer-2 device then puts the source hardware address in a filter table and keeps track of which port it was received on. This tells the switch where that device is located.

After a filter table is built on the layer-2 device, the device will only forward frames to the segment where the destination hardware address is located. If the destination device is on the same segment as the frame, the layer-2 device will block the frame from going to any other segments. If the destination is on another segment, the frame is only transmitted to that segment.

This is called transparent bridging. When a layer-2 device (switch) interface receives a frame and the destination hardware address is unknown to the devices filter table, it will forward the frame to all connected segments. If the unknown device replies to this forwarding of the frame, the switch updates the filter table on that devices location. However, the destination address of the transmitting frame may be a broadcast address, in which case the switch will forward all broadcasts to every connected segment by default.

All devices that the broadcast is forwarded to are considered to be in the same broadcast domain. Layer-2 devices propagate layer-2 broadcast storms. The only way to stop a broadcast storm from propagating through an internetwork is with a layer-3 device (router).

Switches cannot translate between different media types. In other words,each device connected to the switch must use an Ethernet frame type. If youwanted to connect to a Token Ring switch or LAN, you would need a routerto provide the translation services.

Hosted by uCoz