Quibank app: now on the App Store — free, works offline. Get the app ↗

Chapters0/30 ▾
  1. 1.Models, Media & Topologies0/5
    1. The OSI and TCP/IP models: layers, data units and devices
    2. Copper and fiber: categories, distances and connectors
    3. Installing cable: plenum ratings and Power over Ethernet
    4. Wireless basics: channels, bonding, antennas and identifiers
    5. Topologies and network types: domains, mesh, spine and leaf, SAN
  2. 2.IP Addressing, Subnetting & Routing0/5
    1. IPv4 subnetting with the block-size method
    2. Private, loopback and APIPA ranges, and traffic types
    3. How routers choose a path: prefix, distance, metric and summaries
    4. IPv6: shortening, address types, SLAAC and NAT64
    5. VLANs, inter-VLAN routing and NAT
  3. 3.Ports, Protocols & Services0/5
    1. Well-known ports: secure and cleartext pairs
    2. TCP and UDP: handshake, flow control and real-time traffic
    3. DNS and DHCP: transports, records, relays and reservations
    4. Time and monitoring protocols: NTP and SNMP
    5. Tunnels, IPsec and QoS markings
  4. 4.Network Operations0/5
    1. Network documentation and the device lifecycle
    2. Monitoring with baselines, SNMP and syslog
    3. Seeing traffic: flow data, TAPs, mirror ports and availability checks
    4. Disaster recovery and high availability
    5. Change management and configuration baselines
  5. 5.Network Security0/5
    1. Core security terms: CIA, risk vocabulary and zero trust
    2. Identity and access: AAA, 802.1X, RADIUS, TACACS+, MFA and RBAC
    3. Filtering and segmentation: ACLs, screened subnets and IDS
    4. Recognizing network attacks from their symptoms
    5. Hardening, wireless authentication and physical security
  6. 6.Network Troubleshooting0/5
    1. The troubleshooting methodology, step by step
    2. Cable faults, distance limits, PoE budgets and the right tester
    3. Reading interface counters and port states
    4. Addressing and service failures: masks, DHCP, duplicates, loops, ACLs, DNS
    5. Wireless and voice quality problems
Saved in this browser. Move it to another device →
← IP Addressing, Subnetting & Routing

Chapter 2 · Lesson 3 of 5

How routers choose a path: prefix, distance, metric and summaries

1 min read

Route selection happens in a fixed order. First, longest prefix match: of all routes that contain the destination, the most specific one wins, no matter how it was learned. A packet for 10.20.30.45 matches 0.0.0.0/0, 10.0.0.0/8, 10.20.0.0/16 and 10.20.30.0/24, and the /24 is used.

Second, administrative distance breaks a tie when the same prefix comes from different sources; lower is trusted more. Third, the metric, such as hop count or cost, ranks paths inside one routing protocol. The default route is used only when nothing more specific matches.

Summarization combines contiguous networks into one shorter prefix. Example: 10.1.4.0/24 through 10.1.7.0/24 are four networks, 4 x 256 = 1,024 addresses, so shorten the prefix by 2 bits: 10.1.4.0/22 covers exactly 10.1.4.0 to 10.1.7.255. A /23 would miss two of them and a /21 would claim networks the router does not own.

Know the protocol families: OSPF is link-state, RIP is distance-vector using hop count, EIGRP is advanced distance-vector, and BGP is the path-vector exterior protocol that connects autonomous systems.

Check yourself

1. A router's IPv4 routing table contains these entries: 0.0.0.0/0 via 203.0.113.1; 10.0.0.0/8 via 10.1.1.1; 10.20.0.0/16 via 10.1.2.1; 10.20.30.0/24 via 10.1.3.1. A packet arrives destined for 10.20.30.45. Which next hop does the router use?

2. Which statement correctly distinguishes administrative distance from a routing metric?

Facts checked 2026-11-16 · Sources: CompTIA Network+ certification overview, RFC 1918: Address Allocation for Private Internets, RFC 4291: IP Version 6 Addressing Architecture

CompTIA Network+ cheat sheet: every key fact on one page →