JNCIA-Junos JN0-106 · Networking Fundamentals · Addressing

Networking fundamentals for Junos: addressing and longest match

Collision and broadcast domains, Ethernet, MAC and ARP, IPv4 and IPv6 addressing, binary, subnetting and supernetting, how a router picks the longest match, TCP vs UDP and the basics of class of service — then address a real network and fix a routing mistake on Junos.

33 min read9 chapters2 labs15 quiz7 scenarios15 interview Q&A

This first module is free: read the lesson and take the quiz. Labs need an account: sign up free to run up to 3 hands-on labs.

Log inStart free trial
This reading material cannot be printed. Read it on config.nwkings.com.
01

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.

DeviceLayerCollision domainsBroadcast domains
Hub1one for all portsone for all ports
Switch (EX)2one per portone per VLAN
Router (MX, SRX, vMX)3one per portone per interface
Broadcast domain A (VLAN 10) Broadcast domain B (VLAN 20) Router / IRB (separates them) PC1 PC2 PC3 PC4

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 table on 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.

Upgrade to keep reading

The free plan lets you read chapter 1 of this module. Upgrade to open the remaining chapters.

  1. Ethernet, MAC addresses and ARP
  2. IPv4 addresses and binary made easy
  3. Subnetting and VLSM: planning the Nashik office
  4. Supernetting and a full walkthrough of the office build
  5. IPv6 addressing on Junos
  6. Longest match and troubleshooting a stale route
  7. TCP, UDP and class of service basics
  8. Summary and exam checklist

Join the community