Data Link Layer: Protocols and Topologies
The data link layer provides a means to exchange data using common local media. It performs two basic services:
- Allows upper layers to access the media using techniques such as frames.
- Controls how data is placed in and received from the media using techniques such as media access control and error detection.
The frame is a key element of each data link layer protocol. Data link layer protocols include control information that enables the protocols to function. This control information may indicate:
- Which nodes are in communication with each other
- When communication begins and ends between individual nodes
- Which errors occur while nodes are communicating
- Which nodes will communicate next
A standard provides a model for the creation of new network-level software.
CSMA/CD (Carrier Sense Multiple Access with Collision Detection): The device monitors the media to detect the presence of a data signal. If there is no data signal (indicating that the medium is free), the device transmits data. If signals indicate that another device was transmitting at the same time, all devices stop sending and try again later.
CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance): The device examines the media to detect the presence of a data signal. If the media is free, the device sends a notification across the media of its intent to use it. The device then sends the data.
Comparison Between Logical and Physical Topology
Network topology refers to the configuration of network devices and the interconnections between them. Network topologies can be viewed at the physical and logical levels.
The physical topology is the arrangement of nodes and the physical links between them. The representation of how the media is used to interconnect devices is the physical topology.
A logical topology is how a network transfers frames from one node to the next. This arrangement consists of virtual connections between the nodes of a network, independent of their physical layout.
The MAC Sublayer
The MAC (Media Access Control) sublayer is at the bottom of the data link layer (Layer 2 of the OSI Reference Model). The exact implementation of this sublayer can vary depending on the requirements of the physical layer (e.g., Ethernet, Token Ring, WLAN).
The Ethernet MAC sublayer has two primary responsibilities:
- Data encapsulation
- Media Access Control
Media Access Control
The MAC sublayer controls the placement of frames on the media and the removal of frames from the media. As its name implies, it is responsible for managing media access control. This includes the initiation of frame transmission and recovery from transmission failure due to collisions.
Logical Link Control (LLC)
The LLC (Logical Link Control) sublayer defines how data is transferred over the physical medium, providing service to higher layers. The LLC sublayer handles error control, flow control, framing, and MAC sublayer addressing.
The functions of this sublayer are:
- Grouping the bits to be transmitted into a frame (framing)
- Dealing with transmission errors
- Regulating the flow of frames (flow control)
- Managing the link layer (management)
- Translating frames between heterogeneous networks
Token Ring defines a local area network (LAN) with a ring configuration, using a token-passing method for media access control. Its standard data rate is 4 or 16 Mbps. It supports two basic frame types: tokens and data/command frames. The token circulates around the ring in one direction.
Token Bus is a protocol for local area networks with similarities to Token Ring, but instead of a ring topology, it is designed for bus topologies. It is a medium access protocol in which nodes are connected to a bus or channel to communicate. At any given time, there is a token that network nodes pass, and only the node that has the token is allowed to transmit. The main bus is typically a coaxial cable.
The Transportation Network is a nationwide network structured in layers. It carries user information from one point to another or other distant points, bidirectionally or unidirectionally. It also transfers different types of network control information, such as signaling and operations/maintenance information.
Shared Media
Some network topologies share a common medium with multiple nodes. At any time, there may be a number of devices attempting to send and receive data using the network media. There are rules governing how these devices share the resources.