Routers move packets between networks. They do that job only when they know a next hop for each destination. Static routes and dynamic routing protocols fill that table. CompTIA Network+ N10-009 objective 2.1 tests how those sources compete: static vs dynamic, OSPF vs BGP vs EIGRP, then administrative distance, prefix length, and metric. Candidates who treat OSPF and BGP as “two similar routing protocols” miss the exam. They solve different problems.
A full Network+ N10-009 study path maps this objective to the rest of implementation and troubleshooting. This article stays inside 2.1 and the routing-table items in domain 5.
What a router actually decides
A router reads the destination IP in a packet. It searches the routing table for the best match. It forwards the packet out one interface toward one next-hop address.
Three facts control that match:
- Prefix length. A more specific prefix wins. A route to 10.10.10.0/24 beats a route to 10.10.0.0/16 for host 10.10.10.50. CompTIA lists prefix length under route selection for this reason.
- Administrative distance (AD). AD ranks the source of the route, not the path cost. Lower AD wins when two sources advertise the same prefix and mask.
- Metric. Metric ranks paths inside one protocol. OSPF cost is not comparable to a BGP path attribute. The router only compares metrics among routes from the same protocol.
N10-009 also lists NAT, PAT, FHRP, VIP, and subinterfaces under 2.1. Those change how packets leave a router. They do not replace OSPF or BGP.
Static routing vs dynamic routing
Static routing means an administrator writes the path. The router does not discover neighbors or flood topology. The route stays until someone deletes it or the tracked interface fails (if the platform supports tracking).
Static routes fit:
- A single exit to the internet (a default route: 0.0.0.0/0)
- A stub network with one uplink
- A traffic-engineering override that must beat a dynamic protocol
Static routes fail when a link dies and no human (or tracking feature) withdraws them. The table still points at a dead next hop.
Dynamic routing means routers exchange reachability and rebuild the table after a change. N10-009 names three dynamic protocols: OSPF, EIGRP, and BGP.
| Protocol | Role on the exam | Where it runs |
|---|---|---|
| OSPF | Interior Gateway Protocol (IGP) | Inside one autonomous system |
| EIGRP | IGP (Cisco-developed) | Inside one autonomous system |
| BGP | Exterior Gateway Protocol (EGP) | Between autonomous systems, and sometimes inside them as iBGP |
An autonomous system (AS) is a set of routers under one technical administration. RFC 4271 uses that definition for BGP. OSPF, per RFC 2328, is designed to run internal to a single AS.
Distance vector, link-state, and path vector
Exam questions still sort protocols by how they share information. N10-009 2.1 does not print these class names, but they explain why OSPF and BGP behave differently.
Distance vector. A router tells neighbors “I can reach network X at cost Y.” Neighbors add their own cost and pass the rumor on. The router does not hold a full map. Convergence is slow. Count-to-infinity is the classic failure. RIP is the textbook example. RIP is not listed in N10-009 2.1.
Link-state. Each router describes its own links, floods that description through an area, and builds a shared map (the link-state database). Each router then runs a shortest-path algorithm with itself as the root. OSPF is this class.
Path vector. BGP advertises a prefix plus the list of autonomous systems the advertisement already crossed (AS_PATH). Peers reject a path that already contains their own AS. That list is how BGP prunes loops at AS scale. RFC 4271 states that the AS list is enough to build a graph of AS connectivity and to apply policy.
EIGRP is not classic distance vector and not link-state. CompTIA lists it as a dynamic protocol. Cisco documents it as an advanced distance-vector protocol that stores neighbor and topology tables and can use a feasible-successor backup path. Treat it as the third named IGP on N10-009, not as “OSPF but Cisco.”
OSPF under the hood
Open Shortest Path First (OSPF) is a link-state IGP. RFC 2328 (OSPFv2, IPv4) states that OSPF floods link-state advertisements, authenticates protocol exchanges, supports equal-cost multipath, and splits an AS into areas.
Adjacencies
OSPF routers send Hello packets on an interface. Neighbors form an adjacency when Hellos match on area ID, timers, authentication, and (on multi-access links) other network parameters. RFC 2328 gives a sample Hello interval of 10 seconds on a LAN. The dead interval is commonly four Hellos. Those timer numbers are protocol defaults in the RFC sample / common implementations, not a CompTIA 1.4 port entry.
On a multi-access network, OSPF elects a Designated Router (DR) and a Backup Designated Router (BDR). Other routers adjacent only with the DR/BDR. That cuts the mesh of adjacencies.
The map and the tree
Each router originates link-state advertisements (LSAs) that describe its links. Flooding spreads LSAs through the area. Every router in the area holds the same link-state database for that area.
Each router then runs Dijkstra’s algorithm and builds a shortest-path tree with itself as root. RFC 2328 says the routing table comes from that tree. The OSPF metric is cost. Lower cost wins. Implementations often derive cost from interface bandwidth; the RFC itself treats cost as a configured link metric.
Equal-cost paths stay in the table. OSPF can install multiple next hops when costs match.
Areas
Flooding a huge AS as one map wastes CPU and bandwidth. OSPF splits the AS into areas.
- Area 0 (Area ID 0.0.0.0) is the backbone. RFC 2328 reserves that ID and requires the backbone to distribute inter-area routes.
- Area Border Routers (ABRs) connect Area 0 to other areas.
- Intra-area routes stay inside the area map. Inter-area routes cross the backbone as summaries.
Single-area OSPF (every router in Area 0) is the usual first lab. Multi-area design is how production OSPF scales.
OSPF does not carry internet-scale policy. It computes shortest paths from a topology database. That is the right tool inside one organization. It is the wrong tool for choosing among ISPs.
BGP under the hood
Border Gateway Protocol (BGP) is an inter-AS routing protocol. RFC 4271 (BGP-4) states that a BGP speaker exchanges network reachability, including the list of ASes the information traversed. That list lets a speaker prune loops and apply policy at AS level. BGP-4 advertises CIDR prefixes, not classful networks.
Sessions, not Hellos-on-the-wire
BGP runs over TCP port 179 (RFC 4271). Two routers open a TCP session, exchange OPEN messages, then send UPDATE messages that advertise or withdraw prefixes.
- eBGP (external BGP) connects peers in different autonomous systems. This is how ISPs and large enterprises hand off internet routes.
- iBGP (internal BGP) connects peers in the same AS so that AS can carry a consistent external view to every border router.
iBGP does not replace OSPF. Typical design: OSPF (or EIGRP) builds internal reachability; iBGP distributes external prefixes across the AS.
Path attributes, not “OSPF cost”
BGP does not pick “the shortest link-state path.” It picks a path by policy, using path attributes. RFC 4271 defines the core set. The attributes that matter on Network+ are:
- AS_PATH — the sequence of ASes already crossed. Shorter AS_PATH is preferred in the default decision process after higher-priority policy attributes.
- NEXT_HOP — the IP address to use as the next hop.
- LOCAL_PREF — an internal preference. Higher LOCAL_PREF wins. This attribute stays inside the AS.
- MULTI_EXIT_DISC (MED) — a hint to an adjacent AS about which entry point to prefer. Lower MED is preferred when compared.
Administrators set policy first (which neighbor is allowed to send which prefix, which LOCAL_PREF wins). The graph of AS_PATH is the safety net against loops. That is why BGP can steer traffic toward one ISP and away from another. OSPF cannot express “prefer carrier A unless its path prepends three extra AS hops.”
Scale
The global default-free routing table is a BGP problem. OSPF cannot flood that many LSAs or recompute Dijkstra across the internet. BGP advertises prefixes and paths between ASes and holds those routes in the BGP table (RIB). Only the selected path for each prefix is a candidate for the IP routing table.
Route selection the exam expects
CompTIA lists three selection tools. Use them in this order of ideas, not as one mixed formula.
1. Prefix length (most specific match)
Forwarding uses longest-prefix match. Two routes to overlapping space do not “tie on AD” for a host that sits in the more specific block. The /24 wins over the /16 for addresses inside that /24.
2. Administrative distance (source trust)
AD is local to the router. Cisco documents that AD is not advertised in routing updates. Lower is better.
Cisco default AD values appear on almost every Network+ practice item that names numbers. CompTIA’s objective text does not publish this table. Treat the numbers as vendor defaults you must still recognize:
| Source | Default AD (Cisco) |
|---|---|
| Connected | 0 |
| Static | 1 |
| eBGP | 20 |
| EIGRP (internal) | 90 |
| OSPF | 110 |
| RIP | 120 |
| EIGRP (external) | 170 |
| iBGP | 200 |
| Unknown / untrusted | 255 |
Read the table as a trust ranking. A static route (AD 1) installs over OSPF (AD 110) for the same prefix and mask. Internal EIGRP (90) installs over OSPF (110). eBGP (20) outranks both IGPs for the same prefix.
A floating static route uses a raised AD (for example 210) so it sits behind OSPF and only installs if OSPF withdraws.
3. Metric (best path inside one protocol)
- OSPF: lowest cost
- EIGRP: composite metric (bandwidth, delay, and optional load/reliability)
- BGP: the decision process over path attributes, not a single integer hop count
Do not compare “OSPF cost 20” to “AS_PATH length 2.” Those numbers live in different selection stages.
OSPF vs BGP: the contrast that scores points
| Question | OSPF | BGP |
|---|---|---|
| Job | Best path inside an AS | Reachability and policy between ASes |
| Class | Link-state IGP | Path-vector EGP |
| Map | Shared LSA database per area | Prefix + AS_PATH and other attributes |
| Algorithm | Dijkstra shortest-path tree | Policy-ordered decision process |
| Metric the exam names | Cost | Path attributes (AS_PATH, LOCAL_PREF, MED, NEXT_HOP) |
| Scope | Areas around Area 0 | Autonomous system numbers |
| Transport | OSPF protocol packets (IP protocol 89 in implementations) | TCP 179 |
| Failure domain | Bad LSA can poison an area | Bad announcement can steer global traffic |
| Typical neighbor | Another company router on a LAN or WAN link | An ISP or a peer AS at a border |
Use OSPF when every router shares one administrative domain and should agree on topology. Use BGP when two organizations exchange prefixes and must apply policy.
A campus with three buildings runs OSPF. That campus buys two internet circuits from two ISPs and runs eBGP on the border routers. iBGP or a route reflector can carry those external routes inside the AS. OSPF still carries the internal subnets.
EIGRP in one paragraph (because 2.1 names it)
Enhanced Interior Gateway Routing Protocol (EIGRP) is the third dynamic protocol on N10-009. It is an IGP. Neighbors form from Hello packets. Each router stores a topology table and can keep a feasible successor as a backup next hop, so failover does not always require a full recomputation. Cisco default AD is 90 internal / 170 external. On the exam, do not call EIGRP “link-state.” Do not call it BGP. Place it beside OSPF as an interior protocol with a different metric and a different AD.
What breaks, and what the routing table shows
N10-009 domain 5 tests routing-table and default-route failures with the same vocabulary as 2.1.
- Missing default route. Hosts reach the local subnet and nothing else. The edge router needs 0.0.0.0/0 from static config, OSPF, or BGP.
- Wrong next hop. A static route or a BGP NEXT_HOP points at an address the router cannot resolve. The prefix sits in the table and still black-holes traffic.
- AD hides the path you expected. OSPF learned 10.0.0.0/8, but a static /8 with AD 1 is installed. show the table and read the source code, not only the prefix.
- Prefix length hides the path you expected. A leftover /24 static route steals traffic from a /16 OSPF summary.
- BGP session down. TCP/179 fails (filter, ASN mismatch, wrong neighbor address). The external prefixes withdraw. Internal OSPF keeps running. Users lose only the destinations BGP owned.
- OSPF adjacency down. Area ID, timer, or authentication mismatch. LSAs stop. Intra-area prefixes disappear.
Read the routing table as the product of prefix length, AD, and metric. Then ask which protocol was allowed to install that row.
Exam-ready summary
N10-009 2.1 asks you to explain routing characteristics, not to configure every Cisco knob.
- Static routes are administrator-defined. Dynamic protocols discover and update paths.
- The named dynamic protocols are OSPF, EIGRP, and BGP.
- OSPF is a link-state IGP. It floods LSAs, runs Dijkstra, uses cost, and depends on Area 0 in multi-area designs.
- BGP is an inter-AS path-vector protocol. It runs over TCP 179 and selects paths with policy attributes, not OSPF cost.
- Route selection uses prefix length, administrative distance, and metric, in that conceptual stack.
- Domain 5 then asks you to read the routing table and the default route when packets fail.
Build OSPF first so the AS has internal reachability. Add BGP only where autonomous systems meet. That split is the whole point of the objective.
Leave a Reply