OSPF is a link state routing protocol. It has many advantages such as open standards, fast convergence, no loops, and easy hierarchical design. The OSPFv2 protocol, which is widely used in IPv4 networks, is too closely related to IPv4 addresses in terms of message content and operation mechanism, which greatly restricts its scalability and adaptability. Therefore, when I initially considered extending OSPF to support IPv6, I realized that this was an opportunity to improve and optimize the OSPF protocol itself. As a result, not only has OSPFv2 been extended for IPv6, but also a new improved version of OSPF has been created-OSPF version 3. OSPFv3 is described in detail in RFC2740. The relationship between OSPFv3 and OSPFv2 is very similar to the relationship between RIPng and RIPv2. The most important thing is that OSPFv3 uses the same basic implementation mechanism as OSPFv2-SPF algorithm, flood diffusion, DR election, region, etc. Other constants and variables like timers and metrics are the same. Another similarity between RIPng and RIPv2 is that OSPFv3 is also not backward compatible with OSPFv2. Regardless of whether it is OSPFv2 or OSPFv3, the basic operating principle of the OSPF protocol is indistinguishable. However, due to the different meanings of the IPv4 and IPv6 protocols and the size of the address space, the differences between them are also inevitable. Similarities between OSPFv2 and OSPFv3: 1. The router type is the same. Including internal routers, backbone routers, area border routers and autonomous system border routers.
- The supported area types are the same. Including backbone area, standard area, stubby area, NSSA and complete stubby area.
- In OSPFv3, the concept of OSPFv2 “subnet” is changed to the concept of “link”, and two neighbors on the same link but belonging to different IPv6 subnets are allowed to exchange data packets.
- The router ID, area ID, and LSA link state ID values are still expressed in 32 bits, so they cannot be expressed using IPv6 addresses.
- On the link between the broadcast network and the NBMA network, OSPFv2 neighbors are identified by their interface addresses, while neighbors on other types of links are identified by RIDs. OSPFv3 eliminates this inconsistency, and all neighbors on all types of links are identified by RID.
- OSPFv3 retains the scope of OSPFv2 domain (or AS) and area (area) flooding and spreading, but adds a link-local flooding and spreading range. A new link LSA (Link LSA) is added to carry information that is only associated with neighbors on a single link.
- The IPv6 protocol uses an authentication extension header, which is a standard authentication process. For this reason, OSPFv3 does not require its own authentication for OSPFv3 packets, it only needs to use IPv6 authentication.
- Use this link-local address to discover neighbors and complete automatic configuration. The IPv6 router does not forward packets whose source address is this link address. OSPFv3 believes that each router has assigned this link address to each physical network segment (physical link) to which it connects.
- In OSPFv2, the unknown LSA types are always discarded, and OSPFv3 can use them as the link-local flooding spread range.
- If an IPv4 address is set on the interface of the router, or a loopback interface is set, OSPFv3 automatically selects the IPv4 address as the router ID, otherwise it is necessary to set the ID number for the router.