OSPFv3 is routing protocol for IPv6 Just like OSPFv2 is for IPv4. There are several vital differences in the way the two protocols operate. It is the OSPFv2 equivalent for exchanging IPv6 prefixes. Remember that in IPv6, the network address is referred to as the prefix and the subnet mask is called the prefix-length. Comparable to IPv4, OSPFv3 exchanges routing information to populate the IPv6 routing table with remote prefixes. OSPFv3 Address Families feature includes support for both IPv4 and IPv6.
OSPFv2 works over network layer of IPv4, communicating with other OSPF IPv4 peers, and advertising only IPv4 routes. The version3 has also the same functionality, but uses IPv6 as the network layer transport, communicating with OSPFv3 peers and advertising IPv6 routes. It also uses the SPF algorithm as the computation engine to determine the best paths throughout the routing domain. The figure below illustrates both versions.
Along with all IPv6 routing protocols, version3 has separate processes from its IPv4 equivalent. The processes and operations are the same as in the IPv4 routing protocol but run separately. Both have separate adjacency tables, OSPF topology tables, and IP routing tables, as shown in the figure. The configuration and verification commands are similar for both protocols.
Similarities Between Both Versions
The similarities between OSPFv2 and OSPFv3 are the following:
Link-state– Both uses link-state as routing algorithm as well as both are classless.
Routing algorithm– Both uses the same SPF algorithm to make routing decisions.
Metric– Both uses the metric as the cost of sending packets out to the interface and we can modify using the <auto-cost reference-bandwidth ref-bw> router configuration mode command. The command only affects the OSPF metric where it was configured. For example, if we use the command for Version3, it does not affect the Version2 routing metrics.
Areas– The concept areas are the same as the area in OSPFv2
OSPF packet types– OSPFv3 uses the same five types of using OSPFv2 (Hello, DBD, LSR, LSU, and LSAck).
Neighbor discovery mechanism– The neighbor state machine, including the list of OSPF neighbor states and events, remains unchanged. OSPFv2 and OSPFv3 use the Hello mechanism to learn about neighboring routers and form adjacencies. However, in OSPFv3, there is no requirement for matching subnets to form neighbor adjacencies. This is because neighbor adjacencies are formed using link-local addresses, not global unicast addresses.
DR/BDR election process– The DR/BDR election process also in both versions
Router ID– Both protocols use the same 32-bit number for the router ID represented in dotted-decimal notation. Usually, this is an IPv4 address. The OSPF <router-id> command can configure the router ID. The process in determining Router ID is the same in both protocols. Use an explicitly-configured router ID; otherwise, the highest loopback IPv4 address becomes the router ID.
Differences Between Both Versions
The differences between OSPFv2 and OSPFv3 are following.
Advertises– OSPFv2 advertises IPv4 routes and OSPFv3 advertise the IPv6 routes.
Source address– The source of OSPFv2 messages are IPv4 address of the exit interface and the source of OSPF messages for IPv6 messages are the link-local address of the exit interface.
All OSPF router multicast addresses– The OSPFv2 uses 220.127.116.11 as multi-cast address whereas, OSPFv3 uses FF02::5.
DR/BDR multicast address– OSPFv2 uses 18.104.22.168 and, OSPFv3 uses FF02::6.
Advertise networks– OSPFv2 advertises networks using the <network> command in router configuration mode and, OSPFv3 uses the <ipv6 ospf process-id area area-id> interface configuration mode command.
IP unicast routing– Enabled, by default, in IPv4; whereas, the ipv6 unicast-routing global configuration command must be configured.
Authentication– OSPFv2 uses either plaintext authentication or MD5 authentication and OSPFv3 uses IPv6 authentication.