Please enable JavaScript.
Coggle requires JavaScript to display documents.
Single-area OSPFv2 configuration - Coggle Diagram
Single-area OSPFv2 configuration
2.3 Multiaccess OSPF Networks
2.3.1 OSPF Network Types
Multi-access OSPF networks are unique in that a router controls the distribution of LSAs.
2.3.2 OSPF Designated Router
A BDR is also elected in case the DR fails. The BDR listens passively and maintains a relationship with all routers.
2.3.3 OSPF Multiaccess Reference Topology
2.3.5 Verify DR/BDR Adjacencies
FULL/DROTHER:
This is a DR or BDR router that is fully adjacent to a non-DR or BDR router. These two neighbors can exchange Hello, Update, Queries, Replies, and Acknowledgments packets.
FULL/DR:
The router is fully adjacent to the indicated DR neighbor. These two neighbors can exchange Hello packets, updates, queries, replies, and acknowledgments.
FULL/BDR:
The router is fully adjacent to the indicated BDR neighbor. These two neighbors can exchange Hello packets, updates, queries, replies, and acknowledgments.
2-WAY/DROTHER:
The non-DR or BDR router has a neighbor relationship with another non-DR or BDR router. These two neighbors exchange Hello packets.
2.3.4 Verify OSPF Router Roles
R1 DROTHER
R2 DBR
R3DR
2.3.6 Default DR/BDR Election Process
2.3.7 DR Failure and Recovery
R3 Fails
R3 Re-Joins Network
R4 Joins Network
R2 Fails
2.3.8 The ip ospf priority Command
If the interface priorities are equal on all routers, the router with the highest router ID is elected the DR. It is possible to configure the router ID to manipulate the DR/BDR election.
2.3.9 Configure OSPF Priority
In the topology, the ip ospf priority command will be used to change the DR and BDR as follows:
R1 should be the DR and will be configured with a priority of 255.
R2 should be the BDR and will be left with the default priority of 1.
R3 should never be a DR or BDR and will be configured with a priority of 0.
2.1 OSPF Router ID
2.1.1 OSPF Reference Topology
2.1.2 Router Configuration Mode for OSPF
2.1.3 Router IDs
Participate in the synchronization of OSPF databases
Participate in the election of the designated router (DR)
2.1.4 Router ID Order of Precedence
2.1.5 Configure a Loopback Interface as the Router ID
2.1.6 Explicitly Configure a Router ID
2.1.7 Modify a Router ID
2.5 Default Route Propagation
2.5.1 Default Static Route Propagation in OSPFv2
R2, as the edge router (ASBR), connects to the Internet and propagates a default static route (ip route 0.0.0.0 0.0.0.0 ...) using default-information originate. A loopback simulates the ISP, and the route is shared with other OSPF routers.
2.5.2 Verifying the Propagated Default Route
You can verify the default route configuration on R2 with the show ip route command. You can also check that R1 and R3 have received a default route.
2.4 Modify Single-Area OSPFv2
2.4.1 Cisco OSPF Cost Metric
OSPF uses cost as a metric to select the best route. Cisco calculates cost inversely to interface bandwidth: Cost = reference bandwidth / interface bandwidth. Default reference bandwidth is 100,000,000 bps. Adjust cost using auto-cost reference-bandwidth or manually with ip ospf cost.
2.4.2 Adjusting Reference Bandwidth
OSPF cost is rounded to an integer, so high-speed interfaces may get the same cost as Fast Ethernet. Use auto-cost reference-bandwidth on all OSPF routers to support faster links (e.g., 1000 for Gigabit, 10000 for 10 Gigabit). This changes cost calculation, not actual bandwidth, and ensures accurate routing metrics across the domain.
2.4.3 OSPF Cumulative Costs
An OSPF route cost is the sum of link costs from the router to the destination network. With adjusted reference bandwidth, link costs may be 10 and loopbacks 1, so R1 reaching a network via R2 has a total cost of 11.
2.4.4 Manually Setting OSPF Cost
OSPF costs can be adjusted to influence route selection. Use ip ospf cost value on interfaces to prefer certain paths or set backup links. This ensures traffic follows the desired route and aligns costs across different OSPF networks.
2.4.5 Backup Route Failover Test
What happens if the link between R1 and R2 goes down? This can be simulated by shutting down Gigabit Ethernet 0/0/0 and verifying that the routing table updates to use R3 as the next-hop. R1 can now reach the 10.1.1.4/30 network through R3 with a cost of 50.
2.4.7 Hello Packet Intervals
OSPFv2 Hello packets are sent to multicast 224.0.0.5 every 10 seconds by default on multi-access and point-to-point networks. The Dead interval is four times the Hello interval (40 seconds) and determines when a neighbor is declared inactive. Passive interfaces do not send Hello packets.
2.4.8 Verifying Hello and Dead Intervals
OSPF Hello and Dead intervals are set per interface and must match to form neighbor adjacencies. Use show ip ospf interface to verify current settings; defaults are 10 seconds Hello and 40 seconds Dead on Gigabit Ethernet 0/0/0.
2.4.9 Modifying OSPFv2 Intervals
OSPF Hello and Dead intervals can be manually adjusted per interface using ip ospf hello-interval and ip ospf dead-interval. Shorter intervals allow faster failure detection but increase traffic. Intervals must match between neighbors to maintain adjacency. Use show ip ospf neighbor and show ip ospf interface to verify changes.
2.2 Point-to-Point OSPF Networks
2.2.1 Network Command Syntax
The network command specifies which interfaces participate in OSPFv2 for a given area. The syntax network-address wildcard-mask enables OSPF on matching interfaces. The area area-id identifies the OSPF area. For single-area OSPFv2, area 0 is recommended to simplify future multi-area expansion.
2.2.2 Wildcard Mask
A wildcard mask is the inverse of a subnet mask. In a wildcard mask, 0 matches the corresponding bit and 1 ignores it. It is calculated by subtracting the subnet mask from 255.255.255.255.
2.2.4 Configuring OSPF with the Network Command
In routing configuration mode, interfaces can be enabled for OSPFv2 using the network command. Some IOS versions allow using the subnet mask instead of a wildcard mask, which IOS converts automatically. Specifying an exact interface IP with 0.0.0.0 wildcard enables that interface for OSPFv2 and advertises its network.
2.2.6 Configuring OSPF with the IP OSPF Command
OSPF can be configured directly on an interface using the ip ospf command. To switch from network-based configuration, remove the network commands with no network and apply ip ospf on each interface.
2.2.8 Passive Interface
By default, OSPF messages are sent on all enabled interfaces. Passive interfaces prevent unnecessary OSPF traffic on interfaces without neighbors, reducing bandwidth use, resource consumption, and security risks from intercepted or altered routing updates.
2.2.9 Passive Interface Configuration
Use the passive-interface command in router configuration mode to stop OSPF messages on an interface while still advertising the network. show ip protocols confirms the interface is passive but still included in OSPFv2 updates to other routers
2.2.11 OSPF Point-to-Point Networks
By default, Cisco routers elect DR and BDR on Ethernet interfaces, even with only two routers. Use ip ospf network point-to-point on interfaces to disable DR/BDR election and set the network type to point-to-point, which briefly affects OSPF neighbor adjacency.
2.2.12 Loopbacks and Point-to-Point Networks
Loopbacks provide extra interfaces and are advertised by default as /32 host routes. Configuring a loopback as point-to-point allows OSPF to advertise the full network, giving neighbors a more accurate representation of the LAN.
2.6 Verify Single-Area OSPFv2
2.6.1 OSPF Neighbor Verification
OSPFv2 configs are verified with commands like show ip interface brief, show ip route, and show ip ospf neighbor. The neighbor command checks adjacencies; if the state is not FULL, LSDBs may be incomplete and routing inaccurate. Common issues include mismatched subnet masks, timers, network types, or wrong OSPF network commands.
2.6.2 OSPF Protocol Configuration Verification
The show ip protocols command quickly checks OSPF configuration, including process ID, router ID, interfaces used to advertise OSPF routes, neighbors sending updates, and the default administrative distance of 110.
2.6.3 Verification of OSPF Process Information
The show ip ospf command can also be used to examine the OSPFv2 process ID and router ID. This command shows OSPFv2 area information and the last time the SPF algorithm ran.
2.6.4 OSPF Interface Configuration Verification
The show ip ospf interface command shows detailed OSPFv2 info for each interface, including process ID, router ID, network type, OSPF cost, DR/BDR info, and adjacent neighbors. For a quick overview, show ip ospf interface brief displays which interfaces participate in OSPF, advertised networks, link costs, interface status, and number of neighbors.