The following aspects of OSPFv3 and OSPFv2 are the same:
Network type and interface type
Interface state machine and neighbor state machine
LSDB
Flooding mechanism
Hello, DD, LSR, LSU, and LSAck packets
Route calculation
The following aspects of OSPFv3 and OSPFv2 are different:
OSPFv3 runs on IPv6, which is based on links rather than network segments.
This means that there is no need to configure OSPFv3 on interfaces in the same network segment. It is only necessary that the interfaces enabled with OSPFv3 are on the same link. Interfaces can also set up OSPFv3 sessions without IPv6 global addresses.
OSPFv3 does not depend on IP addresses.
This separates topology calculation from IP addresses. OSPFv3 calculates a topology without knowing the IPv6 global address, which only applies to virtual link interfaces for packet forwarding.
OSPFv3 packets and the LSA format have the following changes:
OSPFv3 packets do not contain IP addresses.
OSPFv3 router LSAs and network LSAs do not contain IP addresses, which are advertised by Type 8 LSAs and Type 9 LSAs.
In OSPFv3, router IDs, area IDs, and LSA link state IDs no longer indicate IP addresses, but the IPv4 address format is still reserved.
In broadcast, NBMA, or P2MP networks, neighbors are identified by router IDs instead of IP addresses.
In OSPFv3, information about the flooding scope is added in the LSA Type field.
This allows OSPFv3 routers to process LSAs of unidentified types, which makes processing more flexible.
OSPFv3 stores or floods unidentified packets, whereas OSPFv2 discards.
OSPFv3 floods packets in an OSPF area or on a link. It sets the U flag bit of packets (the flooding area is based on the link local) so that unidentified packets are stored or forwarded to the stub area.
For example, RouterA and RouterB can identify LSA of a certain type. They are connected through RouterC, which cannot identify this type of LSA. When RouterA floods an LSA of this type, RouterC still floods it to RouterB even though it cannot identify the LSA itself. RouterB then processes the LSA normally.
If this occurred over OSPFv2, RouterC would discard the unidentified LSA, and it would not reach RouterB.
OSPFv3 supports multi-process on a link.
Only one OSPFv2 process can be configured on a physical interface, but multiple OSPFv3 processes can be configured a single physical interface.
These processes are identified by different instance IDs. They establish neighbor relationships with the other end of the link and transmit packets to the other end without interfering with each other.
The resources of a link can therefore be shared among OSPFv3 instances that simulate multiple OSPFv3 routers. This allows more efficient use of limited router resources.
OSPFv3 uses IPv6 link-local addresses.
IPv6 implements neighbor discovery and automatic configuration based on link-local addresses. Routers running IPv6 do not forward IPv6 packets whose destination address is a link-local address. Those packets can only be exchanged on the same link. The unicast link-local address starts from FE80::/10.
As a routing protocol running on IPv6, OSPFv3 uses link-local addresses to maintain neighbor relationships and update LSDBs. All OSPFv3 interfaces, except Vlink interfaces, use link-local addresses as the source address and the next hop address to transmit OSPFv3 packets.
The OSPFv3 can calculate the topology without knowing the global IPv6 addresses.
The packets flooded on a link are not transmitted to other links, which prevents unnecessary flooding and saves bandwidth.
OSPFv3 supports the following two new LSAs:
Type 8 (Link) LSA: A router floods a link LSA on the link where it resides to advertise its link-local address and the configured global IPv6 address.
Type 9 (Intra-Area-Prefix) LSA: A router advertises an intra-area-prefix LSA in the local OSPF area to inform other routers in the area or network of its IPv6 global address. The network can be a broadcast network or an NBMA network.
OSPFv3 identifies neighbors based only on router IDs.
OSPF identifies neighbors based on IPv4 interface addresses in broadcast, NBMA, P2P, and P2MP networks and identifies neighbors based on router IDs in Vlink networks.
Since OSPFv3 identifies neighbors based only on router IDs, it can establish and maintain neighbor relationships even when global IPv6 addresses are not configured or are configured in different network segments. Topology calculation is not based on IP addresses.