{"id":169375,"date":"2026-06-21T19:28:22","date_gmt":"2026-06-21T16:28:22","guid":{"rendered":"https:\/\/computingforgeeks.com\/?p=169375"},"modified":"2026-06-21T19:28:22","modified_gmt":"2026-06-21T16:28:22","slug":"cisco-ospf-single-area-configuration","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/cisco-ospf-single-area-configuration\/","title":{"rendered":"Configure Single-Area OSPF on Cisco IOS"},"content":{"rendered":"<p>Static routes work fine until you have more than a few of them. Single-area OSPF is where most networks reach for a dynamic routing protocol: the routers discover each other, exchange a map of the topology, and keep their routing tables in sync on their own, with no more static routes to maintain. The whole thing takes only a handful of commands per router.<\/p>\n\n<p>This guide configures single-area OSPFv2 on three Cisco routers two different ways (the network-statement method and the newer interface method), makes the LAN interfaces passive, advertises a default route into the area, then verifies everything with the show commands that prove it converged. Every command and all output below come from a real lab, not a simulator. If you are studying for the Cisco CCNA 200-301 exam, OSPF configuration is one of the simulation items, so the lab challenge near the end rehearses exactly that flow.<\/p>\n\n<p><em>Configured and captured on three Cisco IOS 15.2 routers in GNS3, June 2026. Every command and every show output below is from that lab.<\/em><\/p>\n\n<p>If you have not met the moving parts yet (neighbors, DR\/BDR, the link-state database, cost), read the companion guide on <a href=\"https:\/\/computingforgeeks.com\/ospf-concepts-explained\/\">OSPF concepts<\/a> first. This article is the hands-on counterpart: it assumes you know what OSPF does and focuses on getting it running.<\/p>\n\n<h2>The lab topology<\/h2>\n\n<p>Three routers sit in a line, all in OSPF area 0. R1 is the edge router with a path to the internet, R2 is the transit router in the middle, and R3 is a branch. Each router has a LAN, and R1 hands a default route to the rest of the area so R2 and R3 know how to reach the outside world.<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1500\" height=\"660\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ospf-sa-topo.png\" alt=\"Single-area OSPF lab topology, three routers in OSPF area 0, R1 advertises a default route\" class=\"wp-image-169370\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ospf-sa-topo.png 1500w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ospf-sa-topo-300x132.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ospf-sa-topo-1024x451.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ospf-sa-topo-768x338.png 768w\" sizes=\"auto, (max-width: 1500px) 100vw, 1500px\" \/><\/figure>\n\n\n<p>The addressing is deliberately simple so the routes are easy to read later. Every link is a \/30, every LAN is a \/24, and the router IDs are clean numbers:<\/p>\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Device<\/th><th>Interface<\/th><th>Address<\/th><th>Purpose<\/th><\/tr><\/thead><tbody>\n<tr><td>R1<\/td><td>Gi0\/0<\/td><td>10.0.12.1\/30<\/td><td>Link to R2<\/td><\/tr>\n<tr><td>R1<\/td><td>Loopback1<\/td><td>10.1.1.1\/24<\/td><td>LAN (passive)<\/td><\/tr>\n<tr><td>R2<\/td><td>Gi0\/0<\/td><td>10.0.12.2\/30<\/td><td>Link to R1<\/td><\/tr>\n<tr><td>R2<\/td><td>Gi1\/0<\/td><td>10.0.23.2\/30<\/td><td>Link to R3<\/td><\/tr>\n<tr><td>R2<\/td><td>Loopback1<\/td><td>10.2.2.2\/24<\/td><td>LAN (passive)<\/td><\/tr>\n<tr><td>R3<\/td><td>Gi0\/0<\/td><td>10.0.23.1\/30<\/td><td>Link to R2<\/td><\/tr>\n<tr><td>R3<\/td><td>Loopback1<\/td><td>10.3.3.3\/24<\/td><td>LAN (passive)<\/td><\/tr>\n<\/tbody><\/table><\/figure>\n\n<p>In the lab each LAN is a loopback, with <code>ip ospf network point-to-point<\/code> set so it advertises the whole \/24 instead of a \/32 host route. On real hardware that LAN is the physical interface facing your switch, which advertises as a \/24 with no extra step, and every command below is identical. The complete R1, R2, and R3 configurations are in the <a href=\"https:\/\/github.com\/c4geeks\/ccna-labs\/tree\/main\/ospf-single-area\" target=\"_blank\" rel=\"noopener\">companion lab repo<\/a> if you want to load them directly. Here is the same lab as it ran in GNS3 on c7200 routers:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1160\" height=\"520\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ospf-sa-gns3.png\" alt=\"GNS3 canvas of three Cisco routers configured for single-area OSPF\" class=\"wp-image-169371\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ospf-sa-gns3.png 1160w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ospf-sa-gns3-300x134.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ospf-sa-gns3-1024x459.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ospf-sa-gns3-768x344.png 768w\" sizes=\"auto, (max-width: 1160px) 100vw, 1160px\" \/><\/figure>\n\n\n<p>Assume the interfaces are already addressed as shown in the table. Everything from here is OSPF configuration, starting on R1.<\/p>\n\n<h2>Step 1: Enable OSPF and set the router ID<\/h2>\n\n<p>Start the OSPF process and pin the router ID by hand. On R1:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>configure terminal\nrouter ospf 1\n router-id 1.1.1.1<\/code><\/pre>\n\n\n<p>The <code>1<\/code> after <code>router ospf<\/code> is a process ID. It is locally significant, so R1 can run process 1 while another router runs process 50 and they still form an adjacency. R2 and R3 get the same two lines with their own IDs, <code>2.2.2.2<\/code> and <code>3.3.3.3<\/code>.<\/p>\n\n<p>Always set the router ID explicitly. Left to itself OSPF picks the highest loopback IP, or failing that the highest active interface IP, and a clean manual ID makes every later show command readable. One catch: the router ID is chosen once, when the process starts. If you change it on a process that is already running, it does not take effect until you restart the process:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>clear ip ospf process<\/code><\/pre>\n\n\n<p>That command prompts with <code>Reset ALL OSPF processes? [no]:<\/code>, so type <code>yes<\/code> to confirm. It drops and rebuilds every adjacency, so use it deliberately on a live network.<\/p>\n\n<h2>Step 2: Advertise the interfaces, two ways<\/h2>\n\n<p>An interface only runs OSPF once you tell the process about it. There are two ways to do that, and this lab uses both so you can see them side by side.<\/p>\n\n<h3>The network-statement method (R1 and R3)<\/h3>\n\n<p>Under the OSPF process, a <code>network<\/code> statement matches interfaces by address and drops them into an area. On R1:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>router ospf 1\n network 10.0.12.0 0.0.0.3 area 0\n network 10.1.1.0 0.0.0.255 area 0<\/code><\/pre>\n\n\n<p>The trailing value on each line is a wildcard mask, not a subnet mask. It is the inverse: a \/30 (255.255.255.252) becomes <code>0.0.0.3<\/code>, and a \/24 becomes <code>0.0.0.255<\/code>. The statement matches any interface whose address falls in that range and activates OSPF on it. R3 is configured the same way for its own subnets:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>router ospf 1\n network 10.0.23.0 0.0.0.3 area 0\n network 10.3.3.0 0.0.0.255 area 0<\/code><\/pre>\n\n\n<p>That handles the two routers using network statements. R2, sitting between them, is configured a different way.<\/p>\n\n<h3>The interface method (R2)<\/h3>\n\n<p>The cleaner alternative skips network statements entirely. You enable OSPF directly on each interface, which is far easier to read on a router with many interfaces. R2 uses this method:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>interface GigabitEthernet0\/0\n ip ospf 1 area 0\ninterface GigabitEthernet1\/0\n ip ospf 1 area 0\ninterface Loopback1\n ip ospf 1 area 0<\/code><\/pre>\n\n\n<p>The <code>ip ospf 1 area 0<\/code> command creates process 1 if it does not exist, so on R2 you only drop back to <code>router ospf 1<\/code> to set the router ID. Both methods produce identical adjacencies and routes; pick one per router and stay consistent.<\/p>\n\n<h2>Step 3: Make the LAN interfaces passive<\/h2>\n\n<p>A LAN holds end hosts, not routers, so there is no reason to send OSPF Hellos out of it. Sending them anyway wastes effort and exposes the protocol to anyone who plugs in. Mark the LAN passive:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>router ospf 1\n passive-interface Loopback1<\/code><\/pre>\n\n\n<p>Passive does not remove the network from OSPF. The subnet is still advertised to the rest of the area; the router just stops forming adjacencies out that interface. On a router with many user-facing interfaces, the usual pattern is to flip the default and re-enable only the links you want:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>router ospf 1\n passive-interface default\n no passive-interface GigabitEthernet0\/0<\/code><\/pre>\n\n\n<p>With the links adjacency-ready and the LANs quiet, one piece is missing: the branch routers still have no way out to the internet.<\/p>\n\n<h2>Step 4: Advertise a default route into OSPF<\/h2>\n\n<p>R2 and R3 have no idea how to reach the internet. Rather than configure a static default on each of them, let R1 inject one route that every router in the area inherits. R1 first needs a default route of its own (here a placeholder pointing at Null0 stands in for the real internet next hop), then it originates it:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>ip route 0.0.0.0 0.0.0.0 Null0\nrouter ospf 1\n default-information originate<\/code><\/pre>\n\n\n<p>The <code>default-information originate<\/code> command only injects a default if one already exists in the routing table, unless you append <code>always<\/code>. Once it fires, R1 becomes an autonomous system boundary router and the default appears on every other router as an external OSPF route. This is the dynamic-routing version of what you would otherwise hand-craft with <a href=\"https:\/\/computingforgeeks.com\/cisco-ipv4-static-routes-configuration\/\">static routes<\/a> on each device.<\/p>\n\n<h2>Step 5: Verify the adjacencies<\/h2>\n\n<p>Configuration done. The first thing to confirm is that the routers actually became neighbors. On R2, which sits between the other two, <code>show ip ospf neighbor<\/code> should list both, and <code>show ip ospf interface brief<\/code> gives a one-line summary of every OSPF-enabled interface:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2200\" height=\"644\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r2-adjacency.png\" alt=\"R2 show ip ospf neighbor with two FULL adjacencies and show ip ospf interface brief with cost\" class=\"wp-image-169372\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r2-adjacency.png 2200w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r2-adjacency-300x88.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r2-adjacency-1024x300.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r2-adjacency-768x225.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r2-adjacency-1536x450.png 1536w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r2-adjacency-2048x600.png 2048w\" sizes=\"auto, (max-width: 2200px) 100vw, 2200px\" \/><\/figure>\n\n\n<p>Both neighbors show <code>FULL<\/code>, which means their link-state databases are synchronized. The role after the slash is the result of the DR\/BDR election that runs on every Ethernet segment, even a two-router \/30 link: R2 is the DR toward R1 and the BDR toward R3. The interface brief confirms the interface method worked, listing Gi0\/0, Gi1\/0, and Lo1 all in area 0, each with a cost of 1.<\/p>\n\n<p>To check the other side, <code>show ip protocols<\/code> on R1 summarizes how the process is actually configured. It is the fastest way to confirm the network statements, the passive interface, and the default-route origination all landed:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2200\" height=\"1012\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r1-protocols.png\" alt=\"R1 show ip protocols showing OSPF router ID, advertised networks, passive interface, and ASBR\" class=\"wp-image-169373\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r1-protocols.png 2200w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r1-protocols-300x138.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r1-protocols-1024x471.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r1-protocols-768x353.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r1-protocols-1536x707.png 1536w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r1-protocols-2048x942.png 2048w\" sizes=\"auto, (max-width: 2200px) 100vw, 2200px\" \/><\/figure>\n\n\n<p>Router ID 1.1.1.1, the two advertised networks, Loopback1 listed as passive, and the line &#8220;It is an autonomous system boundary router&#8221; confirming the default origination, all in one screen.<\/p>\n\n<h2>Step 6: Verify the routes<\/h2>\n\n<p>Adjacencies up is not the goal; routes in the table is. On R3, at the far end of the lab, <code>show ip route ospf<\/code> should hold every subnet it did not configure itself, plus the default that R1 originated. The ping proves the data path actually works end to end:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2200\" height=\"874\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r3-routes.png\" alt=\"R3 show ip route ospf with O routes, O*E2 default, and a 100 percent successful ping across the OSPF area\" class=\"wp-image-169374\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r3-routes.png 2200w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r3-routes-300x119.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r3-routes-1024x407.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r3-routes-768x305.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r3-routes-1536x610.png 1536w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-ospf-r3-routes-2048x814.png 2048w\" sizes=\"auto, (max-width: 2200px) 100vw, 2200px\" \/><\/figure>\n\n\n<p>Read the codes left to right. <code>O<\/code> is an OSPF route, <code>O*E2<\/code> is the external default that R1 injected, and the bracketed pair is the administrative distance and cost. R3 learned R1&#8217;s LAN as <code>O 10.1.1.0\/24 [110\/3]<\/code>: distance 110, cost 3, the sum of the three cost-1 links the path crosses to reach it. The ping from R3&#8217;s LAN to R1&#8217;s LAN succeeds at 100 percent, which means the routes on every router in between agree.<\/p>\n\n<p>R1 sees the mirror image. Its <code>show ip route ospf<\/code> learns R3&#8217;s LAN at the same three-hop cost from the opposite direction:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>R1# show ip route ospf\n      10.0.0.0\/8 is variably subnetted, 7 subnets, 3 masks\nO        10.0.23.0\/30 [110\/2] via 10.0.12.2, 00:00:22, GigabitEthernet0\/0\nO        10.2.2.0\/24 [110\/2] via 10.0.12.2, 00:00:32, GigabitEthernet0\/0\nO        10.3.3.0\/24 [110\/3] via 10.0.12.2, 00:00:22, GigabitEthernet0\/0<\/code><\/pre>\n\n\n<p>For a deeper walk through every code and column in this output, see the guide on reading <a href=\"https:\/\/computingforgeeks.com\/cisco-ip-routing-table-explained\/\">the routing table<\/a>.<\/p>\n\n<h2>Step 7: Tune the OSPF cost<\/h2>\n\n<p>Look back at the interface brief: every link shows a cost of 1. That is because OSPF cost is the reference bandwidth (100 Mbps by default) divided by the interface bandwidth, with a floor of 1, so Gigabit and faster links all collapse to the same value. On a modern network that hides real differences between a 1G and a 10G link.<\/p>\n\n<p>The fix is to raise the reference bandwidth, and the rule is to set the same value on every router so the math stays consistent:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>router ospf 1\n auto-cost reference-bandwidth 10000<\/code><\/pre>\n\n\n<p>When you need to steer traffic onto or off a specific link regardless of bandwidth, set the cost directly on the interface instead:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>interface GigabitEthernet0\/0\n ip ospf cost 50<\/code><\/pre>\n\n\n<p>A direct interface cost always overrides the bandwidth-derived value, which makes it the cleanest tool for path selection when you have two ways to reach the same place.<\/p>\n\n<h2>Lab challenge: configure OSPF yourself<\/h2>\n\n<p>This is the part the exam tests with a simulation, so practice it without looking. You are handed R3 with its interfaces addressed (Gi0\/0 at 10.0.23.1\/30 toward R2, Loopback1 at 10.3.3.3\/24 as the LAN) but no routing protocol running. Your task:<\/p>\n\n<ul>\n<li>Start OSPF process 1 with router ID 3.3.3.3.<\/li>\n<li>Advertise both connected subnets into area 0 using network statements.<\/li>\n<li>Make the LAN interface passive.<\/li>\n<li>Confirm R3 reaches FULL with R2 and learns the default route.<\/li>\n<\/ul>\n\n<p>Configure it, then check yourself against the solution.<\/p>\n\n<h3>Solution<\/h3>\n\n<p>The whole task is six lines:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>configure terminal\nrouter ospf 1\n router-id 3.3.3.3\n network 10.0.23.0 0.0.0.3 area 0\n network 10.3.3.0 0.0.0.255 area 0\n passive-interface Loopback1\n end<\/code><\/pre>\n\n\n<p>Then verify the adjacency formed and the default arrived:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>R3# show ip ospf neighbor\n\nNeighbor ID     Pri   State           Dead Time   Address         Interface\n2.2.2.2           1   FULL\/BDR        00:00:31    10.0.23.2       GigabitEthernet0\/0<\/code><\/pre>\n\n\n<p>If you see R2 as FULL and an <code>O*E2 0.0.0.0\/0<\/code> entry in <code>show ip route ospf<\/code>, you configured it correctly. If the neighbor never appears, the usual causes are a wildcard mask that does not match the interface, a missing <code>no shutdown<\/code>, or mismatched timers between the two ends.<\/p>\n\n<h2>Test yourself on OSPF configuration<\/h2>\n\n<p>Ten questions on the commands you just ran, from network statements and wildcard masks to passive interfaces and default-route origination. Each answer is doc-checked or verified on the lab above.<\/p>\n\n<div class=\"cfg-quiz\" data-quiz=\"{\n  &quot;id&quot;: &quot;ospf-config&quot;,\n  &quot;title&quot;: &quot;Configure single-area OSPF quiz&quot;,\n  &quot;objective&quot;: &quot;3.4 Configure and verify single-area OSPFv2&quot;,\n  &quot;intro&quot;: &quot;Ten questions on configuring single-area OSPF on Cisco IOS: the OSPF process, network statements and wildcard masks, the interface method, router ID, passive interfaces, advertising a default route, and the show commands that prove it works. Every answer is doc-checked or verified on a three-router lab.&quot;,\n  &quot;questions&quot;: [\n    {\n      &quot;q&quot;: &quot;In the command &lt;code&gt;router ospf 1&lt;\/code&gt;, what is the &lt;code&gt;1&lt;\/code&gt;?&quot;,\n      &quot;options&quot;: [\n        &quot;The OSPF area number&quot;,\n        &quot;A process ID that is locally significant and need not match other routers&quot;,\n        &quot;The router ID&quot;,\n        &quot;The administrative distance&quot;\n      ],\n      &quot;answer&quot;: 1,\n      &quot;explanation&quot;: &quot;The number after &lt;code&gt;router ospf&lt;\/code&gt; is a process ID. It is locally significant, so R1 can run process 1 and R2 process 50 and they still form an adjacency. What must match is the area, timers, subnet, and authentication, not the process ID.&quot;,\n      &quot;validated&quot;: &quot;lab&quot;\n    },\n    {\n      &quot;q&quot;: &quot;Which command advertises the network 10.0.12.0\/30 into OSPF area 0 using the network-statement method?&quot;,\n      &quot;options&quot;: [\n        &quot;network 10.0.12.0 255.255.255.252 area 0&quot;,\n        &quot;network 10.0.12.0 0.0.0.3 area 0&quot;,\n        &quot;network 10.0.12.0 \/30 area 0&quot;,\n        &quot;ip ospf network 10.0.12.0 area 0&quot;\n      ],\n      &quot;answer&quot;: 1,\n      &quot;explanation&quot;: &quot;The &lt;code&gt;network&lt;\/code&gt; command takes a wildcard mask, not a subnet mask. A \/30 is 255.255.255.252, whose wildcard (inverse) is 0.0.0.3. So &lt;code&gt;network 10.0.12.0 0.0.0.3 area 0&lt;\/code&gt; matches the two host addresses on that link.&quot;,\n      &quot;validated&quot;: &quot;lab&quot;\n    },\n    {\n      &quot;q&quot;: &quot;What is the interface-method equivalent of advertising an interface into OSPF process 1, area 0?&quot;,\n      &quot;options&quot;: [\n        &quot;Enter the interface and type ip ospf 1 area 0&quot;,\n        &quot;Enter the interface and type network area 0&quot;,\n        &quot;ospf enable on the interface&quot;,\n        &quot;router ospf 1 then no passive-interface&quot;\n      ],\n      &quot;answer&quot;: 0,\n      &quot;explanation&quot;: &quot;Under the interface, &lt;code&gt;ip ospf 1 area 0&lt;\/code&gt; enables OSPF directly, with no &lt;code&gt;network&lt;\/code&gt; statement back in router configuration mode. It auto-creates process 1 if it does not exist. Our lab used network statements on R1 and R3 and the interface method on R2.&quot;,\n      &quot;validated&quot;: &quot;lab&quot;\n    },\n    {\n      &quot;q&quot;: &quot;You set router-id under an OSPF process that is already running. Why does the new ID not take effect immediately?&quot;,\n      &quot;options&quot;: [\n        &quot;The command is rejected&quot;,\n        &quot;The router ID is chosen once at process start; you must run clear ip ospf process (or reload) to apply it&quot;,\n        &quot;It needs a reboot only&quot;,\n        &quot;Router IDs cannot be set manually&quot;\n      ],\n      &quot;answer&quot;: 1,\n      &quot;explanation&quot;: &quot;OSPF selects its router ID once, when the process starts, in the order: explicit router-id, then highest loopback IP, then highest active interface IP. Changing it on a live process requires &lt;code&gt;clear ip ospf process&lt;\/code&gt; to restart the process so the new ID is used.&quot;,\n      &quot;validated&quot;: &quot;doc&quot;\n    },\n    {\n      &quot;q&quot;: &quot;What does passive-interface do to an OSPF interface?&quot;,\n      &quot;options&quot;: [\n        &quot;Removes the network from OSPF entirely&quot;,\n        &quot;Stops sending OSPF Hellos out that interface, but the interface&#039;s network is still advertised&quot;,\n        &quot;Shuts the interface down&quot;,\n        &quot;Blocks all routing updates in and out&quot;\n      ],\n      &quot;answer&quot;: 1,\n      &quot;explanation&quot;: &quot;&lt;code&gt;passive-interface&lt;\/code&gt; suppresses Hellos on that interface so no adjacency forms there (ideal for a LAN with only hosts), while the interface&#039;s subnet keeps being advertised into OSPF. In our lab the LAN loopbacks were passive yet still appeared as O routes on other routers.&quot;,\n      &quot;validated&quot;: &quot;lab&quot;\n    },\n    {\n      &quot;q&quot;: &quot;On the edge router you run default-information originate. What has to be true, and what do other routers see?&quot;,\n      &quot;options&quot;: [\n        &quot;Nothing extra; every router auto-generates a default&quot;,\n        &quot;A default route must already exist on the edge router; other routers then learn O*E2 0.0.0.0\/0 and the edge becomes an ASBR&quot;,\n        &quot;It only works with a loopback&quot;,\n        &quot;It replaces all OSPF routes with a default&quot;\n      ],\n      &quot;answer&quot;: 1,\n      &quot;explanation&quot;: &quot;&lt;code&gt;default-information originate&lt;\/code&gt; floods the edge router&#039;s existing default route into OSPF. Without a default route present it injects nothing (unless you add &lt;code&gt;always&lt;\/code&gt;). Downstream routers install &lt;code&gt;O*E2 0.0.0.0\/0&lt;\/code&gt; and the originator shows as an autonomous system boundary router in show ip protocols.&quot;,\n      &quot;validated&quot;: &quot;lab&quot;\n    },\n    {\n      &quot;q&quot;: &quot;Which command confirms an OSPF adjacency reached the FULL state?&quot;,\n      &quot;options&quot;: [\n        &quot;show ip ospf&quot;,\n        &quot;show ip ospf neighbor&quot;,\n        &quot;show ip ospf database&quot;,\n        &quot;show running-config&quot;\n      ],\n      &quot;answer&quot;: 1,\n      &quot;explanation&quot;: &quot;&lt;code&gt;show ip ospf neighbor&lt;\/code&gt; lists each neighbor with its state. FULL means the databases are synchronized; on a broadcast link you also see the role after the slash, for example FULL\/DR or FULL\/BDR.&quot;,\n      &quot;validated&quot;: &quot;lab&quot;\n    },\n    {\n      &quot;type&quot;: &quot;multi&quot;,\n      &quot;q&quot;: &quot;Which statements about verifying OSPF are correct? Select all that apply.&quot;,\n      &quot;options&quot;: [\n        &quot;show ip protocols lists the networks advertised, the router ID, and any passive interfaces&quot;,\n        &quot;show ip ospf interface brief shows the cost and DR\/BDR role per interface&quot;,\n        &quot;A neighbor stuck in EXSTART\/EXCHANGE often points to an MTU mismatch&quot;,\n        &quot;show ip ospf neighbor in the 2WAY state means the databases are fully synchronized&quot;\n      ],\n      &quot;explanation&quot;: &quot;show ip protocols summarizes the process (router ID, networks, passive interfaces, ASBR flag); show ip ospf interface brief gives a one-line-per-interface view with cost and role; EXSTART\/EXCHANGE hangs are classically an MTU mismatch. 2WAY is NOT full sync, it just means the routers see each other (normal between DROTHERs).&quot;,\n      &quot;validated&quot;: &quot;lab&quot;,\n      &quot;answers&quot;: [\n        0,\n        1,\n        2\n      ]\n    },\n    {\n      &quot;type&quot;: &quot;match&quot;,\n      &quot;q&quot;: &quot;Match each verification command to what it confirms.&quot;,\n      &quot;pairs&quot;: [\n        {\n          &quot;left&quot;: &quot;show ip ospf neighbor&quot;,\n          &quot;right&quot;: &quot;Adjacency state (FULL) and DR\/BDR role&quot;\n        },\n        {\n          &quot;left&quot;: &quot;show ip route ospf&quot;,\n          &quot;right&quot;: &quot;Learned routes with [110\/cost]&quot;\n        },\n        {\n          &quot;left&quot;: &quot;show ip ospf interface brief&quot;,\n          &quot;right&quot;: &quot;Cost and OSPF state per interface&quot;\n        },\n        {\n          &quot;left&quot;: &quot;show ip protocols&quot;,\n          &quot;right&quot;: &quot;Networks advertised and passive interfaces&quot;\n        }\n      ],\n      &quot;explanation&quot;: &quot;Each show command answers a different question: neighbor for adjacency, route for what was learned, interface brief for per-interface cost\/role, and protocols for how the process is configured.&quot;,\n      &quot;validated&quot;: &quot;lab&quot;\n    },\n    {\n      &quot;type&quot;: &quot;numeric&quot;,\n      &quot;q&quot;: &quot;What is the default administrative distance of OSPF? Type the number.&quot;,\n      &quot;answer&quot;: &quot;110&quot;,\n      &quot;hint&quot;: &quot;Static is 1, EIGRP 90, RIP 120.&quot;,\n      &quot;placeholder&quot;: &quot;e.g. 120&quot;,\n      &quot;explanation&quot;: &quot;OSPF&#039;s administrative distance is 110, so an OSPF route wins over RIP (120) but loses to EIGRP (90), a static route (1), or a connected route (0) for the same prefix. That is why a floating static uses an AD above 110 to stay out of the table until OSPF fails.&quot;,\n      &quot;validated&quot;: &quot;doc&quot;\n    }\n  ]\n}\n\" data-quiz-count=\"10\"><div class=\"cfg-quiz-loading\">Loading quiz...<\/div><\/div>\n\n<p>Drill the commands until they are automatic with the flashcard deck. You can also download the same cards as an Anki deck and review them on your phone.<\/p>\n\n<div class=\"cfg-fc\" data-fc=\"{\n  &quot;id&quot;: &quot;ospf-config&quot;,\n  &quot;title&quot;: &quot;Configure single-area OSPF flashcards&quot;,\n  &quot;objective&quot;: &quot;3.4 Configure and verify single-area OSPFv2&quot;,\n  &quot;intro&quot;: &quot;The commands and verification steps for single-area OSPF worth knowing cold: starting the process, the two ways to enable OSPF on an interface, router ID, passive interfaces, advertising a default route, tuning cost, and the show commands that prove the network converged. Tap a card to flip it, then mark whether you knew it.&quot;,\n  &quot;cards&quot;: [\n    {&quot;front&quot;: &quot;Start an OSPF process&quot;, &quot;back&quot;: &quot;router ospf &lt;process-id&gt;. The process ID (e.g. 1) is locally significant: it does not have to match neighbors. What must match for an adjacency is the area, hello\/dead timers, subnet\/mask, MTU, and authentication.&quot;},\n    {&quot;front&quot;: &quot;Advertise an interface with the network-statement method&quot;, &quot;back&quot;: &quot;Under router ospf, network &lt;address&gt; &lt;wildcard-mask&gt; area &lt;area-id&gt;. Example: network 10.0.12.0 0.0.0.3 area 0. The wildcard mask is the inverse of the subnet mask (a \/30 = 255.255.255.252 -&gt; 0.0.0.3).&quot;},\n    {&quot;front&quot;: &quot;Compute the wildcard mask from a subnet mask&quot;, &quot;back&quot;: &quot;Subtract each octet from 255. \/24 (255.255.255.0) -&gt; 0.0.0.255; \/30 (255.255.255.252) -&gt; 0.0.0.3; \/32 -&gt; 0.0.0.0 (matches one exact address).&quot;},\n    {&quot;front&quot;: &quot;Advertise an interface with the interface method&quot;, &quot;back&quot;: &quot;Enter the interface and type ip ospf &lt;process-id&gt; area &lt;area-id&gt; (e.g. ip ospf 1 area 0). No network statement needed; it auto-creates the process. Cleaner on routers with many interfaces; you still set router-id under router ospf.&quot;},\n    {&quot;front&quot;: &quot;Set the OSPF router ID and make it take effect&quot;, &quot;back&quot;: &quot;Under router ospf: router-id A.B.C.D. The ID is chosen once at process start, so on a running process you must run clear ip ospf process (or reload) for the new ID to apply.&quot;},\n    {&quot;front&quot;: &quot;How OSPF picks a router ID if you do not set one&quot;, &quot;back&quot;: &quot;1) explicit router-id command, 2) highest IP on an up loopback, 3) highest IP on an up physical interface. A loopback is preferred because it never goes down.&quot;},\n    {&quot;front&quot;: &quot;passive-interface&quot;, &quot;back&quot;: &quot;Under router ospf: passive-interface &lt;intf&gt; (or passive-interface default + no passive-interface &lt;intf&gt;). Stops OSPF Hellos out that interface so no adjacency forms, but the interface&#039;s subnet is still advertised. Use it on LAN-facing interfaces that have only hosts.&quot;},\n    {&quot;front&quot;: &quot;Advertise a default route into OSPF&quot;, &quot;back&quot;: &quot;Under router ospf: default-information originate. The router must already have a default route (e.g. ip route 0.0.0.0 0.0.0.0 ...) unless you add the always keyword. Other routers then install O*E2 0.0.0.0\/0 and the originator becomes an ASBR.&quot;},\n    {&quot;front&quot;: &quot;Verify the adjacency formed&quot;, &quot;back&quot;: &quot;show ip ospf neighbor. State FULL means databases are synchronized. On a broadcast link the role follows the slash: FULL\/DR, FULL\/BDR, or 2WAY\/DROTHER between two DROTHERs.&quot;},\n    {&quot;front&quot;: &quot;show ip protocols (for OSPF)&quot;, &quot;back&quot;: &quot;Summarizes the process: router ID, the networks being advertised, passive interfaces, whether it is an ASBR, and the routing information sources. Fast way to confirm what you actually configured.&quot;},\n    {&quot;front&quot;: &quot;Read an OSPF route in show ip route&quot;, &quot;back&quot;: &quot;O 10.3.3.0\/24 [110\/3] via ...  -&gt; O = OSPF, 110 = administrative distance, 3 = cumulative cost. O*E2 0.0.0.0\/0 is an external (redistributed) default route, the * marks it as the candidate default.&quot;},\n    {&quot;front&quot;: &quot;show ip ospf interface brief&quot;, &quot;back&quot;: &quot;One line per OSPF interface: process, area, IP\/mask, Cost, State (DR\/BDR\/P2P), and Nbrs F\/C (full\/count). The quickest check of which interfaces are in OSPF and at what cost.&quot;},\n    {&quot;front&quot;: &quot;OSPF cost and the reference bandwidth&quot;, &quot;back&quot;: &quot;cost = reference-bandwidth \/ interface-bandwidth, default reference 100 Mbps, minimum 1. So GigE and faster all read cost 1 by default. Raise it consistently on every router with auto-cost reference-bandwidth &lt;Mbps&gt; so fast links are differentiated.&quot;},\n    {&quot;front&quot;: &quot;Override OSPF cost on one interface&quot;, &quot;back&quot;: &quot;Under the interface: ip ospf cost &lt;1-65535&gt;. A direct cost overrides the bandwidth-derived value and is the cleanest way to steer traffic onto or off a specific link.&quot;},\n    {&quot;front&quot;: &quot;clear ip ospf process&quot;, &quot;back&quot;: &quot;Restarts the OSPF process: re-runs router-ID selection and the SPF calculation, and re-forms adjacencies. Needed after changing the router-id on a live process. It is disruptive (adjacencies drop briefly), so use it deliberately.&quot;},\n    {&quot;front&quot;: &quot;Adjacency will not reach FULL: what to check first&quot;, &quot;back&quot;: &quot;Mismatched hello\/dead timers, different area IDs, interfaces in different subnets\/masks, an interface set passive on one side, an MTU mismatch (stuck in EXSTART\/EXCHANGE), or authentication differences. show ip ospf neighbor and show ip ospf interface reveal most of these.&quot;}\n  ]\n}\n\" data-fc-anki=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/ccna-ospf-config-flashcards.apkg\"><div class=\"cfg-fc-loading\">Loading flashcards...<\/div><\/div>\n\n<h2>Your single-area OSPF verification checklist<\/h2>\n\n<p>OSPF is configured the same way every time, and it is verified the same way every time. When you finish a configuration, walk these four commands in order and you will catch almost any mistake before it bites:<\/p>\n\n<ol>\n<li><strong>show ip ospf neighbor<\/strong> confirms the adjacencies reached FULL. Anything stuck below FULL is a neighbor problem, not a routing problem.<\/li>\n<li><strong>show ip protocols<\/strong> confirms you advertised the right networks, made the right interfaces passive, and originated a default if you meant to.<\/li>\n<li><strong>show ip ospf interface brief<\/strong> confirms which interfaces are in OSPF and at what cost, the fastest way to spot an interface you forgot or a cost you need to tune.<\/li>\n<li><strong>show ip route ospf<\/strong> confirms the routes actually landed, with the expected <code>O<\/code> and <code>O*E2<\/code> codes and a cost that matches the hop count.<\/li>\n<\/ol>\n\n<p>Single-area OSPF is the foundation the rest of the routing topics build on. Once this is second nature, the natural next steps are inter-VLAN routing and first-hop redundancy, both of which sit on top of a working OSPF core. For the full path through the certification, follow the <a href=\"https:\/\/computingforgeeks.com\/quickly-prepare-for-ccna-200-301-exam\/\">CCNA 200-301 study roadmap<\/a>, and if you want the theory behind these commands, the <a href=\"https:\/\/computingforgeeks.com\/what-is-ip-routing-and-routing-protocols-in-networking\/\">routing protocols overview<\/a> explains why link-state routing behaves the way it does.<\/p>","protected":false},"excerpt":{"rendered":"<p>Static routes work fine until you have more than a few of them. Single-area OSPF is where most networks reach for a dynamic routing protocol: the routers discover each other, exchange a map of the topology, and keep their routing tables in sync on their own, with no more static routes to maintain. The whole &#8230; <a title=\"Configure Single-Area OSPF on Cisco IOS\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/cisco-ospf-single-area-configuration\/\" aria-label=\"Read more about Configure Single-Area OSPF on Cisco IOS\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":169376,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[299,55],"tags":[524,525],"cfg_series":[39888],"class_list":["post-169375","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-networking","tag-ccna","tag-cisco","cfg_series-ccna-200-301"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/169375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=169375"}],"version-history":[{"count":1,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/169375\/revisions"}],"predecessor-version":[{"id":169377,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/169375\/revisions\/169377"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/169376"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=169375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=169375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=169375"},{"taxonomy":"cfg_series","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/cfg_series?post=169375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}