OSPF utilizes hello packets sent out on each OSPF-enabled interface every 10 seconds by default for neighbor discovery. OSPF determines whether a neighbor is still communicating if a router does not receive a hello packet within 40 seconds.
When a neighbor is discovered, the two routers compare information in the hello packet to determine whether the routers have compatible configurations. The neighbor attempts to establish adjacency by synchronizing their link-state databases to ensure that they have identical OSPF routing information. When all OSPF routers have identical link-state databases, the network is converged and routers start using Dijkstra Shortest Path First (SPF) algorithm to build its route table.
OSPF Link-State Advertisements
When an OSPF router receives an LSA to build its routing table, it forwards that LSA out every OSPF-enabled interface, flooding the OSPF area with this information. The LSAs are flooded based on the link-state refresh time (every 30 minutes by default). Each router maintains a link-state database for the OSPF network.
OSPFv2 LSAs have seven different types (LSA type 1 to 7) and extensions (LSA 9 to 11) called Opaque. Opaque LSAs consist of a standard LSA header followed by application-specific information. OSPFv2 uses Opaque LSAs to support the OSPFv2 graceful restart capability.
|Type||OSPFv2 Name||Description||OSPFv3 Name||Description|
|3||Network Summary LSA||
||Inter-Area Prefix LSA||
|4||ASBR Summary LSA||
||Inter-Area Router LSA||
|5||AS External LSA||
||AS External LSA||
|7||NSSA External LSA||
||NSSA External LSA||
|9||Opaque LSAs||LSA used to extend OSPF||Intra-Area Prefix LSA||
|10||Opaque LSAs||LSA used to extend OSPF||N/A|
|11||Opaque LSAs||LSA used to extend OSPF||Grace LSAs||
- LSA group pacing feature controls the flooding rate of LSA updates in your network
An area is a logical division of routers and links within an OSPF domain that create separate subdomains. LSA flooding is contained within an area and the link-state database is limited to links within the area. You can assign to interfaces an area ID, which is a 32-bit value that can be a number or in dotted-decimal notation.
If you define more than one area, you must also define the backbone area, which has the reserved area ID of 0.0.0.0. Also, one or more routers become area border routers (ABRs), which connects to both the backbone area and at least one other defined area.
The ABR sends type-3 LSA from one connected area to the backbone area. The backbone area sends summarized information about area to another area.
Autonomous system boundary router connects an OSPF area to another autonomous system. An autonomous system is a network controlled by a single technical administration entity.
You can limit the amount of external routing information that floods an area by making it a stub area. A stub area is an area that does not allow type-5 LSAs and have the following requirements:
- All routers in the stub area are stub routers
- No ASBR routers exists in the stub area
- You cannot configure virtual links in the stub area
All OSPF areas must physically connect to area 0. Virtual links allow you to connect OSPF area ABR to a backbone area ABR when a direct physical connection is not available.
OSPF routers with the broadcast network will flood the network with LSAs, so OSPF selects a single router, the designated router (DR), to control the LSA floods and represent the network to the rest of the OSPF area. If the DR fails, OSPF selects a backup designated router (BDR).
|Hello interval||10 seconds|
|Dead interval||40 seconds|
|Graceful restart grace period||60 seconds|
|Stub router advertisement announce time||600 seconds|
|Reference bandwidth for link cost calculation||40 Gbps|
|LSA minimal arrival time||1 second|
|LSA group pacing||240 seconds|
|SPF calculation initial delay time||0.2 second|
|SPF calculation maximum wait time||0.5 second|
|SPF minimum hold time||1 second|
|feature ospf||Enables the OSPFv2 feature|
|feature ospfv3||Enables the OSPFv3 feature|
|router ospf ospf-instance-tag||Creates a new OSPFv2 routing instance|
|router ospfv3 ospf-inspection-tag||Creates a new OSPFv3 routing instance|
|router-id ip-address||(Optional) Configures a unique OSPFv2 or OSPFv3 router ID. ip-address must exist on a configured interface in the system.|
|area area-id authentication||Configures the authentication mode for an area|
|area area-id stub||Creates this area as a stub area|
|area area-id nssa||Creates this area as an NSSA|
|address-family iv6 unicast||Enters IPv6 unicast address family mode|
|ip ospf cost number||(Optional) Configures the OSPFv2 cost metric for this interface|
|ip ospf dead-interval seconds||(Optional) Configures the OSPFv2 dead interval in seconds|
|ip ospf hello-interval seconds||(Optional) Configures the OSPFv2 hello interval in seconds|
|ip ospf mtu-ignore||(Optional) Configures OSPFv2 to ignore any IP maximum transmission unit mismatch with a neighbor|
|ospf network||(Optional) Sets the OSPFv2 network type|
|ip ospf passive-interface||(Optional) Suppresses routing updates on the interface|
|ip ospf priority number||(Optional) Configures the OSPFv2 priority used to determine the DR for an area|
|ip ospf shutdown||(Optional) Shuts down the OSPFv2 instance on this interface|
|ip ospf message-digest-key key-id md5 key||Configures message digest authentication for this interface|
|Global-level Verification and Process Clear command||Purpose|
|show ip ospf||Displays the OSPFv2 configuration|
|show ip ospf interface||Displays the OSPFv2 interface configuration|
|show ip ospf route||Displays the internal OSPFv2 routes|
|show ip ospf virtual-links||Displays the information about OSPFv2 virtual links|
|show running-configuration ospf||Displays the current running OSPFv2 configuration|
|show ip ospf statistics||Displays the OSPFv2 event counters|
|show ip ospf traffic||Displays the OSPFv2 packet counters|
|clear ip ospf neighbor||Clears neighbors statistics and resets adjacencies for OSPFv2|
|show ospfv3||Displays the OSPFv3 configuration|
|show ospfv3 interface||Displays the OSPFv3 interface configuration|
|clear ospfv3 neighbor||Clears neighbor statistics and resets adjacencies for OSPFv3|