View on GitHub

Notes

reference notes

Data must have help to move it across different media. The data link layer provides this help.

Purpose of the Data Link Layer

Data link layer does:

Why do we need the data link layer?

The IEEE 802 LAN/MAN data link layer consists of the following two sublayers:

  1. Logical Link Control (LLC) - This IEEE 802.2 sublayer communicates between the networking software at the upper layers and the device hardware at the lower layers. It places information in the frame that identifies which network layer protocol is being used for the frame. (flow control)
    • This information allows multiple Layer 3 protocols, such as IPv4 and IPv6, to use the same network interface and media.
  2. Media Access Control (MAC) – Implements this sublayer (IEEE 802.3, 802.11, or 802.15) in hardware. It is responsible for:
    • data encapsulatio
    • media access control.

It provides data link layer addressing and it is integrated with various physical layer technologies.

in short:

The MAC sublayer provides data encapsulation:

The MAC sublayer also provides media access control, allowing multiple devices to communicate over a shared (half-duplex) medium. Full-duplex communications do not require access control.

Providing Access to Media

Serial interface/connection connects two network environments Ethernet interface connects to the LAN

At each hop along the path, a router performs the following Layer 2 functions:

As the router processes frames, it will use data link layer services to:

Topologies

Physical and Logical Topologies

This topic explains the ways in which the data link layer works with different logical network topologies.

There are two types of topologies used when describing LAN and WAN networks:

The data link layer “sees” the logical topology of a network when controlling data access to the media.

It is the logical topology that influences the type of network framing and media access control used.

WAN Topologies

  1. Point-to-point - This is the simplest and most common WAN topology. It consists of a permanent link between two endpoints.
  2. Hub and Spoke - This is the simplest and most common WAN topology. It consists of a permanent link between two endpoints.
  3. Mesh - This topology provides high availability but requires that every end system is interconnected to every other system. Therefore, the administrative and physical costs can be significant. Each link is essentially a point-to-point link to the other node.

Point-to-Point WAN Topology

When using a serial communications protocol such as Point-to-Point Protocol (PPP), a node does not have to make any determination about whether an incoming frame is destined for it or another node.

(Note: A point-to-point connection over Ethernet requires the device to determine if the incoming frame is destined for this node.)

The logical data link protocols can be very simple, as all frames on the media can only travel to or from the two nodes.

A source and destination node may be indirectly connected. adding intermediary physical connections may not change the logical topology. The logical point-to-point connection is the same.

LAN Topologies

Legacy LAN Topologies:

Half and Full Duplex Communication

refers to the direction of data transmission between two devices.

Half-duplex communication:

Full-duplex communication

Access Control Methods

Ethernet LANs and WLANs are examples of multiaccess networks.

A multiaccess network is a network that can have two or more end devices attempting to access the network simultaneously.

Two basic access control methods for shared media:

  1. Contention-based access

In contention-based multiaccess networks, all nodes are operating in half-duplex, competing for the use of the medium. However, only one device can send at a time. Therefore, there is a process if more than one device transmits at the same time. Examples of contention-based access methods include the following:

  1. Controlled access

In a controlled-based multiaccess network, each node has its own time to use the medium. These deterministic types of legacy networks are inefficient because a device must wait its turn to access the medium. Examples of multiaccess networks that use controlled access include the following:

Note: Today, Ethernet networks operate in full-duplex and do not require an access method.

Contention-Based Access - CSMA/CD

If two devices transmit at the same time, a collision will occur. For legacy Ethernet LANs, both devices will detect the collision on the network. This is the collision detection (CD) portion of CSMA/CD. The NIC compares data transmitted with data received, or by recognizing that the signal amplitude is higher than normal on the media. The data sent by both devices will be corrupted and will need to be resent.

Contention-Based Access - CSMA/CA

CMSA/CA uses a method similar to CSMA/CD to detect if the media is clear. CMSA/CA uses additional techniques. In wireless environments it may not be possible for a device to detect a collision. CMSA/CA does not detect collisions but attempts to avoid them by waiting before transmitting. Each device that transmits includes the time duration that it needs for the transmission. All other wireless devices receive this information and know how long the medium will be unavailable.

Data Link Frame

The Frame

This topic discusses in detail what happens to the data link frame as it moves through a network.

The information appended to a frame is determined by the protocol being used.

the structure of the frame and the fields contained in the header and trailer vary according to the protocol.

There is no one frame structure that meets the needs of all data transportation across all types of media.

Depending on the environment, the amount of control information needed in the frame varies to match the access control requirements of the media and logical topology.

Frame Fields

Frame field includes the following:

Field Description
Frame Start and Stop Identifies beginning and end of frame
Addressing Indicates source and destination nodes
Type Identifies encapsulated Layer 3 protocol
Control Identifies flow control services
Data Contains the frame payload
Error Detection Used for determine transmission errors

Data link layer protocols add a trailer to the end of each frame. In a process called error detection, the trailer determines if the frame arrived without error. It places a logical or mathematical summary of the bits that comprise the frame in the trailer. The data link layer adds error detection because the signals on the media could be subject to interference, distortion, or loss that would substantially change the bit values that those signals represent.

A transmitting node creates a logical summary of the contents of the frame, known as the cyclic redundancy check (CRC) value. This value is placed in the frame check sequence (FCS) field to represent the contents of the frame. In the Ethernet trailer, the FCS provides a method for the receiving node to determine whether the frame experienced transmission errors.

Layer 2 Addresses

Also referred to as a physical address.​

Contained in the frame header.​

Used only for local delivery of a frame on the link.​

Updated by each device that forwards the frame.

LAN and WAN Frames

The logical topology and physical media determine the data link protocol used:​

Each protocol performs media access control for specified logical topologies.