CS331 · Chapter 6 · Annotated SlidesConnecting Devices and Virtual LANs
Original
Overview

Connecting Devices and Virtual LANs

Hubs, link-layer switches and routers: which layer each works at, how a switch learns and filters, why loops cause broadcast storms and how spanning tree fixes them, collision vs. broadcast domains, store-and-forward vs. cut-through, and VLANs. Counting collision and broadcast domains in a drawing is the classic question here, so the notes show how to count.

How to read this page

Every original slide is shown unchanged. Yellow marks on a slide point to a numbered note: hover or tap a mark to jump to its note, and hover a note to see its marks. Questions tagged Past exam appeared on a real paper; Prediction questions are likely angles, not confirmed. Pick an answer to each question: a wrong pick tells you why it is wrong, so you can try again.

All 34 slides
  1. 1 Connecting Devices and Virtual LANs
  2. 2 6-1 CONNECTING DEVICES
  3. 3 Three categories of connecting devices (Figure 6.1)
  4. 4 Hubs
  5. 5 A hub
  6. 6 Hubs
  7. 7 Interconnecting with hubs
  8. 8 Link-Layer Switches
  9. 9 Switches
  10. 10 Switches vs. hubs
  11. 11 Link-layer switch
  12. 12 Switch learning process
  13. 13 Learning switch (Figure 6.4)
  14. 14 Loop problem in a learning switch
  15. 15 Loop problem in a learning switch
  16. 16 Loop problem in a learning switch: broadcast storm
  17. 17 Spanning tree: blocking ports
  18. 18 A system of connected LANs and its graph (Part a) (Figure 6.6)
  19. 19 Finding the shortest path and the spanning tree for a switch. (Figure 6.7)
  20. 20 Forwarding and blocking ports after using spanning tree algorithm (Figure 6.8)
  21. 21 Some switch features
  22. 22 Isolated collision domains
  23. 23 Collision domains in a nonswitched and switched network
  24. 24 Collision domains in a switched network
  25. 25 Some switch features – cont’d
  26. 26 Routers
  27. 27 Routing example
  28. 28 Typical Organization LAN
  29. 29 Comparison between switch and router
  30. 30 Virtual LANs
  31. 31 A switch using VLAN software
  32. 32 Two switches in a backbone using VLAN software (Figure 6.12)
  33. 33 Note: VLANs create broadcast domains
  34. 34 Advantages Of VLAN
Slide 1 / 34

Connecting Devices and Virtual LANs

Slide 1: Connecting Devices and Virtual LANs

Notes

  1. Hub (layer 1) → switch (layer 2) → router (layer 3), then loops and spanning tree, then VLANs.

  2. Tip Counting domains: every switch or router PORT starts a new collision domain (a hub port does not). Every router PORT starts a new broadcast domain (switches and hubs do not, unless VLANs are used).

Slide 2 / 34

6-1 CONNECTING DEVICES

Slide 2: 6-1 CONNECTING DEVICES
Slide 3 / 34

Three categories of connecting devices (Figure 6.1)

Slide 3: Three categories of connecting devices (Figure 6.1)

Notes

  1. Hub = layer 1 · link-layer switch = layers 1–2 · router = layers 1–3.

  2. Seen again Ch 1 Part 2, slide 5: Devices that don’t use all layers

Exam angle

PredictionQ1

A link-layer switch operates in which layers?

PredictionQ2

Which device works at the network layer?

Slide 4 / 34

Hubs

Slide 4: Hubs

Notes

  1. Hub = layer 1: works on BITS, copies every bit to every other port, no filtering, no access method.

  2. Cable host ↔ hub max 100 m, so two hosts can be at most 200 m apart.

  3. Trap A hub does not read MAC addresses at all; it only repeats bits.

  4. Seen again Ch 1 Part 2, slide 26: Physical-layer devices

Exam angle

PredictionQ1

A hub forwards a received bit to:

PredictionQ2

Topology of hosts connected to a hub:

PredictionQ3

A hub performs filtering using MAC addresses.

Slide 5 / 34

A hub

Slide 5: A hub

Notes

  1. Everyone gets the frame. Each NIC checks the destination MAC: B keeps it, C and D discard it.

Slide 6 / 34

Hubs

Slide 6: Hubs

Notes

  1. Collision domain: the set of devices whose simultaneous SENDING collides.

  2. Memory trick Collision = who can crash into each other. Broadcast = who can hear each other’s shouting.

Exam angle

PredictionQ1

Five PCs are connected to one hub. How many collision domains?

PredictionQ2

Define collision domain and broadcast domain.

Compare with the model answer

A collision domain is the part of a network where two devices sending at the same time collide. A broadcast domain is the part where every device receives the others’ broadcast messages.

Slide 7 / 34

Interconnecting with hubs

Slide 7: Interconnecting with hubs

Notes

  1. Hubs joined by a hub: longer reach, but ALL the segments become one big collision domain → worse performance.

Slide 8 / 34

Link-Layer Switches

Slide 8: Link-Layer Switches
Slide 9 / 34

Switches

Slide 9: Switches

Notes

  1. The table starts EMPTY and fills itself by learning. Entry = MAC address + interface + time.

Exam angle

PredictionQ1

A switch’s forwarding table is initially:

PredictionQ2

A switch table entry contains:

Slide 10 / 34

Switches vs. hubs

Slide 10: Switches vs. hubs
Slide 11 / 34

Link-layer switch

Slide 11: Link-layer switch
Slide 12 / 34

Switch learning process

Slide 12: Switch learning process

Notes

  1. Destination known → forward out of that port (or drop if it’s the same port it came in on). Unknown → flood. Broadcast/multicast → all ports.

  2. Memory trick Source teaches, destination decides.

  3. Trap A switch never learns from the destination address.

Exam angle

PredictionQ1

A switch learns a new table entry from a frame’s:

PredictionQ2

A switch receives a frame whose destination MAC is not in its table. It:

PredictionQ3

If the destination is on the same port the frame arrived on, the switch drops the frame.

Slide 13 / 34

Learning switch (Figure 6.4)

Slide 13: Learning switch (Figure 6.4)

Notes

  1. a. Empty. b. A → D: learn A on port 1; D unknown → flood. c. D → B: learn D on port 4; flood. d. B → A: learn B; A known → port 1. e. C → D: learn C; D known → port 4.

Exam angle

PredictionQ1

An empty switch has A on port 1, B on port 2, C on port 3, D on port 4. A sends to D, then D sends to A. What does the switch do each time?

Compare with the model answer

A → D: it learns “A is on port 1”; D is unknown, so it floods the frame to ports 2, 3 and 4. D → A: it learns “D is on port 4”; A is known, so it forwards only out of port 1.

Slide 14 / 34

Loop problem in a learning switch

Slide 14: Loop problem in a learning switch
Slide 15 / 34

Loop problem in a learning switch

Slide 15: Loop problem in a learning switch

Notes

  1. Broadcast, multicast and unknown-unicast frames get flooded; with a loop they go round forever and multiply → broadcast storm → the network dies.

Exam angle

PredictionQ1

Loops in a switched network cause:

PredictionQ2

Which protocol removes loops from a switched network?

Slide 16 / 34

Loop problem in a learning switch: broadcast storm

Slide 16: Loop problem in a learning switch: broadcast storm

Notes

  1. The same broadcast keeps circling the triangle of switches.

Slide 17 / 34

Spanning tree: blocking ports

Slide 17: Spanning tree: blocking ports

Notes

  1. STP keeps every switch reachable but BLOCKS some ports so no loop is left.

  2. Blocked ports still pass STP’s own frames, and wake up if the topology changes (backup paths).

  3. Trap STP doesn’t remove cables; it logically blocks ports.

Exam angle

PredictionQ1

Ports blocked by spanning tree forward no frames at all.

PredictionQ2

A blocked port can become a forwarding port again if the network changes.

Slide 18 / 34

A system of connected LANs and its graph (Part a) (Figure 6.6)

Slide 18: A system of connected LANs and its graph (Part a) (Figure 6.6)
Slide 19 / 34

Finding the shortest path and the spanning tree for a switch. (Figure 6.7)

Slide 19: Finding the shortest path and the spanning tree for a switch. (Figure 6.7)

Notes

  1. Pick a root bridge (S1), then keep the shortest path from every switch to the root.

Slide 20 / 34

Forwarding and blocking ports after using spanning tree algorithm (Figure 6.8)

Slide 20: Forwarding and blocking ports after using spanning tree algorithm (Figure 6.8)

Notes

  1. Blocked: S3 ports 2 and 3, S5 port 1. No frame goes out of them.

Slide 21 / 34

Some switch features

Slide 21: Some switch features

Notes

  1. Better performance and security (traffic only goes where needed), no size limit, transparent and plug-and-play.

Exam angle

PredictionQ1

A network of switches with no VLANs forms how many broadcast domains?

PredictionQ2

A switch isolates broadcast domains.

Slide 22 / 34

Isolated collision domains

Slide 22: Isolated collision domains

Notes

  1. Every port = its own collision domain; with full duplex there are no collisions at all.

  2. Seen again Ch 4, slide 25: Collision domains in switched Ethernet

Slide 23 / 34

Collision domains in a nonswitched and switched network

Slide 23: Collision domains in a nonswitched and switched network

Notes

  1. Hubs only: 1 collision domain, 1 broadcast domain. 4 hosts share 100 Mbps → 25 Mbps each.

Slide 24 / 34

Collision domains in a switched network

Slide 24: Collision domains in a switched network

Notes

  1. Count the LINKS between switch ports and devices: 6 links → 6 collision domains. No router → 1 broadcast domain.

  2. Each host gets the full 100 Mbps each way (200 Mbps full duplex).

Exam angle

PredictionQ1

A hub-based LAN of 4 hosts on 100 Mbps gives each host about:

PredictionQ2

The same 4 hosts on full-duplex switches each get up to:

Slide 25 / 34

Some switch features – cont’d

Slide 25: Some switch features – cont’d

Notes

  1. Cut-through: start sending as soon as the destination address is read → fast, but no error checking.

  2. Memory trick Store-and-forward = Safe but Slow. Cut-through = Quick but Careless.

Exam angle

PredictionQ1

Which switching type checks the frame for errors before forwarding?

PredictionQ2

Cut-through switching starts forwarding after reading the:

Slide 26 / 34

Routers

Slide 26: Routers

Notes

  1. Seen again Ch 8, slide 3: How routers build their tables

Exam angle

PredictionQ1

Which device isolates both collision and broadcast domains?

PredictionQ2

A router floods a packet whose destination is not in its routing table.

Slide 27 / 34

Routing example

Slide 27: Routing example

Notes

  1. Broadcast domains = router interfaces in use (2). Collision domains = every switch/router link (9).

Slide 28 / 34

Typical Organization LAN

Slide 28: Typical Organization LAN

Notes

  1. Count router interfaces with something behind them: 4 → 4 broadcast domains.

  2. Tip Counting domains: every switch or router PORT starts a new collision domain (a hub port does not). Every router PORT starts a new broadcast domain (switches and hubs do not, unless VLANs are used).

Exam angle

PredictionQ1

A router has 3 interfaces. Interface 1 goes to a switch with 5 PCs, interface 2 to a hub with 4 PCs, interface 3 to the Internet. Count the broadcast and collision domains (ignore the Internet side).

Compare with the model answer

Broadcast domains: 2 (one per LAN interface). Collision domains: the switch side has 5 (one per PC link) + 1 (switch–router link) = 6; the hub side is 1 (hub and all its PCs plus the router link). Total 7.

Slide 29 / 34

Comparison between switch and router

Slide 29: Comparison between switch and router

Notes

  1. Learn this table: it is the most likely written comparison in the chapter.

Exam angle

PredictionQ1

Give four differences between a switch and a router.

Compare with the model answer

Layer: switch layer 2 (frames), router layer 3 (packets). Addresses: switch ports have MACs; router interfaces have IP and MAC. Domains: switch isolates collision domains only, router isolates collision and broadcast domains. Unknown destination: switch floods, router drops. Setup: switch is plug-and-play, router needs configuration. Switches can cut through; routers don’t.

Slide 30 / 34

Virtual LANs

Slide 30: Virtual LANs

Notes

  1. Problem: moving a user to another subnet means new wiring.

Exam angle

PredictionQ1

A VLAN creates subnets (broadcast domains) by:

Slide 31 / 34

A switch using VLAN software

Slide 31: A switch using VLAN software

Notes

  1. One physical switch, three logical LANs. Each VLAN = its own broadcast domain = its own network.

Exam angle

PredictionQ1

One switch is split into 3 VLANs. How many broadcast domains does it have?

Slide 32 / 34

Two switches in a backbone using VLAN software (Figure 6.12)

Slide 32: Two switches in a backbone using VLAN software (Figure 6.12)

Notes

  1. VLANs can span several switches: members of VLAN 1 can sit on switch A and switch B.

Slide 33 / 34

Note: VLANs create broadcast domains

Slide 33: Note: VLANs create broadcast domains

Notes

  1. VLANs = broadcast domains. That one line answers many MCQs.

Exam angle

PredictionQ1

VLANs create separate broadcast domains on the same switch.

Slide 34 / 34

Advantages Of VLAN

Slide 34: Advantages Of VLAN

Notes

  1. VLAN advantages: cheaper moves (software, not wiring), security (broadcasts stay inside the VLAN), virtual workgroups across locations.

Exam angle

PredictionQ1

Give three advantages of VLANs.

Compare with the model answer

Lower cost and installation time, because moving a station is done in software; more security, since a group can be isolated and its broadcasts are not seen by other VLANs; and virtual workgroups, where people in different places (for example a cross-department project team) share one broadcast domain.