3.2.b Configure simple OSPFv2/v3 environments, including multiple normal areas, summarization, and filtering (neighbor adjacency, point-to-point, and broadcast network types, and passive-interface)
Aligned to Cisco's 350-401 ENCOR v1.2 exam topics.
On this page
Open Shortest Path First (OSPF) is the link-state protocol the exam uses to test areas, summarization, and filtering. This article builds OSPFv2 and OSPFv3 networks, then proves them with show output.
What this objective tests
The objective says "configure". The exam wants a working multi-area OSPFv2 network and a working OSPFv3 network. You must also prove both with show output.
Open Shortest Path First (OSPF) works in four steps:
- Routers become neighbors on a link.
- Neighbors exchange link-state information.
- Each router builds a link-state database.
- Each router runs Shortest Path First (SPF) and installs the best routes.
Troubleshooting means finding which step failed.
OSPFv2 multi-area configuration
Topology:
LAN A 10.1.1.0/24 --+
|
LAN B 10.1.2.0/24 --+-- R1 -- area 1 -- R2 -- area 0 -- R3 -- Lo0 3.3.3.3/32
ABR = R2
R1-R2 link: 10.0.12.0/30
R2-R3 link: 10.0.23.0/30R1:
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0
description To R2
ip address 10.0.12.1 255.255.255.252
ip ospf network point-to-point
!
interface GigabitEthernet0/1
description LAN A
ip address 10.1.1.1 255.255.255.0
!
interface GigabitEthernet0/2
description LAN B
ip address 10.1.2.1 255.255.255.0
!
router ospf 10
router-id 1.1.1.1
passive-interface default
no passive-interface GigabitEthernet0/0
network 10.0.12.0 0.0.0.3 area 1
network 10.1.1.0 0.0.0.255 area 1
network 10.1.2.0 0.0.0.255 area 1
network 1.1.1.1 0.0.0.0 area 1R2 (Area Border Router, summarizes area 1):
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface GigabitEthernet0/0
description To R1
ip address 10.0.12.2 255.255.255.252
ip ospf network point-to-point
!
interface GigabitEthernet0/1
description To R3
ip address 10.0.23.1 255.255.255.252
ip ospf network point-to-point
!
router ospf 10
router-id 2.2.2.2
passive-interface default
no passive-interface GigabitEthernet0/0
no passive-interface GigabitEthernet0/1
network 10.0.12.0 0.0.0.3 area 1
network 10.0.23.0 0.0.0.3 area 0
network 2.2.2.2 0.0.0.0 area 0
area 1 range 10.1.0.0 255.255.0.0R3:
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface GigabitEthernet0/0
description To R2
ip address 10.0.23.2 255.255.255.252
ip ospf network point-to-point
!
router ospf 10
router-id 3.3.3.3
passive-interface default
no passive-interface GigabitEthernet0/0
network 10.0.23.0 0.0.0.3 area 0
network 3.3.3.3 0.0.0.0 area 0The config uses three exam features:
ip ospf network point-to-pointskips the DR/BDR election on a two-router link.passive-interface defaultkeeps hellos off LAN ports. The LAN subnets still get advertised.area 1 rangeon the ABR advertises one summary for all area 1 networks.
Expected verification output
Neighbors on R2. Point-to-point links show state FULL/ - because there is no DR:
R2# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 0 FULL/ - 00:00:37 10.0.12.1 GigabitEthernet0/0
3.3.3.3 0 FULL/ - 00:00:31 10.0.23.2 GigabitEthernet0/1Routes on R3. The summary appears as one O IA route instead of two /24 routes:
R3# show ip route ospf
...
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/3] via 10.0.23.1, 00:21:14, GigabitEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 10.0.23.1, 00:21:14, GigabitEthernet0/0
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O IA 10.0.12.0/30 [110/2] via 10.0.23.1, 00:21:14, GigabitEthernet0/0
O IA 10.1.0.0/16 [110/3] via 10.0.23.1, 00:21:14, GigabitEthernet0/0Read this output:
Omeans intra-area.O IAmeans inter-area.10.1.0.0/16is the summary fromarea 1 range. R3 never sees 10.1.1.0/24 or 10.1.2.0/24.
Neighbor states and adjacency faults
| State | Meaning | Usual cause if stuck |
|---|---|---|
DOWN | No hellos received | Interface down, passive interface, ACL blocks protocol 89 |
INIT | Hello received, but the router is not in it | One-way hello, ACL, wrong timers |
2-WAY | Bidirectional hellos | Normal between DROTHER routers on broadcast links |
EXSTART/EXCHANGE | Database exchange starts | MTU mismatch, duplicate router ID |
LOADING | Requesting missing LSAs | Usually transient |
FULL | Databases synchronized | Correct on point-to-point links |
Note: 2-WAY/DROTHER on a broadcast segment is normal. Do not troubleshoot a state that is correct.
OSPFv3 with address families
OSPFv3 uses the router ospfv3 process. Each address family sits inside the process. Interfaces join an area per address family.
R1:
ipv6 unicast-routing
!
interface Loopback0
ipv6 address 2001:db8:1::1/128
!
interface GigabitEthernet0/0
description To R2
ipv6 address 2001:db8:12::1/64
ospfv3 10 ipv6 area 0
ospfv3 network point-to-point
!
router ospfv3 10
router-id 1.1.1.1
!
address-family ipv6 unicast
passive-interface default
no passive-interface GigabitEthernet0/0
exit-address-familyR2:
ipv6 unicast-routing
!
interface GigabitEthernet0/0
description To R1
ipv6 address 2001:db8:12::2/64
ospfv3 10 ipv6 area 0
ospfv3 network point-to-point
!
router ospfv3 10
router-id 2.2.2.2
!
address-family ipv6 unicast
exit-address-familyNote: OSPFv3 still needs a 32-bit router ID. Set it manually with router-id under the process.
Verify:
R1# show ipv6 ospf neighbor
OSPFv3 Router with ID (1.1.1.1) (Process ID 10)
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 0 FULL/ - 00:00:35 4 GigabitEthernet0/0OSPFv3 neighbors use link-local addresses. The output shows an interface ID instead of a neighbor address. The state must still be FULL.
Lab: build multi-area OSPFv2 and add OSPFv3
Topology: the R1-R2-R3 diagram from the OSPFv2 example above.
Do these steps:
- Cable and address the links per the example. Give each router its loopback.
- Configure OSPFv2 on R1, R2, and R3 with the configs above.
- Verify neighbors on R2 with
show ip ospf neighbor. Both neighbors must beFULL/ -. - Check routes on R3 with
show ip route ospf. ConfirmO IA 10.1.0.0/16exists and the /24 LAN routes do not. - Check passive interfaces with
show ip ospf interface briefon R1. Confirm Gi0/1 and Gi0/2 are passive. - Remove
area 1 rangeon R2. Watch R3 learn the two /24 routes. Restore the summary. - Add the OSPFv3 address-family config on R1 and R2. Enable IPv6 routing first.
- Verify with
show ipv6 ospf neighborandshow ipv6 route ospf. The neighbor must beFULL. - Break the adjacency: set
ospfv3 10 ipv6 area 1on one side. Observe the neighbor fail. Fix the area.
Exam traps
- A passive interface advertises the network but forms no neighbors.
Ois intra-area.O IAis inter-area. The exam tests this difference.- Summarization with
area rangehappens on the ABR, not on internal routers. - Stuck in
EXSTARTorEXCHANGEusually means an MTU mismatch. - OSPFv3 needs
ipv6 unicast-routingand a manual router ID. - OSPFv3 neighbors use link-local addresses. Do not look for the global address in the neighbor table.
Pass check
You are ready when you can do these things:
- Build a two-area OSPFv2 network with summarization, passive interfaces, and point-to-point links.
- Prove the summary works by reading
show ip route ospfon a router in another area. - Configure OSPFv3 with address families and prove the adjacency.
- Name the usual cause for each stuck neighbor state.
Related objectives
- 3.2.a Compare routing concepts of EIGRP and OSPF (advanced distance vector vs. link state, load balancing, path selection, path operations, metrics, and area types)
- 3.2.c Configure and verify eBGP between directly connected neighbors (best path selection algorithm and neighbor relationships)
- 3.2.d Describe policy-based routing