Lesson 1 of 5

OSPF Neighbor States Review

Lab Objectives

  • Review the OSPF neighbor-state machine and what each state (Down → Full) means.
  • Configure OSPF area 0 between R1, R2, R3 and R4 so neighbors form Full adjacency.
  • Use show commands to verify neighbor states and interpret what the outputs tell you about OSPF operation.

Lab Tasks (Try It Yourself First!)

Complete these tasks WITHOUT looking at the solution below. Use ? and show commands to figure it out.

Task 1: Configure OSPF Area 0 on all routers

Enable OSPF process 1 on R1, R2, R3 and R4. Use AS number 1. Hard-code router IDs as:

  • R1 -> 0.0.0.1
  • R2 -> 0.0.0.2
  • R3 -> 0.0.0.3
  • R4 -> 0.0.0.4

Advertise only the directly connected link subnets (the 10.10.x.0/24 networks shown in the topology) into OSPF area 0. On each router interface that connects directly to another router, set the OSPF network type to point-to-point (so adjacencies form immediately without DR/BDR election delays).

Task 2: Verify neighbor states on R1

Show the OSPF neighbors from R1 and identify the state for each neighbor (expect Full). Record the Neighbor ID, state, the neighbor IP, and the local interface.

Task 3: Explain each OSPF neighbor state

From Down → Full, explain what each state means in plain language. Relate the state transitions to packet exchange (Hello, DB exchange, LSR/LSP) in one or two sentences each.

Think About It: Why is it useful in production to set a point‑to‑point OSPF network type on links between routers rather than letting them use the default broadcast type?


Lab Solution

Topology (BASE LAB TOPOLOGY — use these exact IPs)

                [Internet]
               203.0.113.1
                    |
               R1 (Gateway)
              Gi0/0: 10.10.10.1
              Gi0/1: 10.10.20.1
              Gi0/2: 10.10.30.1
              /     |     \
           R2      R3      R4

Gi0/0: 10.10.10.2 | Gi0/0: 10.10.30.2 Gi0/1: 10.10.40.1 | / \ | S1 S2 S3 / \ | /
PC1 PC2 PC3 PC4 PC5

IP SCHEME:

  • 10.10.10.0/24 — R1-R2 link
  • 10.10.20.0/24 — R1-R3 link
  • 10.10.30.0/24 — R1-R4 link
  • 10.10.40.0/24 — R2-S1 link
  • 192.168.1.0/24 — VLAN 10 (Sales)
  • 192.168.2.0/24 — VLAN 20 (Engineering)
  • 192.168.3.0/24 — VLAN 30 (Management)
  • 203.0.113.0/24 — Public/Internet simulation

Task 1 Solution: Configure OSPF Area 0 on all routers

What we are doing:

  • Start OSPF process 1 on each router, set a stable router-id so neighbor listings are predictable, advertise the directly connected link subnets into area 0, and configure the router-facing point-to-point OSPF network type on each router-to-router interface. Using point-to-point avoids DR/BDR behavior and speeds adjacency formation on those links.

R1

router ospf 1
 router-id 0.0.0.1
 network 10.10.10.0 0.0.0.255 area 0
 network 10.10.20.0 0.0.0.255 area 0
 network 10.10.30.0 0.0.0.255 area 0
!
interface GigabitEthernet0/0
 ip ospf network point-to-point
!
interface GigabitEthernet0/1
 ip ospf network point-to-point
!
interface GigabitEthernet0/2
 ip ospf network point-to-point

What just happened:

  • router ospf 1 — creates OSPF process 1.
  • router-id 0.0.0.1 — picks a stable identifier for OSPF LSAs and neighbor listings (important when IP addresses change).
  • network ... area 0 — tells OSPF which interfaces (by IP) to enable OSPF on and places those interfaces into area 0.
  • ip ospf network point-to-point on each Gi interface — forces the OSPF network type to point-to-point, so neighbor adjacencies form directly without waiting through DR/BDR election timers. In production this is used on physical router-to-router links where there is exactly one neighbor on the segment.

Verify:

show ip ospf interface GigabitEthernet0/0

Expected output (example):

GigabitEthernet0/0 is up, line protocol is up
  Internet address 10.10.10.1/24, Area 0
  Process ID 1, Router ID 0.0.0.1, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

R2

router ospf 1
 router-id 0.0.0.2
 network 10.10.10.0 0.0.0.255 area 0
 network 10.10.40.0 0.0.0.255 area 0
!
interface GigabitEthernet0/0
 ip ospf network point-to-point

What just happened:

  • R2 will participate in OSPF area 0 for the R1-R2 link and the R2-S1 LAN. Setting the Gi0/0 network type to point-to-point ensures adjacency to R1 forms quickly.

Verify:

show ip ospf interface GigabitEthernet0/0

Expected output:

GigabitEthernet0/0 is up, line protocol is up
  Internet address 10.10.10.2/24, Area 0
  Process ID 1, Router ID 0.0.0.2, Network Type POINT_TO_POINT, Cost: 1

R3

router ospf 1
 router-id 0.0.0.3
 network 10.10.20.0 0.0.0.255 area 0
!
interface GigabitEthernet0/0
 ip ospf network point-to-point

What just happened:

  • R3 is configured to form OSPF adjacency with R1 over 10.10.20.0/24 and is set to point-to-point to shortcut DR/BDR logic.

Verify:

show ip ospf interface GigabitEthernet0/0

Expected output:

GigabitEthernet0/0 is up, line protocol is up
  Internet address 10.10.20.2/24, Area 0
  Process ID 1, Router ID 0.0.0.3, Network Type POINT_TO_POINT, Cost: 1

R4

router ospf 1
 router-id 0.0.0.4
 network 10.10.30.0 0.0.0.255 area 0
!
interface GigabitEthernet0/0
 ip ospf network point-to-point

What just happened:

  • R4 will form adjacency with R1 over 10.10.30.0/24.

Verify:

show ip ospf interface GigabitEthernet0/0

Expected output:

GigabitEthernet0/0 is up, line protocol is up
  Internet address 10.10.30.2/24, Area 0
  Process ID 1, Router ID 0.0.0.4, Network Type POINT_TO_POINT, Cost: 1

Task 2 Solution: Verify neighbor states on R1

What we are doing:

  • Check R1's OSPF neighbor table to ensure adjacencies with R2, R3, and R4 are in the FULL state (meaning the full link-state database has been exchanged and routes can be installed).

Verify:

show ip ospf neighbor

Expected output on R1 (complete listing):

Neighbor ID     Pri State           Dead Time   Address         Interface
0.0.0.2         1   FULL/ -         00:00:33    10.10.10.2      GigabitEthernet0/0
0.0.0.3         1   FULL/ -         00:00:34    10.10.20.2      GigabitEthernet0/1
0.0.0.4         1   FULL/ -         00:00:34    10.10.30.2      GigabitEthernet0/2

What this output means:

  • Neighbor ID — the router-id of the neighbor.
  • StateFULL indicates the neighbor relationship is fully established and LSDBs are synchronized.
  • Address — the IP address of the neighbor on the local interface's subnet.
  • Interface — local interface on R1 where the neighbor is seen.

Task 3 Solution: Explain OSPF neighbor states (Down → Full)

What we are doing:

  • Translate each state into both the technical packet-level meaning and a practical analogy.

States and explanation:

  • Down — No Hellos have been seen from the neighbor. Analogy: “No one has knocked at the door yet.” This is where an adjacency starts before any connectivity is observed.
  • Init — A Hello was received from the neighbor, but the neighbor’s Hello did not list this router as seen. Analogy: “You heard someone shout, but they didn’t acknowledge you by name.”
  • 2-Way — Two-way Hello exchange completed; each router sees the other in its neighbor list. On multi-access networks this is where routers agree on DR/BDR. Analogy: “Both routers waved at each other and agreed to speak further.”
  • ExStart — The routers select a master and slave and begin sequence-numbered Database Description (DBD) exchange. Analogy: “They decide who will lead the conversation.”
  • Exchange — Routers exchange DBD packets listing LSA headers (which LSAs each has). Analogy: “Each lists the chapters they have in their books.”
  • Loading — Routers request full LSAs that they are missing and begin transferring them (LSR/LSU). Analogy: “They ask for missing chapters and the other sends the full text.”
  • Full — LSDBs are synchronized for that adjacency and routing information is usable. Analogy: “Both have identical, complete books and can now route traffic.”

Verify (observe state):

show ip ospf neighbor

Expected output (example for R1):

Neighbor ID     Pri State           Dead Time   Address         Interface
0.0.0.2         1   FULL/ -         00:00:33    10.10.10.2      GigabitEthernet0/0
0.0.0.3         1   FULL/ -         00:00:34    10.10.20.2      GigabitEthernet0/1
0.0.0.4         1   FULL/ -         00:00:34    10.10.30.2      GigabitEthernet0/2


<div class="topology-diagram">
<img src="data:image/svg+xml;base64,PD9wbGFudHVtbCAxLjIwMjYuMT8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U3R5bGVUeXBlPSJ0ZXh0L2NzcyIgZGF0YS1kaWFncmFtLXR5cGU9Ik5XRElBRyIgaGVpZ2h0PSIyNThweCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSIgc3R5bGU9IndpZHRoOjM3MHB4O2hlaWdodDoyNThweDtiYWNrZ3JvdW5kOiNGRkZGRkY7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAzNzAgMjU4IiB3aWR0aD0iMzcwcHgiIHpvb21BbmRQYW49Im1h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Gw9IiNGMUYxRjEiIGhlaWdodD0iMzMuOTY4OCIgc3R5bGU9InN0cm9rZTojMTgxODE4O3N0cm9rZS13aWR0aDowLjU7IiB3aWR0aD0iNDcuMTE3MiIgeD0iMjI2LjkwNDMiIHk9IjE3NC42NDQ1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTIiIGxlbmd0aEFkanVzdD0ic3BhY2luZyIgdGV4dExlbmd0aD0iMjcuMTE3MiIgeD0iMjM2LjkwNDMiIHk9IjE5NS43ODMyIj5TVzE8L3RleHQ+PHJlY3QgZmlsbD0iI0YxRjFGMSIgaGVpZ2h0PSIzMy45Njg4IiBzdHlsZT0ic3Ryb2tlOiMxODE4MTg7c3Ryb2tlLXdpZHRoOjAuNTsiIHdpZHRoPSI0My4yNSIgeD0iMzA0LjAyMTUiIHk9IjE3NC42NDQ1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTIiIGxlbmd0aEFkanVzdD0ic3BhY2luZyIgdGV4dExlbmd0aD0iMjMuMjUiIHg9IjMxNC4wMjE1IiB5PSIxOTUuNzgzMiI+UEMxPC90ZXh0Pjw/cGxhbnR1bWwtc3JjIG9vakZvS25DTHdaY0tiMzhJb3FmcG9fQUxsMURwNGpDSnlyRHBJaTEyb2llOUFRYTVBS001b2xPQVlXUE1YaGY2UGZQdzFkZzZVV1JjSVkxZkhySlNaRnB1V0VTNVFBbkFaR3FLOGdyMVlnaUhSQjI5cDRmdFdfQW5oSjNHMHlDdUhPNDZROFEzUDR0WDFZaGUxMFNaYk5VMjJPVnU4blRGem5UakcwMD8+PC9nPjwvc3ZnPg==" alt="Network Topology Diagram" style="max-width:100%;height:auto;background:#fff;padding:16px;border:1px solid #e5e7eb;border-radius:8px;" />
</div>

cisco
show running-config | section router ospf

Expected problematic output (example):

router ospf 1
 router-id 0.0.0.3
 network 10.10.30.0 0.0.0.255 area 0

(Here R3 has the wrong network advertised.)

  1. Fix by adding the correct network:
router ospf 1
 network 10.10.20.0 0.0.0.255 area 0

What this does and why it matters:

  • The network command tells R3 which interfaces should run OSPF and in which area. Without the 10.10.20.0 network under OSPF, R3 will not place its Gi0/0 into area 0 and will not form an adjacency with R1 even though IP connectivity exists.

Verify:

show ip ospf neighbor

Expected output on R1 after fix:

Neighbor ID     Pri State           Dead Time   Address         Interface
0.0.0.2         1   FULL/ -         00:00:33    10.10.10.2      GigabitEthernet0/0
0.0.0.3         1   FULL/ -         00:00:34    10.10.20.2      GigabitEthernet0/1
0.0.0.4         1   FULL/ -         00:00:34    10.10.30.2      GigabitEthernet0/2

Verification Checklist

  • OSPF process 1 configured on R1–R4 with router-ids 0.0.0.1–0.0.0.4.
  • R1 shows three neighbors (0.0.0.2, 0.0.0.3, 0.0.0.4) in FULL state.
  • Each router interface connecting to another router is set to OSPF network type point-to-point.

Common Mistakes

SymptomCauseFix
No adjacency to R3R3 missing network statement for 10.10.20.0 under router ospfAdd network 10.10.20.0 0.0.0.255 area 0 to R3 OSPF config
Neighbor stuck in INITHello received but this router not listed in neighbor's Hello (mismatched hello/dead or no bidirectional reachability)Verify IP reachability, check interface OSPF network type, ensure both sides run OSPF in same area
Adjacency forms slowlyInterfaces left as broadcast; DR/BDR election occurs and timers may delay adjacencyUse ip ospf network point-to-point on point-to-point links to avoid DR/BDR waits

Challenge Task

Make the R2–R1 link use the default broadcast network type (remove point-to-point) and then simulate a third router on that segment (create a loopback or secondary device with an IP on 10.10.10.0/24). Observe and explain how DR/BDR elections change neighbor states and what you must do on each router to ensure adjacencies reach FULL.

Warning: This challenge teaches why OSPF network types and DR/BDR matter on multi-access networks — important for CCNA-level troubleshooting in real networks.