FlashGenius Logo FlashGenius
Network+ N10-009 ยท Domain 2 ยท 20%

Routing & Switching Fundamentals

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.

๐Ÿ—บ๏ธ
Routing Fundamentals

Layer 3 Path Selection

Routers forward packets between networks using routing tables. They select the best path using longest prefix match, then administrative distance, then metric.

Static routing: Manually configured; predictable Dynamic routing: Learned via protocol; adaptive Default route: 0.0.0.0/0 โ€” gateway of last resort Selection: Longest prefix โ†’ AD โ†’ Metric
๐Ÿ”€
Switching Fundamentals

Layer 2 Frame Forwarding

Switches build a MAC address table by learning source MAC addresses per port, then forward, flood, or filter frames based on the destination MAC.

Learn: Record source MAC โ†’ port mapping Flood: Unknown destination โ†’ all ports (except ingress) Forward: Known destination โ†’ specific port Filter: Same-segment traffic โ†’ drop
๐Ÿ“ก
Routing Protocols

Dynamic Route Learning

Routing protocols exchange network reachability information between routers so each one automatically builds and maintains an accurate routing table.

RIPv2: Distance vector ยท hop count ยท AD 120 OSPF: Link state ยท cost ยท AD 110 ยท areas EIGRP: Hybrid ยท composite ยท AD 90 BGP: Path vector ยท policy ยท internet routing
๐Ÿ—๏ธ
VLANs & STP

Logical Segmentation & Loop Prevention

VLANs logically segment a switch into multiple broadcast domains. Spanning Tree Protocol (STP) prevents Layer 2 loops that would crash a network.

Access port: One VLAN ยท untagged ยท end devices Trunk port: Multiple VLANs ยท 802.1Q tagged STP: Elects root bridge ยท blocks redundant paths RSTP: 802.1w ยท faster convergence (~1โ€“2s)
๐Ÿ’ก
Exam focus: Expect questions on administrative distance values (OSPF=110, RIP=120, EIGRP=90), longest-prefix match priority, the difference between access and trunk ports, STP port states, and when to use static vs dynamic routing. These are consistently tested across N10-009 sessions.

Path Selection Order โ€” How a Router Chooses

1st
Longest Prefix Match
Most specific route wins โ€” /26 beats /24 regardless of protocol or AD
2nd
Administrative Distance
Lower AD wins โ€” EIGRP (90) preferred over OSPF (110) for same prefix
3rd
Metric
Lower metric wins within the same protocol (e.g., lower hop count in RIP)

How It Works

Switch MAC learning, routing table selection, routing protocol characteristics, VLAN port types, and STP port states.

How a Switch Forwards Frames โ€” The 5 Actions

L

Learn โ€” Record Source MAC

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.

F

Flood โ€” Unknown Destination MAC

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.

F

Forward โ€” Known Destination MAC

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.

F

Filter โ€” Same-Segment 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.

A

Age โ€” Remove Stale Entries

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.

Administrative Distance (AD) โ€” Route Trustworthiness

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 SourceAD ValueRelative Trust
Directly Connected0
Static Route1
eBGP (external BGP)20
EIGRP (internal)90
IGRP100
OSPF110
IS-IS115
RIP120
EIGRP (external)170
iBGP (internal BGP)200
Unknown / Unreachable255
๐Ÿ“Œ
Key exam values to memorize: Directly connected=0, Static=1, eBGP=20, EIGRP internal=90, OSPF=110, RIP=120. These four (EIGRP, OSPF, RIP) appear most frequently in Network+ questions.

Routing Protocols at a Glance

RIPv2
Distance Vector
Metric: Hop count
Max hops: 15 (16 = unreachable)
AD: 120
Updates: Every 30 seconds (multicast 224.0.0.9)
Algorithm: Bellman-Ford
Use case: Small/legacy networks
OSPF
Link State
Metric: Cost (based on bandwidth)
Max hops: No limit
AD: 110
Updates: Triggered (event-driven)
Algorithm: Dijkstra (SPF)
Use case: Enterprise networks ยท uses areas (area 0 = backbone)
EIGRP
Hybrid (Cisco)
Metric: Composite (BW + delay)
Max hops: 255 (default 100)
AD: 90 internal / 170 external
Updates: Triggered (DUAL algorithm)
Algorithm: DUAL (Diffusing Update)
Use case: Cisco-only environments
BGP
Path Vector
Metric: Policy / AS path attributes
Max hops: No limit
AD: eBGP=20 / iBGP=200
Updates: Incremental (TCP port 179)
Algorithm: Best path selection
Use case: Internet (between ISPs / ASes)
๐ŸŒ
IGP vs EGP: RIP, OSPF, and EIGRP are Interior Gateway Protocols (IGP) โ€” used inside a single autonomous system (AS). BGP is an Exterior Gateway Protocol (EGP) โ€” used between autonomous systems (how the internet routes traffic between ISPs and organizations).

VLANs โ€” Access vs Trunk Ports

Access Port

VLANs: One VLAN only Tagging: No 802.1Q tag โ€” frames are untagged Connected to: End devices (PCs, printers, phones) Config: Assigned to a single VLAN ID Traffic: Strips tag on ingress; adds none on egress

Trunk Port

VLANs: Multiple VLANs simultaneously Tagging: 802.1Q โ€” inserts 4-byte VLAN tag in frame Connected to: Switches, routers, Layer 3 switches Native VLAN: One VLAN allowed untagged (default VLAN 1) Traffic: Preserves VLAN tags across the link
โš ๏ธ
Inter-VLAN routing: Devices in different VLANs cannot communicate at Layer 2 โ€” a Layer 3 device is required. Options: (1) Router-on-a-stick โ€” a single router interface with subinterfaces per VLAN, connected to a trunk port; (2) Layer 3 switch โ€” performs routing internally with SVIs (Switched Virtual Interfaces), the modern enterprise approach.

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:

BlockingMax Age: 20s
โ†’
ListeningForward Delay: 15s
โ†’
LearningForward Delay: 15s
โ†’
ForwardingActive โœ…
Blocking: Receives BPDUs; does not forward frames or learn MACs. Redundant ports stay here.
Listening: Sends and receives BPDUs to determine root bridge. Does not forward frames or learn MACs.
Learning: Populates MAC address table. Still does not forward user frames. Prevents flooding on convergence.
Forwarding: Fully active โ€” forwards frames and learns MACs. This is the only state that passes user traffic.
โšก
RSTP (802.1w) replaces 802.1D STP with faster convergence (~1โ€“2 seconds vs 30โ€“50 seconds for STP). Port roles change to: Root port, Designated port, and Alternate/Backup port. Most modern networks run RSTP or its per-VLAN variants (PVST+, RPVST+).

Compare & Reference

Filter by category to study routing, switching, protocols, or VLAN concepts side by side.

ConceptCategoryKey Value / DetailDescriptionExam Gotcha
Static Route
RoutingAD = 1; manually configuredAdmin 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
Routing0.0.0.0/0 โ€” matches anyGateway 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
RoutingProtocol-learned; adaptiveRouters exchange routes automatically. Adapts to topology changes without admin intervention.Higher overhead than static; requires protocol configuration on all routers
Longest Prefix Match
RoutingMost specific route wins firstRouter 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
SwitchingMAC โ†’ port mappingSwitch 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
SwitchingOut all ports except ingressWhen 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
SwitchingPer port on a switchEach 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
SwitchingPer VLAN / per router interfaceAll 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
ProtocolAD=120 ยท Hop count ยท Max 15Distance 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
ProtocolAD=110 ยท Cost ยท No hop limitLink 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
ProtocolAD=90/170 ยท Composite metricHybrid (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
ProtocoleBGP AD=20 ยท iBGP AD=200Path 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
VLAN1 VLAN ยท untaggedCarries 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
VLANMultiple VLANs ยท 802.1Q taggedCarries 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
VLANUntagged on trunk ยท default VLAN 1The 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/STPLoop prevention ยท 30โ€“50s convergenceElects 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/STPFaster STP ยท ~1โ€“2s convergenceBackward 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
VLANSingle trunk โ†’ subinterfaces per VLANOne 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.

"A router has two routes to 192.168.10.0 โ€” one /24 learned via OSPF and one /26 learned via RIP. A packet arrives destined for 192.168.10.130. Which route does the router use?"

Scenario 1 โ€” Routing ยท Longest Prefix Match

  • 192.168.10.130 falls within both 192.168.10.0/24 AND 192.168.10.128/26 (if that's the /26 route).
  • Step 1: Check prefix length. /26 is more specific than /24 โ€” it matches fewer addresses, so it's more precise.
  • Longest prefix match wins โ€” the router selects the /26 route via RIP.
  • Administrative distance is NOT consulted โ€” prefix length is always the first tiebreaker.
  • AD (OSPF=110 vs RIP=120) only matters when two routes have the SAME prefix length.
โœ… Answer: /26 via RIP wins โ€” longest prefix match overrides administrative distance
"A new PC is connected to a switch port. The user can reach devices on the same switch but cannot reach devices across the network. The switch log shows the port is up/up."

Scenario 2 โ€” Switching ยท VLAN Mismatch

  • Port is up/up physically โ€” Layer 1 and Layer 2 are functional. Problem is logical.
  • PC can reach same-switch devices โ†’ switch is forwarding within its VLAN.
  • Cannot reach across network โ†’ traffic is not reaching the router or other segments.
  • Check the access port VLAN assignment โ€” the port may be in VLAN 1 (default) while other devices are in VLAN 10.
  • Fix: Assign the port to the correct VLAN. Also verify the trunk port to the router includes that VLAN.
โœ… Root cause: Access port assigned to wrong VLAN โ€” not matching the rest of the segment
"An admin configures OSPF on all routers in a new network. One branch router cannot form a neighbor relationship with the core router despite the link being up."

Scenario 3 โ€” Routing Protocols ยท OSPF Neighbor Failure

  • OSPF neighbor relationships (adjacencies) require matching parameters on both routers.
  • Check: Are both interfaces in the same OSPF area? A mismatch (area 0 vs area 1) prevents adjacency.
  • Check: Do the Hello and Dead timer intervals match? (Default: 10s Hello, 40s Dead on broadcast networks.)
  • Check: Is the subnet mask identical on both sides of the link? OSPF verifies this.
  • Check: Is authentication configured on one side but not the other?
  • Fix: Ensure area numbers, timers, subnet masks, and authentication settings match on both routers.
โœ… Root cause: OSPF area mismatch or timer mismatch prevented neighbor adjacency formation
"After adding a redundant uplink between two switches, users on the network experience broadcast storms and cannot reach any devices."

Scenario 4 โ€” VLANs & STP ยท Layer 2 Loop

  • Adding a second link between switches without loop prevention creates a Layer 2 loop.
  • A broadcast frame (ARP, DHCP) enters the loop and is forwarded infinitely โ€” causing a broadcast storm.
  • Switches have no TTL mechanism (that's Layer 3) โ€” frames loop forever at Layer 2.
  • STP/RSTP should detect the loop and place one port in blocking state โ€” check if STP is enabled on both switches.
  • If STP is disabled or misconfigured, re-enable it. Alternatively, configure the redundant link as a trunk with RSTP to allow fast failover without the storm.
โœ… Root cause: Layer 2 loop from redundant link without STP โ€” infinite broadcast replication
"Devices in VLAN 10 and VLAN 20 on the same switch cannot communicate with each other, even though both VLANs are active."

Scenario 5 โ€” VLANs ยท Inter-VLAN Routing Required

  • VLANs are separate broadcast domains โ€” Layer 2 switching cannot move traffic between VLANs.
  • A Layer 3 device is required to route between VLANs: a router or a Layer 3 switch.
  • Option A โ€” Router-on-a-stick: Configure a trunk link to the router; create subinterfaces (e.g., .10 and .20) each with an IP address as the default gateway for that VLAN.
  • Option B โ€” Layer 3 switch: Create SVIs (Switched Virtual Interfaces) for VLAN 10 and VLAN 20, assign IP addresses, and enable IP routing.
  • Verify default gateways on end devices point to the correct SVI or subinterface IP.
โœ… Root cause: No inter-VLAN routing configured โ€” VLANs require a Layer 3 device to communicate

Practice Quiz

10 Network+ N10-009 style scenario questions on routing and switching fundamentals

Question 1 of 10

Routing
โ€”
Switching
โ€”
Protocols
โ€”
VLANs/STP
โ€”

๐Ÿ—บ๏ธ 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

Quick-Recall Mnemonics

AD Values (low to high)
"Don't Start Every Internet Route Badly"
Direct(0) ยท Static(1) ยท EIGRP(90) ยท internal ยท RIP(120) ยท BGP(200 iBGP)
STP State Order
"Blocking Lions Love Forests"
Blocking โ†’ Listening โ†’ Learning โ†’ Forwarding
Route Selection Priority
"Prefix, then AD, then Metric"
Longest prefix first โ†’ lower AD โ†’ lower metric. Protocol doesn't matter if prefix length differs.
Switch Actions
"Learn, Flood, Forward, Filter, Age"
In that logical order โ€” learn source, then decide what to do with destination.
โœจ FlashGenius AI Study Tool

Turn Any Topic Into an Interactive Quiz

Generate flashcards, quizzes, and memory aids from your notes in seconds.

โšก Instant flashcards ๐ŸŽฏ Adaptive quizzing ๐Ÿ“Š Progress tracking ๐Ÿง  Spaced repetition ๐Ÿ“ฑ Mobile-ready ๐Ÿ†“ Free to start