Mastering Longest Prefix Match Routing, Spanning Tree & VLAN Trunking for CCNA 200-301
How to read show ip route output without falling for traps, STP Root Bridge election, LACP/PAgP EtherChannels, and Dynamic ARP Inspection.
Duc Anh Vu
Network & Security Specialist • CCNP Enterprise • CCNA 200-301
Never let Administrative Distance trick you when two routes have different subnet mask lengths (/27 always beats /24 regardless of routing protocol).
● KEY TAKEAWAYS & EXAM BLUEPRINT SUMMARY
- 01Cisco routers select forwarding paths in a strict, unbreakable order: (1) Longest Prefix Match (/28 beats /24) → (2) Lowest Administrative Distance (AD) → (3) Lowest Metric.
- 02Memorize the default Administrative Distance table: Connected (0), Static (1), eBGP (20), Internal EIGRP (90), OSPF (110), RIP (120).
- 03Understand Root Bridge election in Spanning Tree Protocol (STP 802.1D / RSTP 802.1w) based on the lowest Bridge ID = Priority + Extended System ID + MAC Address.
- 04Master Layer 2 VLAN Trunking (802.1Q), Native VLANs, EtherChannel negotiation (LACP vs. PAgP), and Dynamic ARP Inspection (DAI).
1. Router Packet Forwarding Decision Order
On the Cisco CCNA 200-301 exam, roughly 25% of routing questions show you a show ip route table and ask which interface or next-hop IP the router will use for a given destination IP. Many candidates fall into the trap of comparing Administrative Distance (AD) first—forgetting that a router always evaluates the Longest Prefix Match (most specific subnet mask) before anything else!
Scenario Prompt:
Router R1 receives a packet destined for 10.1.5.65. Its routing table contains three matching routes: (1) OSPF [110/20] to 10.1.5.0/24 via Gi0/1; (2) EIGRP [90/28160] to 10.1.0.0/16 via Gi0/2; and (3) RIP [120/3] to 10.1.5.64/27 via Gi0/3. Which interface will R1 use to forward the packet?
✕ Common Distractor Trap
Interface Gi0/2 because EIGRP has the lowest Administrative Distance (AD = 90).
✓ Recommended Architecture
Interface Gi0/3 (the RIP route) because the subnet 10.1.5.64/27 (host range .64 to .95) contains 10.1.5.65 and has the longest prefix mask (/27 > /24 > /16).
| Route Source | Default AD Value | Key Exam Day Notes |
|---|---|---|
| Connected Interface | 0 | Highest precedence whenever the physical interface is up/up |
| Static Route | 1 | Configuring a custom AD higher than a dynamic protocol creates a Floating Static Route |
| External BGP (eBGP) | 20 | Inter-domain routing between Autonomous Systems (AS) |
| Internal EIGRP | 90 | Cisco advanced distance-vector routing protocol |
| OSPF | 110 | Most heavily tested link-state protocol on CCNA 200-301 |
| RIPv2 | 120 | Legacy distance-vector protocol using hop count (max 15 hops) |
2. Layer 2 Switching: VLANs, 802.1Q Trunking, STP & EtherChannel
EtherChannel Negotiation Traps: LACP (802.3ad) vs. PAgP
To bundle multiple physical switch links into a logical Port-channel, both switches must match on speed, duplex, Native VLAN, Allowed VLAN list, and channel negotiation mode:
- •LACP (IEEE 802.3ad Open Standard): Uses the keywords
active(initiates negotiation) andpassive(listens only). A bundle forms only if at least one side isactive(Active-ActiveorActive-Passive). - •PAgP (Cisco Proprietary): Uses the keywords
desirableandauto. A bundle forms only if at least one side isdesirable(Desirable-DesirableorDesirable-Auto). - •Static EtherChannel (Mode ON): Both switches must be configured as
mode on(no LACP or PAgP negotiation packets are sent).
3. Layer 2 Switch Security: Port Security, DHCP Snooping & DAI
! 1. Enable DHCP Snooping globally and on VLAN 10:
Switch(config)# ip dhcp snooping
Switch(config)# ip dhcp snooping vlan 10
! Mark the uplink port connected to the legitimate DHCP Server as Trusted:
Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# ip dhcp snooping trust
! 2. Enable Dynamic ARP Inspection (DAI) backed by the DHCP Snooping Binding Database:
Switch(config)# ip arp inspection vlan 10
Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# ip arp inspection trust✓ CCNA EXAM TIP: INSTANT STP ROOT BRIDGE ELECTION

COMPANION MOBILE APP
LearnAWS by CertWorm
Turn these architecture blueprints into daily muscle memory with AI Study Coach roadmaps, timed 65-question mock exams, and choice-level rationales on iOS & Android.