Elementary Data Link Protocols

Implementation of the physical, data link, and network layersThe study of elementary data link protocols is fundamental in understanding how data is transmitted over a network. These protocols operate at the data link layer of the OSI model and are responsible for ensuring reliable communication between devices on the same local area network (LAN). In this discussion, we will explore the assumptions, structure, and functionality of these protocols, as well as their implementation details.

Assumptions Underlying the Protocols

Before delving into specific protocols, it is essential to outline some key assumptions that guide their design:

1.Layer Independence: The physical layer, data link layer, and network layer are treated as independent processes. The physical layer is typically implemented on dedicated hardware such as a Network Interface Card (NIC), while the data link and network layers often run on the main CPU as part of the operating system.

2.Reliable Communication: The protocols assume that machine A wants to send a long stream of data to machine B using a reliable, connection-oriented service. Machine A is always ready to send data, and there are no delays in data production.

3.No Machine Failures: The protocols are designed to handle communication errors but do not account for machine crashes or reboots. This assumption simplifies the protocol design.

4.Frame Structure: The data link layer receives packets from the network layer, encapsulates them in frames by adding headers and trailers, and then transmits these frames to the receiving machine. The structure of a frame includes control information (header), the encapsulated packet, and a checksum (trailer).

Frame and Packet Definitions

In the context of these protocols, it is crucial to distinguish between frames and packets:

Packet: A packet is the unit of information exchanged between the network layer and the data link layer. It consists of a message from the transport layer along with a network layer header.

Frame: A frame is a data structure that includes the packet as well as additional control information. A frame typically contains:

→ Frame Kind: Indicates whether the frame contains data, an acknowledgment (ACK), or a negative acknowledgment (NAK).

→ Sequence Number: Used to identify the frame and ensure proper  ordering.

→ Acknowledgment Number: Used to confirm receipt of frames.

→ Info Field: Contains the actual packet data for data frames.

Event Handling

The data link layer operates by waiting for events that indicate the arrival of frames or other significant occurrences. The procedure wait_for_event is used to block until an event occurs. Events can include:

  • Frame arrival
  • Checksum errors
  • Timeouts
  • Network layer readiness

Timer Management

To ensure reliability, the sending data link layer must start a timer whenever it transmits a frame. If an acknowledgment is not received within a predetermined time, the timer times out, prompting the sender to retransmit the frame. This mechanism helps to recover from lost frames.

Protocol Procedures

Several key procedures are defined for the implementation of these protocols:

from_network_layer: Fetches a packet from the network layer for transmission.

to_network_layer: Delivers a packet from an inbound frame to the network layer.

from_physical_layer: Receives an inbound frame from the physical layer.

to_physical_layer: Sends a frame to the physical layer for transmission.

start_timer and stop_timer: Control the timer for frame transmission.

enable_network_layer and disable_network_layer: Manage the interaction with the network layer, preventing it from overwhelming the data link layer.

Conclusion

Elementary data link protocols are essential for enabling reliable communication between devices in a network. By encapsulating packets in frames, managing events, and employing timers for reliability, these protocols ensure that data is transmitted accurately and efficiently. Understanding these foundational concepts is crucial for anyone studying computer networking and data communication. As we progress through various protocols, we will see how these principles are applied and evolved to meet different networking needs.