Link Layer - ALOHA, Multiple Access Protocols, IEEE...
Link Layer - ALOHA, Multiple Access Protocols, IEEE...
neighboring network nodes. We'll cover ALOHA, multiple access protocols, IEEE 802 standards,
local area networks, addressing, Ethernet, hubs, switches, and the fundamentals of SDN and
OpenFlow.
Link Layer
The Link Layer (Layer 2 in the OSI model) is responsible for transmitting data frames over a
single link. This link could be a wired connection (like Ethernet), a wireless connection (like
Wi-Fi), or another type of physical medium. It deals with issues like framing, addressing within
the local network, error detection, and medium access control.
ALOHA
ALOHA is one of the earliest random access protocols designed for transmitting data over a
shared communication channel. There are two main versions:
● Pure ALOHA:
○ Any station can transmit a frame at any time.
○ If two or more frames collide (overlap in time), all the frames involved are corrupted
and need to be retransmitted.
○ Stations listen to the channel and if they detect a collision, they wait a random
amount of time before retransmitting.
○ Vulnerable time is twice the frame transmission time.
○ Maximum throughput is only about 18.4% of the channel capacity.
● Slotted ALOHA:
○ Time is divided into slots, and stations can only begin transmitting at the beginning
of a slot.
○ This reduces the vulnerable time to the frame transmission time.
○ Maximum throughput is about 36.8% of the channel capacity.
ALOHA protocols are simple but inefficient due to collisions. They are suitable for lightly loaded
channels.
Multiple access protocols (also called medium access control or MAC protocols) are used to
regulate access to a shared communication channel in a network where multiple devices need
to transmit. They aim to minimize collisions and maximize channel utilization.
Besides ALOHA, other important multiple access protocols include:
● Carrier Sense Multiple Access (CSMA):
○ A station listens to the channel before transmitting (carrier sense).
○ If the channel is idle, the station transmits.
○ If the channel is busy, the station defers transmission.
● CSMA/CD (Collision Detection):
○ Used in Ethernet.
○ Stations listen while transmitting.
○ If a collision is detected, all stations stop transmitting and send a jamming signal.
○ Stations then wait a random backoff time before retransmitting.
● CSMA/CA (Collision Avoidance):
○ Used in Wi-Fi.
○ Stations use mechanisms like Request to Send (RTS) and Clear to Send (CTS)
frames to avoid collisions.
○ More complex than CSMA/CD but necessary in wireless environments where it's
harder to detect collisions.
● Polling:
○ A central controller (or a designated station) polls each station in turn, granting it
permission to transmit.
○ Eliminates collisions but introduces overhead.
● Token Passing:
○ A special frame called a token is passed from station to station.
○ Only the station holding the token is allowed to transmit.
○ Eliminates collisions but introduces overhead and can have issues if the token is
lost.
● TDMA (Time Division Multiple Access):
○ Each station is assigned a specific time slot in which it can transmit.
○ Used in cellular networks and some satellite systems.
● FDMA (Frequency Division Multiple Access):
○ The channel is divided into frequency bands, and each station is assigned a
specific band.
○ Used in cellular networks and broadcast radio.
The IEEE 802 is a family of standards for local area network (LAN) technologies. Some key 802
standards include:
● 802.3 (Ethernet): The most widely used LAN technology. It defines the physical layer and
MAC layer specifications for wired Ethernet networks.
● 802.11 (Wi-Fi): Defines the standards for wireless LANs.
● 802.15 (Bluetooth): Specifies standards for wireless personal area networks (PANs).
● 802.16 (WiMAX): A standard for wireless broadband access.
The 802 standards committee further subdivides the Link Layer into two sublayers:
● Logical Link Control (LLC): Provides an interface to the network layer.
● Medium Access Control (MAC): Responsible for controlling access to the shared
medium.
A LAN is a computer network that interconnects devices within a limited area, such as a home,
school, office building, or campus.
Key characteristics of LANs:
● Limited geographical area: Typically spans a single building or a few adjacent buildings.
● High data transfer rates: Typically much faster than wide area networks (WANs).
● Shared medium or switched: Can use a shared medium (older technologies) or
switched technologies (Ethernet switches are common).
● Privately owned: Typically owned and managed by a single organization.
● Common topologies: Star, bus, ring.
Addressing
The Link Layer uses MAC addresses (also called physical addresses or hardware addresses) to
identify devices within a local network.
● MAC Address Format: A MAC address is a 48-bit address, usually represented in
hexadecimal format (e.g., 00:1A:2B:3C:4D:5E).
● Uniqueness: Ideally, MAC addresses are globally unique, assigned by the manufacturer
of the network interface card (NIC). The IEEE manages the allocation of MAC address
ranges.
● Use in LANs: MAC addresses are used for frame forwarding within a LAN. Switches use
MAC addresses to learn which ports are connected to which devices and forward frames
accordingly.
Ethernet
Hubs
Switches
Switches are more sophisticated devices that operate at the Link Layer.
● Frame Forwarding: A switch learns the MAC addresses of devices connected to its
ports. When a frame arrives, the switch examines the destination MAC address and
forwards the frame only to the port where that device is located.
● Collision Domains: Each port on a switch is in a separate collision domain. This
eliminates collisions and allows for full-duplex communication.
● Higher Performance: Switches provide much higher performance than hubs.
● Spanning Tree Protocol (STP): Switches use STP to prevent loops in the network
topology.
● VLANs (Virtual LANs): Switches can be configured to create VLANs, which segment the
network logically.
OpenFlow
OpenFlow is a communication protocol that defines how an SDN controller can communicate
with and control the forwarding plane of network devices.
Key features of OpenFlow:
● Flow Tables: OpenFlow switches maintain flow tables, which contain rules that specify
how to handle packets.
● Match-Action Paradigm: Each flow table entry specifies a set of match fields (e.g.,
source/destination MAC/IP addresses, port numbers) and a set of actions to take when a
packet matches the rule (e.g., forward the packet to a specific port, drop the packet,
modify the packet).
● Controller Control: The SDN controller can add, modify, and delete flow table entries in
the switches.
● Standard Protocol: OpenFlow is a standardized protocol, allowing for interoperability
between different vendors' SDN devices.
OpenFlow enables the SDN controller to have fine-grained control over the forwarding behavior
of network devices, enabling advanced features like traffic engineering, QoS, and security
policies.
Understanding the Link Layer, Ethernet, switches, and the principles of SDN and OpenFlow is
crucial for comprehending how data is transmitted within local networks and how modern
networks are evolving towards more flexible and programmable architectures.