Lesson 39: Configuring Single-Area OSPFv2 (IPv4)
We focus on OSPFv2 for IPv4, which is configured using a process ID and network commands.
OSPF Configuration Steps
- Enter Router Configuration Mode: Define the OSPF process ID (local significance only).
- Define Networks: Use the
networkcommand along with a wildcard mask to specify which interfaces should participate in OSPF and which area they belong to.
Wildcard Mask: The inverse of the subnet mask. If the subnet mask is 255.255.255.0, the wildcard is 0.0.0.255.
ios Router(config)# router ospf 1
! The network command enables OSPF on the interface that matches the IP and mask Router(config-router)# network 192.168.1.0 0.0.0.255 area 0 Router(config-router)# network 10.1.1.0 0.0.0.255 area 0
! Optional: Set Router ID (Best practice) Router(config-router)# router-id 1.1.1.1
Verifying OSPF
show ip ospf neighbor: Confirms neighbor adjacency (must be FULL state).show ip protocols: Displays OSPF process ID, Router ID, and areas.show ip route ospf: Shows routes learned specifically via OSPF (Code O).