OSPFv3
OSPFv3 is a link-state routing protocol defined by the IETF, designed for IPv6 networks. Each OSPFv3 router periodically sends "hello" packets on its OSPF-enabled interfaces to discover other OSPFv3 routers. When a neighbor is detected, the routers compare information in the hello packets to verify configuration compatibility. If they are compatible, the routers form an adjacency, which means they synchronize their link-state databases to ensure identical OSPFv3 routing information. For more information, see Overview.
Adjacent routers share link-state advertisements (LSAs) that include information about the operational state of each link, the cost of the link, and any other neighbor information. The routers then flood these received LSAs out every OSPF-enabled interface so that all OSPFv3 routers eventually have identical link-state databases. When all OSPFv3 routers have identical link-state databases, the network is converged. Each router then uses Dijkstra’s Shortest Path First (SPF) algorithm to build its route table. To know more about convergence, see Convergence.
You can divide OSPFv3 networks into areas. Routers send most LSAs only within one area, which reduces the CPU and memory requirements for an OSPF-enabled router.
OSPFv3 supports IPv6. For information about OSPF for IPv4, see OSPFv2.
Comparison of OSPFv3 and OSPFv2
Much of the OSPFv3 protocol is the same as in OSPFv2. OSPFv3 is described in RFC 2740.
These are the key differences between the OSPFv3 and OSPFv2 protocols:
-
OSPFv3 expands on OSPFv2 to provide support for IPv6 routing prefixes and the larger size of IPv6 addresses.
-
LSAs in OSPFv3 are expressed as prefix and prefix length instead of address and mask.
-
The router ID and area ID are 32-bit numbers with no relationship to IPv6 addresses.
-
OSPFv3 uses link-local IPv6 addresses for neighbor discovery and other features.
-
OSPFv3 can use the IPv6 authentication trailer (RFC 6506) or IPSec (RFC 4552) for authentication. However, Cisco NX-OS does not support RFC 6506.
-
OSPFv3 redefines LSA types.
Hello packets
OSPFv3 routers periodically send Hello packets on every OSPF-enabled interface. The hello interval determines how frequently the router sends these Hello packets and is configured per interface. OSPFv3 uses Hello packets for these tasks:
-
Neighbor discovery
-
Keepalives
-
Bidirectional communications
-
Designated router election. For more information, see Designated Routers.
The Hello packet contains information about the originating OSPFv3 interface and router, including the assigned OSPFv3 cost of the link, the hello interval, and optional capabilities of the originating router. An OSPFv3 interface that receives these Hello packets determines if the settings are compatible with the receiving interface settings. Compatible interfaces are considered neighbors and are added to the neighbor table. See Neighbors for more information.
Hello packets also include a list of router IDs for the routers that the originating interface has communicated with. If the receiving interface sees its own router ID in this list, then bidirectional communication has been established between the two interfaces.
OSPFv3 uses Hello packets as a keepalive message to determine if a neighbor is still communicating. If a router does not receive a Hello packet by the configured dead interval (usually a multiple of the hello interval), then the neighbor is removed from the local neighbor table.
Neighbors
When an OSPFv3 interface has compatible configuration with a remote interface, both the interfaces are considered neighbors. The two OSPFv3 interfaces must match these criteria:
-
Hello interval
-
Dead interval
-
Area ID. See the Areas.
-
Optional capabilities
If there is a match, these information is entered into the neighbor table:
-
Neighbor ID: The router ID of the neighbor router.
-
Priority: Priority of the neighbor router. The priority is used for designated router election. See the Designated Routers.
-
State: Indication of whether the neighbor has just been heard from, is in the process of setting up bidirectional communications, is sharing the link-state information, or has achieved full adjacency.
-
Dead time: Indication of how long since the last Hello packet was received from this neighbor.
-
Link-local IPv6 Address: The link-local IPv6 address of the neighbor.
-
Designated Router: Indication of whether the neighbor has been declared the designated router or backup designated router. See the Designated Routers.
-
Local interface: The local interface that received the Hello packet for this neighbor.
When the first Hello packet is received from a new neighbor, the neighbor is entered into the neighbor table in the initialization state. Once bidirectional communication is established, the neighbor state becomes two-way. ExStart and exchange states come next, as the two interfaces exchange their link-state database. Once this is all complete, the neighbor moves into the full state, which signifies full adjacency. If the neighbor fails to send any Hello packets in the dead interval, then the neighbor is moved to the down state and is no longer considered adjacent.
Adjacency
Not all OSPFv3 neighbors form full adjacencies. The establishment of adjacency depends on the network type and the presence of a Designated Router (DR). In some cases, only selected neighbors become fully adjacent and exchange Link-State Advertisements (LSAs), while others do not. For more information, see the Designated Routers.
Adjacency is established using Database Description (DD) packets, Link State Request (LSR) packets, and Link State Update (LSU) packets in OSPFv3.
The DD packet includes the link-state advertisement (LSA) headers from the link-state database of the neighbor. See the Link-State Database for more information.
The local router compares these headers with its own link-state database and determines which LSAs are new or updated. The local router sends an LSR packet for each LSA that it needs new or updated information on. The neighbor responds with an LSU packet. This exchange continues until both routers have the same link-state information.
Designated routers
In OSPFv3 networks with multiple routers, managing link-state advertisements (LSAs) efficiently is essential. Without coordination, each router could flood the network with identical LSAs, leading to unnecessary traffic. To address this, OSPFv3 may designate a single router, called the Designated Router (DR), to coordinate LSA flooding and represent the network to the wider OSPFv3 area. A Backup Designated Router (BDR) is also elected to take over if the DR becomes unavailable. See the Areas for more information on OSPFv3 area.
Network types are as follows:
-
Point-to-point:A network that exists only between two routers. All neighbors on a point-to-point network establish adjacency and there is no DR.
-
Broadcast: A network with multiple routers that can communicate over a shared medium that allows broadcast traffic, such as Ethernet. OSPFv3 routers establish a DR and BDR that controls LSA flooding on the network. OSPFv3 uses the well-known IPv6 multicast addresses, FF02::5, and a MAC address of 0100.5300.0005 to communicate with neighbors.
The DR and BDR are selected based on the information in the Hello packet. When an interface sends a Hello packet, it sets the priority field and the DR and BDR field if it knows who the DR and BDR are. The routers follow an election procedure based on which routers declare themselves in the DR and BDR fields and the priority field in the Hello packet. As a final determinant, OSPFv3 chooses the highest router IDs as the DR and BDR.
All other routers establish adjacency with the DR and the BDR and use the IPv6 multicast address FF02::6 to send LSA updates to the DR and BDR. Figure DR in Multi-Access Network shows this adjacency relationship between all routers and the DR.
DRs are based on a router interface. A router might be the DR for one network and not for another network on a different interface.

Areas
An area is a logical division of routers and links within an OSPFv3 domain that creates separate subdomains. LSA flooding is contained within an area, and the link-state database is limited to links within the area. You can assign an area ID to the interfaces within the defined area. The Area ID is a 32-bit value that can be expressed as a number or in dotted decimal notation, such as 10.2.3.1. By dividing an OSPFv3 network into areas, you can limit the CPU and memory requirements that OSPFv3 puts on the routers.
Cisco NX-OS always displays the area in dotted decimal notation.
If you define more than one area in an OSPFv3 network, you must also define the backbone area, which has the reserved area ID of 0. If you have more than one area, then one or more routers become area border routers (ABRs). An ABR connects to both the backbone area and at least one other defined area.
The ABR has a separate link-state database for each area which it connects to. The ABR sends Inter-Area Prefix (type 3) LSAs from one connected area to the backbone area. See Route Summarization for more details.
The backbone area sends summarized information about one area to another area. In the figure OSPFv3 Areas, Area 0 sends summarized information about Area 5 to Area 3.
OSPFv3 defines one other router type that is the autonomous system boundary router (ASBR). This router connects an OSPFv3 area to another autonomous system. An autonomous system is a network controlled by a single technical administration entity. OSPFv3 can redistribute its routing information into another autonomous system or receive redistributed routes from another autonomous system. For more information, see Advanced Features.
Link-State advertisements
OSPFv3 uses link-state advertisements (LSAs) to build its routing table.
Link-State advertisement types
OSPFv3 uses link-state advertisements (LSAs) to build its routing table.
The table shows the LSA types that are supported by Cisco NX-OS.
|
Type |
Names |
Description |
|---|---|---|
|
1 |
Router LSA |
LSA sent by every router. This LSA includes the state and cost of all links but does not include prefix information. Router LSAs trigger an SPF recalculation. Router LSAs are flooded to the local OSPFv3 area. |
|
2 |
Network LSA |
LSA sent by the DR. This LSA lists all routers in the multi-access network but does not include prefix information. Network LSAs trigger an SPF recalculation. See the Designated Routers section. |
|
3 |
Inter-Area Prefix LSA |
LSA sent by the area border router to an external area for each destination in local area. This LSA includes the link cost from the border router to the local destination. See the Areas section. |
|
4 |
Inter-Area Router LSA |
LSA sent by the area border router to an external area. This LSA advertises the link cost to the ASBR only. See the Areas section. |
|
5 |
AS External LSA |
LSA generated by the ASBR. This LSA includes the link cost to an external autonomous system destination. AS External LSAs are flooded throughout the autonomous system. See the Areas section. |
|
7 |
Type-7 LSA |
LSA generated by the ASBR within an NSSA. This LSA includes the link cost to an external autonomous system destination. Type-7 LSAs are flooded only within the local NSSA. See the Areas section. |
|
8 |
Link LSA |
LSA sent by every router, using a link-local flooding scope. (see the Flooding and LSA Group Pacing section). This LSA includes the link-local address and IPv6 prefixes for this link. |
|
9 |
Intra-Area Prefix LSA |
LSA sent by every router. This LSA includes any prefix or link state changes. Intra-Area Prefix LSAs are flooded to the local OSPFv3 area. This LSA does not trigger an SPF recalculation. |
|
11 |
Grace LSA |
LSA sent by a restarting router, using a link-local flooding scope. This LSA is used for a graceful restart of OSPFv3. See the High Availability and Graceful Restart section. |
Link cost
Each OSPFv3 interface is assigned a link cost. The cost is an arbitrary number. By default, Cisco NX-OS assigns a cost that is the configured reference bandwidth divided by the interface bandwidth. By default, the reference bandwidth is 40 Gbps. The link cost is carried in the LSA updates for each link.
Flooding and LSA group pacing
OSPFv3 floods LSA updates to different sections of the network, depending on the LSA type. OSPFv3 uses these flooding scopes:
-
Link-local: LSA is flooded only on the local link. Used for Link LSAs and Grace LSAs.
-
Area-local: LSA is flooded throughout a single OSPF area only. Used for Router LSAs, Network LSAs, Inter-Area-Prefix LSAs, Inter-Area-Router LSAs, and Intra-Area-Prefix LSAs.
-
AS scope: LSA is flooded throughout the routing domain. An AS scope is used for AS External LSAs.
LSA flooding guarantees that all routers in the network have identical routing information. LSA flooding depends on the OSPFv3 area configuration. See Areas to know more about area.
The LSAs are flooded based on the link-state refresh time. Each LSA has its own link-state refresh time. The default refresh time is 30 minutes.
You can control the flooding rate of LSA updates in your network by using the LSA group pacing feature. LSA group pacing can reduce high CPU or buffer utilization. This feature groups LSAs with similar link-state refresh times to allow OSPFv3 to pack multiple LSAs into an OSPFv3 Update message.
By default, LSAs with link-state refresh times within 10 seconds of each other are grouped together. You should lower this value for large link-state databases or raise it for smaller databases to optimize the OSPFv3 load on your network.
Link-State database
This database contains all the collected link-state advertisements (LSAs) and includes information on all the routes through the network. OSPFv3 uses this information to calculate the bast path to each destination and populates the routing table with these best paths. Each router maintains a link-state database for the OSPFv3 network.
LSAs are removed from the link-state database if no LSA update has been received within a set interval, called the MaxAge. Routers flood a repeat of the LSA every 30 minutes to prevent accurate link-state information from being aged out. Cisco NX-OS supports the LSA grouping feature to prevent all LSAs from refreshing at the same time. For more information, see the Flooding and LSA Group Pacing section.



Feedback