The big picture: collision and broadcast domains
What you will learn in this module. You will learn how a Junos network is addressed and how a router decides where to send a packet: Ethernet, MAC addresses and ARP, IPv4 and binary, subnetting with VLSM, supernetting, IPv6, longest-prefix match, TCP versus UDP and the basics of class of service. Two labs follow: you address a small office (the Nashik office) and you fix a routing mistake caused by a stale route.
Prerequisites. The module "Networking and Junos from zero" (packets, switch versus router, the candidate configuration and commit). You should be able to enter configure, type set commands and commit.
An analogy: apartments and shouting
Imagine a building. If everyone lives in one giant hall and talks at once, nobody can be heard: that is a collision domain on an old hub. If each family has its own flat with a private door, nobody interrupts anybody: that is one collision domain per switch port. Now think of a loudspeaker announcement: "Who owns the red car?" Everyone on the same floor hears it, but not people in other buildings. That announcement is a broadcast, and the floor is the broadcast domain.
The two definitions
A collision domain is the set of devices whose frames can collide because they share one half-duplex medium. A broadcast domain is the set of devices that receive each other's broadcast frames, for example ARP requests. Exam questions ask you to count them.
| Device | Layer | Collision domains | Broadcast domains |
|---|---|---|---|
| Hub | 1 | one for all ports | one for all ports |
| Switch (EX) | 2 | one per port | one per VLAN |
| Router (MX, SRX, vMX) | 3 | one per port | one per interface |
Two VLANs mean two broadcast domains. Only the router (or IRB) connects them, and it does not forward broadcasts.
What each device does on Junos
- A switch forwards frames by destination MAC address using its MAC table (
show ethernet-switching tableon EX). Unknown unicast and broadcast frames are flooded inside the VLAN. - A router forwards packets by destination IP address using its routing table (
show route). Every router interface is its own subnet and broadcast domain. - An EX switch with an IRB interface (for example
irb.10) is both: it switches inside VLAN 10 and routes between VLANs.
Worked example. An EX switch has 24 access ports: 12 in VLAN SALES and 12 in VLAN ENG, with no IRB. Collision domains: 24 (one per full-duplex port). Broadcast domains: 2. Connect the switch to a router with one link per VLAN: still 2 VLAN broadcast domains on the switch, and the router keeps them apart.
Common mistake. Answering "24 broadcast domains" for a switch with 24 ports. Ports make collision domains; VLANs make broadcast domains. Also remember that on a full-duplex switched link there are no collisions at all. Collisions or late collisions on a modern link usually point to a duplex mismatch.
The slow flat network
A small factory had 300 devices in one VLAN. Users complained that Wi-Fi scanners and printers were slow every morning. A capture showed thousands of ARP and other broadcasts per second reaching every device. The engineer split the network into four VLANs of about 75 devices, each with its own IRB gateway. Broadcast noise fell by about three quarters and the morning slowness disappeared.
Lesson: smaller broadcast domains mean less noise; routers or IRBs connect them.
"How many collision and broadcast domains does a 24-port switch with two VLANs have?"
Answer: 24 collision domains (one per port) and 2 broadcast domains (one per VLAN). Add that a router separates broadcast domains, a hub has one of each, and that collisions on a switched link suggest a duplex mismatch.
Key takeaways
- Collision domain = shared half-duplex medium; a switch gives one per port.
- Broadcast domain = devices that hear each other's broadcasts; one per VLAN, one per router interface.
- Switches use MAC addresses (layer 2); routers use IP addresses (layer 3).
- An IRB interface lets an EX switch route between VLANs.
- Collisions on a modern link usually mean a duplex mismatch.