Sub topic 15
Polling, Token Passing, and MAC Addresses
Assume you know the data link layer, transmission delay, propagation delay, and basic channel-efficiency ideas. This chapter focuses on controlled access, where stations coordinate before transmitting instead of competing randomly.
Polling: a central controller gives permission
In polling, one device acts as a primary or controller. The other devices are secondary stations. The controller asks each station whether it has data to send. A station may transmit only after receiving permission.
sequenceDiagram
participant C as Controller
participant A as Station A
participant B as Station B
C->>A: Poll
A-->>C: No data
C->>B: Poll
B-->>C: Data frame
B->>C: Transmit frame
C->>A: PollThe controller can poll stations in a fixed order, a priority order, or an order based on current demand. If each poll takes time \(Tp\), and a station sends a frame in time \(Tf\), useful efficiency is approximately:
\[ \text{Efficiency} = \frac{Tf}{Tf + T_p} \]
Polling avoids collisions, so it works well when traffic is heavy. Its main cost is polling overhead. A failure of the controller can also stop the entire channel. If a station has no data, its polling turn can waste time.
Token passing: permission circulates
Token passing removes the central controller. A special short frame called a token travels around a logical ring. Only the station holding the token may transmit. After sending, or after reaching a time limit, that station releases the token to the next station.
flowchart LR
A[Station A] --> B[Station B]
B --> C[Station C]
C --> D[Station D]
D --> A
T((Token)) --> AToken passing is deterministic: a station can estimate its maximum waiting time. It has no collisions during normal operation. However, the protocol must recover if the token is lost, duplicated, or held by a failed station. Token management adds complexity, and a lightly loaded network may waste time circulating an unused token.
| Method | Coordinator | Collision risk | Main strength | Main weakness |
|---|---|---|---|---|
| Polling | Central controller | None during normal operation | Simple and orderly | Controller failure |
| Token passing | Distributed | None during normal operation | Predictable access | Token recovery complexity |
MAC addresses identify interfaces
A MAC address is a data-link-layer address assigned to a network interface. Traditional Ethernet MAC addresses contain 48 bits, usually written as six hexadecimal octets, such as 02:1A:2B:3C:4D:5E.
The first 24 bits commonly identify the organization that allocated the address. The remaining bits identify the interface. The first octet also contains flags that distinguish globally assigned and locally administered addresses, and unicast and multicast addresses.
An Ethernet frame contains a destination MAC address and a source MAC address. A switch examines the source address to learn which interface leads to that station. It then forwards future frames toward the destination interface instead of sending them everywhere.
A MAC address is local to a data-link network. An IP address identifies a logical network-layer endpoint and can change when a device moves to another network. Address Resolution Protocol (ARP) maps an IPv4 address to a local MAC address.
Exercise
A polling system has 1 ms of polling overhead and a station transmits for 9 ms. What is its approximate efficiency?
Show answer
Efficiency = 9/(9 + 1) = 0.9, or 90%.
Exercise
What does a switch learn from the source MAC address of an incoming frame?
Show answer
It learns that the source device is reachable through the interface on which the frame arrived.