COMPUTER NETWORKS/Student Engineering Notebook
Page 06·notes
MEDIUM ACCESS CONTROL (MAC) & ETHERNET—~24 MIN READ

Connecting Devices, Transparent Bridges & Spanning Tree Protocol (STP)

“Collision vs broadcast domains, transparent bridge backward learning, and Spanning Tree Protocol.”

1.Networking Connecting Devices Hierarchy

To interconnect local area networks, hardware devices operate across distinct layers of the protocol stack:

1. Repeaters & Hubs (Layer 1 - Physical): Receive electrical/optical signals and regenerate (amplify) bit streams onto all other ports. They have no memory, do not inspect frame headers, and create a single shared Collision Domain and a single Broadcast Domain.

2. Bridges & Layer 2 Switches (Layer 2 - Data Link): Multi-port bridges that maintain an internal forwarding database (CAM table). They inspect 48-bit MAC addresses, filter traffic to prevent collisions from spreading, and isolate each port into an independent Collision Domain. However, standard Layer 2 switches forward broadcast frames (e.g. ARP requests) to all ports, leaving a single Broadcast Domain.

3. Routers (Layer 3 - Network): Examine 32-bit/128-bit logical IP addresses to route packets between disparate networks. Routers block Layer 2 broadcasts by default, isolating both Collision Domains and Broadcast Domains per interface.

2. Collision vs Broadcast Domain Operational Comparison

Domain boundary rules for standard network equipment:

Feature / AspectDeviceOSI Layer
Hub / Repeater (N ports)Layer 1 (Physical)Exactly 1 (shared across all N ports)
Bridge (2 ports)Layer 2 (Data Link)2 collision domains (1 per port)
Switch (N active ports)Layer 2 (Data Link)N collision domains (1 per active port)
Router (K interfaces)Layer 3 (Network)K collision domains (1 per interface)

3.Transparent Bridge Backward Learning Algorithm

A transparent bridge operates plug-and-play without requiring manual network configuration. It learns network topology dynamically through backward learning:

Algorithm Execution on Arrival of Frame (Source = S, Destination = D) on Port P:

1. Inspection & Learning: The bridge inspects Source MAC S. It writes or refreshes the entry in its Filtering/Forwarding Table: (MAC = S, Port = P, TTL = 300s).

2. Destination Lookup & Forwarding Decision:

• Case A (Same Segment): If Destination D is in the table and mapped to Port P, the bridge drops (filters) the frame because the destination is already on the source segment.

• Case B (Known Different Segment): If Destination D is in the table and mapped to Port Q (where Q != P), the bridge forwards the frame exclusively onto Port Q.

• Case C (Unknown Destination or Broadcast): If Destination D is NOT in the table, or if D is the broadcast MAC FF:FF:FF:FF:FF:FF, the bridge floods the frame to ALL active ports EXCEPT the incoming port P.

4.Spanning Tree Protocol (STP IEEE 802.1D)

Redundant physical links between switches are essential for fault tolerance. However, redundant links create Layer 2 Physical Loops, causing:

• Broadcast Storms: Broadcast frames circulate infinitely, saturating network bandwidth.

• Multiple Frame Copies: Unicast frames arrive repeatedly at destination hosts.

• CAM Table Instability: Switch MAC learning tables thrash continuously as frames arrive from oscillating ports.

STP Algorithm (Radia Perlman):

1. Elect Root Bridge: Switches exchange Bridge Protocol Data Units (BPDUs). The switch with the lowest numerical Bridge ID (Priority + MAC) becomes the Root Bridge.

2. Elect Root Ports (RP): On every non-root switch, the port with the lowest cumulative path cost to the Root Bridge is designated as the Root Port (exactly 1 RP per non-root switch).

3. Elect Designated Ports (DP): On every physical link/segment, the switch port providing the lowest path cost to the Root Bridge is elected as the Designated Port (all ports on the Root Bridge are DPs).

4. Block Alternate Ports: All remaining ports are placed into the Blocking/Discarding state, breaking all loops while maintaining hot standby backup paths.

WORKED EXAM ANALYSIS · STEP-BY-STEP DERIVATION2 Marks

5. GATE Worked Numerical: Domain Counting & Bridge Table Trace

⚠️ Pitfall Warning:

Remember that each interface of a router is BOTH an independent collision domain AND an independent broadcast domain!

Problem (Modeled on GATE Pattern): A campus network consists of:

• 1 Router with 3 active interfaces (R1, R2, R3).

• Interface R1 connects to an 8-port Switch S1. S1 connects to 7 host PCs.

• Interface R2 connects to a 4-port Hub H1. H1 connects to 3 host PCs.

• Interface R3 connects to an 8-port Switch S2. S2 connects to 5 host PCs and a 4-port Hub H2. H2 connects to 3 host PCs.

Calculate: (a) Total number of Collision Domains, and (b) Total number of Broadcast Domains in the network.

Step 1: Calculate Broadcast Domains:

Routers isolate broadcast traffic. Each active router interface defines exactly 1 broadcast domain.

The router has 3 active interfaces (R1, R2, R3).

Switches and Hubs do not create separate broadcast domains.

Total Broadcast Domains = 3.

Step 2: Calculate Collision Domains per Router Interface branch:

Branch 1 (R1 -> Switch S1):

S1 has 8 active links: 1 link to router R1 + 7 links to host PCs = 8 links.

Each active switch link is an independent collision domain = 8 collision domains.

Branch 2 (R2 -> Hub H1):

H1 connects to R2 and 3 PCs. A Hub shares a single physical wire.

Entire Hub H1 branch = 1 collision domain.

Branch 3 (R3 -> Switch S2 -> Hub H2):

S2 has active ports: 1 link to router R3 + 5 links to PCs + 1 link to Hub H2 = 7 switch ports.

Each of these 7 switch ports forms a collision domain = 7 collision domains.

(The 3 PCs connected to Hub H2 all share the single collision domain provided by that one switch port).

Total collision domains in Branch 3 = 7.

Step 3: Total Collision Domains = 8 + 1 + 7 = 16 Collision Domains.

Conclusion: Total Broadcast Domains = 3; Total Collision Domains = 16.

SOURCE TRANSPARENCY & CITATIONS

Primary Academic References & Exam Sources

Every concept in Notes From a B.Tech Brain is synthesized from authoritative academic texts, seminal peer-reviewed research, verified exam archives, and renowned university lectures.

Curated University Lecture Series
Computer Networks: A Systems Approach (6th Edition) ·
LECTURE SERIES
RECOMMENDED YOUTUBE EDUCATORS & FULL-COURSE PLAYLISTS

Curated for clarity, rigorous numerical solving, and semester excellence:

Knowledge Gate · Computer Networks for GATE↗Instructor: Sanchit Jain · Covers: OSI/TCP-IP layers, sliding window, CRC, subnetting, TCP congestion control

GATE-level numerical drilling and PYQ analysis.

Open YouTube↗
Gate Smashers · Computer Networks Full Course↗Instructor: Varun Singla · Covers: Ethernet, IP addressing, routing algorithms, TCP/UDP, DNS & HTTP

Step-by-step conceptual walkthroughs with worked GATE numericals.

Open YouTube↗
Neso Academy · Computer Networks Series↗Instructor: Neso Academy · Covers: Data link layer, framing, error detection, medium access, TCP/IP

Clear whiteboard lectures for foundational and semester exam coverage.

Open YouTube↗