Master static vs dynamic routing, OSPF/RIP/EIGRP/BGP, administrative distance, VLANs, trunk ports, and Spanning Tree with the Route Planner decision tool.
Routing & Switching Fundamentals
Domain 2 (Network Implementations) covers how data moves between devices on the same network and across different networks. Routing and switching concepts appear across multiple question types on N10-009.
Routers forward packets between networks using routing tables. They select the best path using longest prefix match, then administrative distance, then metric.
Switches build a MAC address table by learning source MAC addresses per port, then forward, flood, or filter frames based on the destination MAC.
Routing protocols exchange network reachability information between routers so each one automatically builds and maintains an accurate routing table.
VLANs logically segment a switch into multiple broadcast domains. Spanning Tree Protocol (STP) prevents Layer 2 loops that would crash a network.
How It Works
Switch MAC learning, routing table selection, routing protocol characteristics, VLAN port types, and STP port states.
Every frame a switch receives has a source MAC address. The switch records that MAC address โ ingress port mapping in its CAM (Content Addressable Memory) table. Entries age out after a default of 300 seconds.
If the destination MAC is not in the CAM table, the switch sends the frame out all ports except the ingress port. This is also called an unknown unicast flood. Broadcasts (FF:FF:FF:FF:FF:FF) and multicasts are also flooded.
If the destination MAC is in the CAM table, the switch sends the frame out only the port that maps to that MAC address. This is unicast forwarding โ efficient and reduces unnecessary traffic.
If the destination MAC is on the same port as the source (both devices on the same segment/hub), the switch drops the frame. No need to forward โ the destination already received it on the wire.
CAM table entries that haven't been refreshed by a new frame from that MAC are removed after the aging timer (default 300s). This prevents the table from filling with stale entries from moved or disconnected devices.
Lower AD = more trusted source. When two protocols offer a route to the same prefix, the lower AD wins. This is only used as a tiebreaker after longest prefix match.
| Route Source | AD Value | Relative Trust |
|---|---|---|
| Directly Connected | 0 | |
| Static Route | 1 | |
| eBGP (external BGP) | 20 | |
| EIGRP (internal) | 90 | |
| IGRP | 100 | |
| OSPF | 110 | |
| IS-IS | 115 | |
| RIP | 120 | |
| EIGRP (external) | 170 | |
| iBGP (internal BGP) | 200 | |
| Unknown / Unreachable | 255 |
Routing Protocols at a Glance
VLANs โ Access vs Trunk Ports
STP Port States โ Spanning Tree Protocol
STP (802.1D) prevents Layer 2 loops by electing a root bridge and blocking redundant paths. Each port transitions through these states on startup:
Compare & Reference
Filter by category to study routing, switching, protocols, or VLAN concepts side by side.
| Concept | Category | Key Value / Detail | Description | Exam Gotcha |
|---|---|---|---|---|
Static Route | Routing | AD = 1; manually configured | Admin manually defines path to destination. Best for small networks or specific paths. | Does not adapt to topology changes โ manual update required if link fails |
Default Route | Routing | 0.0.0.0/0 โ matches any | Gateway of last resort โ used when no more-specific route exists. Always the least specific prefix. | A more-specific route always overrides the default โ longest prefix match |
Dynamic Routing | Routing | Protocol-learned; adaptive | Routers exchange routes automatically. Adapts to topology changes without admin intervention. | Higher overhead than static; requires protocol configuration on all routers |
Longest Prefix Match | Routing | Most specific route wins first | Router always selects the route with the longest (most specific) prefix, regardless of AD or metric. | A /26 route via RIP beats a /24 route via OSPF โ prefix length trumps AD |
CAM / MAC Table | Switching | MAC โ port mapping | Switch builds this table by learning source MACs. Used to make forwarding decisions for unicast frames. | Full CAM table causes flooding โ a MAC flooding attack exploits this |
Unknown Unicast Flood | Switching | Out all ports except ingress | When destination MAC is not in CAM table, the frame is sent to all ports in the same VLAN. | Different from a broadcast โ it's a unicast frame with an unknown destination |
Collision Domain | Switching | Per port on a switch | Each switch port is its own collision domain. Switches eliminate collisions that hubs caused. | A hub has ONE collision domain; a switch has one per port |
Broadcast Domain | Switching | Per VLAN / per router interface | All devices that receive a broadcast (FF:FF:FF:FF:FF:FF). Switches forward broadcasts within a VLAN; routers do not forward them between networks. | VLANs segment broadcast domains at Layer 2; routers at Layer 3 |
RIPv2 | Protocol | AD=120 ยท Hop count ยท Max 15 | Distance vector. Simple, classless. Updates every 30s. 16 hops = unreachable. Best for small or legacy networks. | Max 15 hops makes it unsuitable for large networks |
OSPF | Protocol | AD=110 ยท Cost ยท No hop limit | Link state. Uses Dijkstra's SPF algorithm. Requires area 0 (backbone). Metric = cost = 100Mbps/interface bandwidth. | All OSPF areas must connect to area 0 (backbone area) |
EIGRP | Protocol | AD=90/170 ยท Composite metric | Hybrid (Cisco proprietary). Uses bandwidth + delay for metric. DUAL algorithm provides fast convergence. Internal AD=90, External=170. | Cisco-only โ cannot run on non-Cisco routers |
BGP | Protocol | eBGP AD=20 ยท iBGP AD=200 | Path vector. The routing protocol of the internet. Uses TCP port 179. Policy-based routing via AS path attributes. | eBGP (between ASes) AD=20; iBGP (within an AS) AD=200 |
Access Port | VLAN | 1 VLAN ยท untagged | Carries traffic for a single VLAN. End devices connect here. No 802.1Q tag on frames. | Device connected to an access port has no awareness of VLANs |
Trunk Port | VLAN | Multiple VLANs ยท 802.1Q tagged | Carries frames for multiple VLANs using 802.1Q tags. Used between switches and between switches and routers. | Native VLAN frames are untagged on a trunk โ mismatch = security risk |
Native VLAN | VLAN | Untagged on trunk ยท default VLAN 1 | The VLAN whose traffic is sent untagged across a trunk link. Must match on both sides of the trunk. | Native VLAN mismatch = frames arrive in wrong VLAN; can be a security vulnerability |
STP (802.1D) | VLAN/STP | Loop prevention ยท 30โ50s convergence | Elects a root bridge (lowest bridge priority, then lowest MAC). Redundant paths are put in blocking state. | Slow convergence (30โ50s). Replaced by RSTP in modern networks. |
RSTP (802.1w) | VLAN/STP | Faster STP ยท ~1โ2s convergence | Backward compatible with 802.1D. Adds Alternate and Backup port roles. Achieves sub-second convergence in many topologies. | Ports roles differ from STP: Alternate (backup to root port), Backup (backup designated port) |
Router-on-a-Stick | VLAN | Single trunk โ subinterfaces per VLAN | One physical router interface connects to a trunk port. Subinterfaces (e.g., Gi0/0.10, Gi0/0.20) handle inter-VLAN routing for each VLAN. | Single link is a bottleneck โ Layer 3 switch is preferred in modern designs |
Real-World Scenarios
How routing, switching, protocol, and VLAN concepts appear in exam-style situations.
Practice Quiz
10 Network+ N10-009 style scenario questions on routing and switching fundamentals
๐บ๏ธ Route Planner
Describe your network issue to get a targeted diagnostic recommendation.
Memory Hooks
Tap each card to reveal the answer โ 8 must-know facts for exam day
Tap any card to flip it