CS331 / Slide Breakdowns
Upgraded Study Guide

Connecting Devices And Virtual LANs

A detailed guide to the devices that connect hosts and networks: hubs, switches, routers, collision domains, broadcast domains, spanning tree, and VLANs.

Source focusConnecting Devices and VLANs
Exam skillChoose the right device by layer
Memory hookHub bits, switch frames, router packets
Best useUse for domain-counting questions
Map

Device Layers And Units

The most important exam shortcut is knowing which layer a device operates at and therefore what data unit it understands.

Physical layer

Hub

A hub operates on bits. It receives a bit from one adapter and copies it to all other adapters. It does not inspect MAC addresses and does not filter frames.

Data-link layer

Switch

A link-layer switch understands frames and MAC addresses. It can regenerate signals, learn source addresses, and forward frames to selected ports.

Network layer

Router

A router deals with packets and IP addresses. It connects LANs and WANs, chooses next hops, and separates broadcast domains.

Concept Meaning Exam clue
Hub Physical layer, bits No filtering; one collision domain
Switch Data-link layer, frames MAC learning and forwarding
Router Network layer, packets Separates broadcast domains
Mini summary
  • Device layer tells you its data unit.
  • Hubs copy; switches forward; routers route.
  • This is the base for domain questions.
Hubs

Hubs And Shared Collision Domains

A hub gives a physical star shape but behaves logically like a shared bus.

Behavior

Copies bits everywhere

When a hub receives a bit on one port, it repeats that bit on the other ports. It does not implement an access method and cannot decide where a frame should go.

Domains

One collision, one broadcast

The whole hub is a single collision domain and a single broadcast domain. More hubs can extend distance but still keep the shared collision behavior.

Topology

Physical star, logical bus

Stations connect physically to a central hub, but traffic is shared. Everyone effectively hears the same transmissions.

Mini summary
  • Hubs repeat bits.
  • They do not filter by address.
  • They create shared collision behavior.
Switches

Switch Learning, Forwarding, And Loops

Switches segment LANs and reduce collisions, but redundant switch paths can create dangerous loops.

Learning

Source-address learning

When a switch receives a frame, it compares the source address with its forwarding table. If needed, it records the source MAC and incoming port.

Forwarding

Known vs unknown destination

If the destination MAC is known, the switch forwards through the correct port. If unknown, it floods the frame. Broadcast and multicast frames are also forwarded through many ports.

Loops

Broadcast storms

Multiple switch paths can create loops. Broadcast frames can circulate repeatedly, producing a broadcast storm and wasting bandwidth.

Spanning tree

Blocking ports

The spanning tree algorithm keeps connectivity but logically disables loops by blocking selected ports.

Mini summary
  • Switches learn from source addresses.
  • Unknown destinations are flooded.
  • Spanning tree keeps a loop-free logical topology.
Domains

Collision Domains, Broadcast Domains, And Full Duplex

Switches improve LAN performance mostly by isolating collision domains and allowing simultaneous communication.

Collision domain

Where collisions can happen

A collision domain is the set of devices whose transmissions can collide. A hub is one collision domain. A switch separates collision domains by port/segment.

Broadcast domain

Where broadcasts travel

A broadcast domain is the area reached by broadcast frames. A basic switched LAN remains one broadcast domain unless divided by routers or VLANs.

Full duplex

Send and receive at once

Full-duplex operation allows a host and switch to transmit and receive simultaneously over the same interface, reducing the collision problem compared with shared media.

Mini summary
  • Switches isolate collisions.
  • Broadcasts still spread inside a VLAN/LAN.
  • Full duplex improves simultaneous communication.
Routers/VLANs

Routers And Virtual LANs

Routers divide networks at layer 3, while VLANs divide a switched LAN logically through software.

Routers

Layer-3 boundaries

A router interface has an IP address and a MAC address. Routers forward packets and separate broadcast domains. They connect similar or different network protocols across LANs and WANs.

VLAN

Logical grouping

VLANs allow computers to be grouped logically instead of physically. A user can belong to a subnet or workgroup without being in the same room or attached to the same physical switch area.

Benefits

Why VLANs are used

VLANs reduce cost and installation time because moving a station can be done by software instead of rewiring. They also organize traffic and create broadcast domains.

Mini summary
  • Routers are network-layer devices.
  • VLANs are logical LANs over switching infrastructure.
  • Both matter for broadcast-domain design.
Revise

Final Cheat Sheet

Use this as the last-pass memory page before a quiz or exam.

  • Hub Physical layer; copies bits.
  • Switch Data-link layer; forwards frames.
  • Router Network layer; forwards packets.
  • Collision domain Where collisions can occur.
  • Broadcast domain Where broadcast frames reach.
  • Unknown MAC Switch floods.
  • Loop fix Spanning tree / blocking port.
  • VLAN Logical LAN, creates broadcast domain.
Practice

Practice Questions With Answers

These questions target the facts, comparisons, and calculations that are easiest to test.

What does a hub do with received bits?

Answer: It copies them to all other ports.

Explanation: A hub is a physical-layer repeater and does not filter.

What does a switch learn from a frame?

Answer: The source MAC address and incoming port.

Explanation: This builds the forwarding table.

Why do switch loops cause problems?

Answer: Broadcast and multicast frames can circulate repeatedly.

Explanation: This creates broadcast storms.

Which device separates broadcast domains?

Answer: A router, and VLANs can also create separate broadcast domains inside switching.

Explanation: Switching alone mainly isolates collision domains.

Why are VLANs useful?

Answer: They group stations logically without physical rewiring.

Explanation: Membership can be changed in software.