ospfv3 address family is another method of OSPF configuration which allows us to configure OSPF for both IPv4 and IPv6 within a dual-stack topology using a single extended ospfv3 process. In this lesson, we’ll cover the steps to implement and monitor extended ospfv3 for dual-stack networks, simplifying IPv4 and IPv6 routing with minimal configuration effort.
Table of Contents
extended ospfv3 vs. OSPFv2/OSPFv3
For networks with a dual-stack topology (supporting both IPv4 and IPv6), it’s common to configure two separate OSPF processes: OSPFv2 for IPv4 and OSPFv3 for IPv6 as we discussed in the previous lesson. However, a newer approach allows configuring extended ospfv3 to support both IPv4 and IPv6 within a single OSPF process and configuration context.
Feature | OSPFv2 | OSPFv3 | Extended ospfv3 |
---|---|---|---|
Purpose | IPv4 routing | IPv6 routing | Dual-stack routing (IPv4 and IPv6) |
Address Family Support | IPv4 only | IPv6 only | Both IPv4 and IPv6 via address families |
Separate Processes for IPv4 & IPv6 | Required | Required | Single process for both IPv4 and IPv6 |
Protocol Operation Basis | IPv4 | IPv6 | IPv6 (even when routing IPv4) |
Configuration Context | Separate for each address family | Separate for each address family | Single configuration context for both families |
Link-Local Address Requirement | Not required | Required | Required (even for IPv4 routing) |
Header Differences | IPv4-based OSPF header | IPv6-based OSPF header | IPv6-based OSPF header |
Multicast Addresses | 224.0.0.5, 224.0.0.6 | FF02::5, FF02::6 | FF02::5, FF02::6 |
Neighbor Discovery | Uses IPv4 | Uses IPv6 | Uses IPv6 link-local addresses |
This newer OSPFv3 configuration, often referred to as “extended OSPFv3,” integrates both IP address families. In this setup, OSPFv3 can handle both IPv4 and IPv6 routes using a unified process, managed through an address-family configuration.
A key aspect of ospfv3 is that, while it can learn and distribute routes for both IPv4 and IPv6, the OSPF process itself operates over IPv6. This means that even if you only need to use ospfv3 for IPv4 routing, you still need to configure an IPv6 link-local address on the interfaces where ospfv3 is active. This link-local address is essential for OSPFv3 neighbors to communicate, as the protocol’s underlying mechanism relies on IPv6 connectivity.
extended ospfv3 Configuration Example
To dive directly into the main topic and see how the configuration works with the new extended ospfv3, I’ve already prepared a dual-stack topology. The topology consists of three routers, each configured with both IPv4 and IPv6 addresses. The link-local address fe80::1
is assigned to all interfaces on the first router, fe80::2
to the second router, and fe80::3
to the third router.
To demonstrate the behavior, I intentionally configured only an IPv4 address on the first router’s loopback interface. This setup allows me to observe the errors that occur when enabling extended ospfv3 on an interface without an IPv6 address.
As shown in the configuration, extended OSPFv3 is enabled using the router
ospfv3
command. To configure OSPF for IPv4 or IPv6 separately, we use the address-family
ipv4 unicast
or address-family
ipv6 unicast
commands.
For IPv4 interface configuration in OSPFv3, the command “ospfv3 1
ipv4 area 0"
is used, while for IPv6, we use “ospfv3
1 ipv6 area 0"
. In this topology, we’re assuming all interfaces are in Area 0.
Lastly, don’t forget to enable the “ipv6
unicast-routing"
command, even when using extended ospfv3 in an IPv4-only topology.
!!! IOU1 ipv6 unicast-routing ! router ospfv3 1 ! address-family ipv4 unicast passive-interface Loopback0 router-id 1.1.1.1 exit-address-family ! address-family ipv6 unicast passive-interface Loopback0 router-id 1.1.1.1 exit-address-family ! interface Loopback0 ip address 10.1.1.1 255.255.255.0 ipv6 address FE80::1 link-local ospfv3 1 ipv4 area 0 ! interface Ethernet0/0 ip address 10.1.2.1 255.255.255.0 ipv6 address FE80::1 link-local ipv6 address 2001:AA:1:2::1/64 ospfv3 1 ipv6 area 0 ospfv3 1 ipv4 area 0
!!! IOU2 ipv6 unicast-routing ! router ospfv3 1 ! address-family ipv4 unicast router-id 2.2.2.2 exit-address-family ! address-family ipv6 unicast router-id 2.2.2.2 exit-address-family ! interface Ethernet0/0 ip address 10.1.2.2 255.255.255.0 ipv6 address FE80::2 link-local ipv6 address 2001:AA:1:2::2/64 ospfv3 1 ipv6 area 0 ospfv3 1 ipv4 area 0 ! interface Ethernet0/1 ip address 10.2.3.2 255.255.255.0 ipv6 address FE80::2 link-local ipv6 address 2001:AA:2:3::2/64 ospfv3 1 ipv6 area 0 ospfv3 1 ipv4 area 0
!!! IOU3 ipv6 unicast-routing ! router ospfv3 1 ! address-family ipv4 unicast passive-interface Loopback0 router-id 3.3.3.3 exit-address-family ! address-family ipv6 unicast passive-interface Loopback0 router-id 3.3.3.3 exit-address-family ! interface Loopback0 no ip address ipv6 address FE80::3 link-local ipv6 address 2001:AA:3::3/64 ospfv3 1 ipv6 area 0 ! interface Ethernet0/0 ip address 10.2.3.3 255.255.255.0 ipv6 address FE80::3 link-local ipv6 address 2001:AA:2:3::3/64 ospfv3 1 ipv4 area 0 ospfv3 1 ipv6 area 0
Activate extended ospfv3 in IPv4-only Interface
To check the result of enabling Extended OSPFv3 on a native IPv4 interface (without an IPv6 address), let’s configure ospfv3
1 ipv4 area 0
and see if we receive any errors.
As shown in the output, the error message “% OSPFv3: IPV6 is not enabled on this interface” appears. This indicates that we must configure at least a link-local IPv6 address on the interface in order to enable and use the extended OSPFv3 process.
IOU1(config-if)#int loo0 IOU1(config-if)#ospfv3 1 ipv4 area 0 % OSPFv3: IPV6 is not enabled on this interface ! interface Loopback0 ipv6 address FE80::1 link-local ! IOU1(config-if)#ospfv3 1 ipv4 area 0
extended ospfv3 Verifying Commands
Troubleshooting and monitoring commands in extended ospfv3 differ slightly from traditional OSPF.
Although extended ospfv3 advertises both IPv4 and IPv6 prefixes, IPv4-specific verification commands like „show
ip ospf neighbor“
and „show
ip ospf database“
do not display results. This is because extended ospfv3 advertises both IPv4 and IPv6 prefixes over IPv6 transport.
Similarly, IPv6-specific verification commands in extended OSPFv3, such as „show
ipv6 ospf neighbor
“
or „
show
ipv6 ospf database
“
, show only IPv6 addresses.
To verify both address types in extended OSPFv3, we use a different set of commands, beginning with show ospfv3
, like “show ospfv3 neighbor"
and “show ospfv3 database"
, which display results for both IPv4 and IPv6.
Verify extended ospfv3 Neighbor Table
IOU2#show ip ospf neighbor IOU2#
IOU2#show ipv6 ospf neighbor OSPFv3 Router with ID (2.2.2.2) (Process ID 1) Neighbor ID Pri State Dead Time Interface ID Interface 3.3.3.3 1 FULL/DR 00:00:35 3 Ethernet0/1 1.1.1.1 1 FULL/DR 00:00:35 3 Ethernet0/0
IOU2#show ospfv3 neighbor OSPFv3 1 address-family ipv4 (router-id 2.2.2.2) Neighbor ID Pri State Dead Time Interface ID Interface 3.3.3.3 1 FULL/DR 00:00:39 3 Ethernet0/1 1.1.1.1 1 FULL/DR 00:00:37 3 Ethernet0/0 OSPFv3 1 address-family ipv6 (router-id 2.2.2.2) Neighbor ID Pri State Dead Time Interface ID Interface 3.3.3.3 1 FULL/DR 00:00:38 3 Ethernet0/1 1.1.1.1 1 FULL/DR 00:00:39 3 Ethernet0/0 IOU2#
Verify extended ospfv3 Database Table
IOU2#show ip ospf database IOU2#
IOU2#show ipv6 ospf database OSPFv3 Router with ID (2.2.2.2) (Process ID 1) Router Link States (Area 0) ADV Router Age Seq# Fragment ID Link count Bits 1.1.1.1 1297 0x80000003 0 1 None 2.2.2.2 1208 0x80000002 0 2 None 3.3.3.3 1378 0x80000003 0 1 None Net Link States (Area 0) ADV Router Age Seq# Link ID Rtr count 1.1.1.1 1297 0x80000002 3 2 3.3.3.3 1378 0x80000002 3 2 Link (Type-8) Link States (Area 0) ADV Router Age Seq# Link ID Interface 2.2.2.2 1208 0x80000002 4 Et0/1 3.3.3.3 1378 0x80000002 3 Et0/1 1.1.1.1 1807 0x80000002 3 Et0/0 2.2.2.2 1208 0x80000002 3 Et0/0 Intra Area Prefix Link States (Area 0) ADV Router Age Seq# Link ID Ref-lstype Ref-LSID 1.1.1.1 1297 0x80000002 3072 0x2002 3 3.3.3.3 1378 0x80000003 0 0x2001 0 3.3.3.3 1378 0x80000002 3072 0x2002 3 IOU2#
IOU2#show ospfv3 database OSPFv3 1 address-family ipv4 (router-id 2.2.2.2) Router Link States (Area 0) ADV Router Age Seq# Fragment ID Link count Bits 1.1.1.1 1309 0x80000003 0 1 None 2.2.2.2 1264 0x80000003 0 2 None 3.3.3.3 1364 0x80000003 0 1 None Net Link States (Area 0) ADV Router Age Seq# Link ID Rtr count 1.1.1.1 1309 0x80000002 3 2 3.3.3.3 1364 0x80000002 3 2 Link (Type-8) Link States (Area 0) ADV Router Age Seq# Link ID Interface 2.2.2.2 1264 0x80000002 4 Et0/1 3.3.3.3 1364 0x80000002 3 Et0/1 1.1.1.1 1811 0x80000002 3 Et0/0 2.2.2.2 1264 0x80000002 3 Et0/0 Intra Area Prefix Link States (Area 0) ADV Router Age Seq# Link ID Ref-lstype Ref-LSID 1.1.1.1 1309 0x80000004 0 0x2001 0 1.1.1.1 1309 0x80000002 3072 0x2002 3 3.3.3.3 1364 0x80000002 3072 0x2002 3 OSPFv3 1 address-family ipv6 (router-id 2.2.2.2) Router Link States (Area 0) ADV Router Age Seq# Fragment ID Link count Bits 1.1.1.1 1307 0x80000003 0 1 None 2.2.2.2 1219 0x80000002 0 2 None 3.3.3.3 1389 0x80000003 0 1 None Net Link States (Area 0) ADV Router Age Seq# Link ID Rtr count 1.1.1.1 1307 0x80000002 3 2 3.3.3.3 1389 0x80000002 3 2 Link (Type-8) Link States (Area 0) ADV Router Age Seq# Link ID Interface 2.2.2.2 1219 0x80000002 4 Et0/1 3.3.3.3 1389 0x80000002 3 Et0/1 1.1.1.1 1817 0x80000002 3 Et0/0 2.2.2.2 1219 0x80000002 3 Et0/0 Intra Area Prefix Link States (Area 0) ADV Router Age Seq# Link ID Ref-lstype Ref-LSID 1.1.1.1 1307 0x80000002 3072 0x2002 3 3.3.3.3 1389 0x80000003 0 0x2001 0 3.3.3.3 1389 0x80000002 3072 0x2002 3 IOU2#