gurfin / ENCOR #6 - OSPFv3

Created Thu, 23 Jan 2025 16:50:00 +0100 Modified Thu, 23 Jan 2025 22:24:32 +0000
756 Words

OSPF version 3

To support IPv6 routing, OSPF version 3 (OSPFv3) was created. It has support for both IPv4 and IPv6, but is not backwards compatible with the version 2 standard. In fact, the protocol is designed to be independent on the address family type. The communication between routers is based entirely on IPv6 though, using link-local addresses. There is also support for multiple instances within a network, which allows you to configure which routers are able to form adjacencies.

The LSAs

OSPFv3 uses protocol 89 and, as mentioned, IPv6 link-local addresses. It also uses different LSA types:

Type Name Description
0x2001 Router Much like the type 1 LSA in OSPFv2, this describes all the links of a router.
0x2002 Network DR will use this to describe all OSPF routers on a network segment.
0x2003 Interarea prefix Similar to the type 3 LSAs in OSPFv2, in functionality. This allows the transmission of IPv6 routes outside of the originating area.
0x2004 Interarea router ABRs use this to advertise prefixes from ASBRs in other areas.
0x4005 AS external This is used by ASBRs to announce external routes (ie. redistribute or default-originate).
0x2007 NSSA Allows for redistributed networks to be transmitted within a Not So Stubby Area.
0x0008 Link This is used on a network segment to communicate which unicast address prefixes are associated with each routers link-local IP-address.
0x2009 Intra-area prefix This is used intra-area to announce one or multiple IPv6 routes on a router, stub or network segment.

As mentioned, the communication is done using link-local addresses. Much like for IPv4 in OSPFv2, multicast destination addresses are used:

  • FF02::05 All SPF Routers
  • FF02::06 All DR routers

The multicast addresses are used for discovering neighbors and flooding changes. So for communication between specific routers the routers link-local address is used, thus minimizing the strain on other OSPFv3 routers.

Let’s try to set it up!

I will build a simple OSPFv3 network in EVE-NG using the Cisco IOSv Router image. This is the topology:

eve-ng diagram

On all routers this configuration will be applied:

ipv6 unicast-routing
ipv6 cef

router ospfv3 1
 !
 address-family ipv6 unicast
 exit-address-family

And then this will be the unique configuration for each router respectively:

R1:

interface GigabitEthernet0/0
 no shutdown
 ipv6 address 6969::1:1/112
 ipv6 ospf 1 area 10
 ospfv3 network point-to-point
!
interface GigabitEthernet0/1
 no shutdown
 ipv6 address 6969:6969::1/112
 ospfv3 1 ipv6 area 10
!
router ospfv3 1
 router-id 10.0.0.1
 !
 address-family ipv6 unicast
  passive-interface default
  no passive-interface GigabitEthernet0/0
 exit-address-family

We will use ospfv3 network point-to-point as an example of you being able to override the default classification that OSPFv2 and v3 does of ethernet links. There is no need for a DR/BDR on a network segment that has no more than 2 OSPF routers. By setting the interface on both side of the link to be treated as a point-to-point link, we can skip the entire DR/BDR election process.

R2:

interface GigabitEthernet0/0
 no shutdown
 ipv6 address 6969::1:2/112
 ipv6 ospf 1 area 10
 ospfv3 network point-to-point
!
interface GigabitEthernet0/1
 no shutdown
 ipv6 address 6969::2:1/112
 ospfv3 1 ipv6 area 0
!
router ospfv3 1
 router-id 10.0.0.2
 !
 address-family ipv6 unicast
  area 10 range 6969:6969::/64
 exit-address-family

Here we also use the summarization feature of OSPF ABRs. This works the same way as summarization on OSPFv2. Using the area 10 range 6969:6969::/64 command we will instruct the ABR for area 10 (in this case R2) to suppress any component prefixes of 6969:6969::/64, and to also inject 6969:6969::/64 as a blackhole route in the ABRs RIB, while at the same time advertise the 6969:6969::/64 route to the backbone area using a interarea prefix LSA.

R3:

interface GigabitEthernet0/0
 no shutdown
 ipv6 address 6969::2:2/112
 ospfv3 1 ipv6 area 0
!
interface GigabitEthernet0/1
 no shutdown
 ipv6 address 6969::3:1/112
 ospfv3 1 ipv6 area 0
!
router ospfv3 1
 router-id 10.0.0.3

R4:

interface GigabitEthernet0/0
 no shutdown
 ipv6 address 6969::3:2/112
 ospfv3 1 ipv6 area 0
!
interface GigabitEthernet0/1
 no shutdown
 ipv6 address 6969::4:1/112
 ospfv3 network point-to-point
 ospfv3 1 ipv6 area 20
!
router ospfv3 1
 router-id 10.0.0.4

R5:

interface GigabitEthernet0/0
 no shutdown
 ipv6 address 6969::4:2/112
 ospfv3 network point-to-point
 ospfv3 1 ipv6 area 20
!
router ospfv3 1
 router-id 10.0.0.5

IPv4 support on OSPFv3

Since OSPFv3 is protocol agnostic, it also supports converging IPv4 routes. This is activated by enabling the OSPFv3 process for an IPv4 address interface. This does, however, require an IPv6-address (global or link-local) for the OSPFv3 process to use to communicate the IPv4 routes across.

interface GigabitEthernet0/0
 no shutdown
 ip address 192.168.10.1/24
 ipv6 address 6969::4:2/112
 ospfv3 1 ipv6 area 20
 ospfv3 1 ipv4 area 20