🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Technology & Design › IT Support / Networking › Networking Fundamentals and Infrastructure › Lesson 8
TEC-ITS43-04 · Lesson 8 · 14 clock hours · lab

Routing: Static Routes and Introduction to OSPF

Objective. Students will configure static routes and a basic single-area OSPF process on Cisco routers to achieve full end-to-end IP reachability across a three-router topology, verified by successful pings and 'show ip route' output.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

Routing: Static Routes and Introduction to OSPF

Why Routers Need Routing Information

A router forwards packets based on its routing table — a database of known networks and the paths to reach them. When a packet arrives, the router finds the best matching entry and sends the packet out the correct interface toward the destination. Without routing information for a remote network, the router drops the packet and the destination is unreachable. You build that routing information in two main ways: configuring routes by hand (static routing) or running a routing protocol that lets routers exchange information automatically (dynamic routing).

Static Routes

A static route is a manually entered instruction that tells a router: "To reach network X, send packets out interface Y, or toward next-hop address Z." Static routes are simple, predictable, and use no extra bandwidth for protocol messages. They are appropriate for small networks, stub networks with a single path, or situations where you want strict control.

IPv4 static route syntax on Cisco IOS:

```

ip route <destination-network> <subnet-mask> <next-hop-IP | exit-interface>

```

Example — R1 needs to reach the 10.0.2.0/24 network behind R2:

```

R1(config)# ip route 10.0.2.0 255.255.255.0 10.0.1.2

```

Here `10.0.1.2` is the IP address of R2's interface on the link shared with R1.

For a three-router linear topology (R1 — R2 — R3), each router needs static entries for every network it cannot see directly. R1 and R3 each need two static routes; R2 needs routes to the networks on the far sides of R1 and R3. A common mistake is forgetting both directions: pings travel out and back, so every router along the path must know how to reach both the source and destination networks.

Verify static routes with:

```

show ip route

```

Static entries appear with the code S in the routing table. Connected networks (interfaces already configured and up) appear with code C.

Administrative Distance

When a router learns about the same destination from more than one source, it uses administrative distance (AD) to choose which entry to trust. Lower AD wins. Common values:

Because static routes have AD 1, they override OSPF routes for the same destination unless you remove them first. In today's lab you will remove static routes before enabling OSPF so the protocol can populate the table cleanly.

Longest-Prefix Match

If the routing table has overlapping entries — for example, 10.0.0.0/8 and 10.0.2.0/24 — the router forwards using the most specific (longest) prefix that matches the destination address. A /24 is more specific than a /8, so it wins even if the /8 has a lower AD. This rule applies regardless of which routing source supplied the entry.

OSPF Fundamentals

Open Shortest Path First (OSPF) is a link-state, interior gateway routing protocol defined in RFC 2328. Link-state means each router builds a complete map of the network topology (the link-state database, LSDB), then runs the Dijkstra Shortest Path First (SPF) algorithm to calculate the best path to every destination. The resulting routes are installed in the routing table.

Key OSPF concepts for this lab:

Enabling OSPF (Cisco IOS):

```

Router(config)# router ospf 1

Router(config-router)# network <network-address> <wildcard-mask> area 0

```

The process ID (1 here) is locally significant — it does not need to match on neighboring routers. The wildcard mask is the inverse of the subnet mask: a /24 subnet mask of 255.255.255.0 becomes wildcard 0.0.0.255.

Verification commands:

```

show ip ospf neighbor ! confirms adjacency formed

show ip route ! OSPF routes appear as O entries

show ip ospf database ! shows the link-state database

```

Safety and Lab Conduct

Physical lab work with live Cisco routers involves low-voltage DC equipment and console cable connections. Follow these practices:

Putting It Together

In this lab you will first build connectivity using static routes, confirm full reachability, then convert the same topology to OSPF and confirm that the routing table shows O entries. Finally, you will analyze a mixed routing table and answer questions about how the router selects paths. These skills appear on both the CompTIA Network+ and Cisco CCNA exams and are foundational to every networking role.

Key terms10

Routing tableA database stored in a router that lists known destination networks, the administrative distance and metric of each route, and the next-hop address or exit interface used to reach them.
Static routeA manually configured route that tells the router how to reach a specific network; it does not update automatically if the network topology changes.
Administrative distance (AD)A numeric rating from 0 to 255 that indicates how trustworthy a routing information source is; lower values are preferred when the same destination is learned from multiple sources.
Longest-prefix matchThe rule by which a router selects the most specific (most bits matched) routing table entry for a destination address, regardless of the route's source or metric.
OSPF (Open Shortest Path First)A link-state interior gateway routing protocol that uses the Dijkstra SPF algorithm to calculate loop-free shortest paths; routes appear in the Cisco IOS routing table with the code O.
Link-state database (LSDB)The collection of Link-State Advertisements (LSAs) that an OSPF router uses to build a complete map of the network topology before running the SPF algorithm.
Area 0The OSPF backbone area; in a single-area OSPF deployment all routers and links belong to Area 0.
Wildcard maskA 32-bit mask used in OSPF network statements (and ACLs) where a 0 bit means 'must match' and a 1 bit means 'any value is acceptable'; it is the bitwise inverse of the subnet mask.
OSPF neighbor / adjacencyThe relationship formed when two OSPF routers successfully exchange Hello packets and agree on required parameters, allowing them to share link-state information.
Next-hop addressThe IP address of the directly reachable router interface to which a router forwards packets destined for a remote network.
In class: Static route lab: three-router linear topology (R1–R2–R3) with separate subnets on each link; students configure IPv4 addresses on all interfaces, add static routes to remote networks on each router, and verify with 'show ip route' and end-to-end pings · OSPF conversion: students remove static routes and enable OSPF process 1 with the correct network statements and area 0 declarations; they verify adjacency with 'show ip ospf neighbor' and confirm routes appear in the routing table as O entries · Route table analysis exercise: instructor introduces a pre-built route table with a mix of connected, static, and OSPF routes; students answer written questions about longest-prefix match, administrative distance, and next-hop selection
Materials: Cisco ISR routers (three per group or equivalent Cisco Packet Tracer topology), console cables, PuTTY, routing reference handout (administrative distances), Cisco CCNA Official Cert Guide, lab log notebooks
Check: End-to-end ping from PC behind R1 to PC behind R3 must succeed via both static and OSPF configurations; 'show ip route' must show all remote networks; lab log must be complete; any missing route requires student to diagnose and correct before sign-off

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

CompTIA Network+ / Cisco CCNA – IP Routing
1. A network administrator adds the command 'ip route 192.168.3.0 255.255.255.0 10.0.1.2' to R1. What does this command do?
Cisco CCNA – OSPF / Cisco CCST – Routing
2. In a Cisco IOS routing table, which code identifies a route learned through OSPF?
CompTIA Network+ / Cisco CCNA – IP Routing and Addressing
3. R2's routing table has two entries for 10.1.0.0: one is 10.1.0.0/16 learned via OSPF (AD 110) and one is 10.1.1.0/24 learned via a static route (AD 1). A packet arrives destined for 10.1.1.5. Which entry does R2 use?
Cisco CCNA / CompTIA Network+ – Routing Concepts
4. What is the default administrative distance of a static route on a Cisco router?
Cisco CCNA – OSPF Configuration
5. A student types 'router ospf 1' on R1 and 'router ospf 2' on R2, then enters matching network statements for area 0 on both. Will an OSPF adjacency form between R1 and R2?
Cisco CCNA / Cisco CCST – OSPF Verification
6. Which command would a technician use to confirm that an OSPF neighbor relationship has been established on a Cisco router?
Cisco CCNA – OSPF / IP Addressing
7. A subnet is 172.16.10.0/26. What wildcard mask must be used when advertising this network in an OSPF network statement?
Cisco CCNA – OSPF Troubleshooting
8. After removing all static routes and enabling OSPF on a three-router linear topology, a student finds that 'show ip route' on R1 shows connected routes but no O entries. What is the MOST likely cause?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.