Overview

If your network is running Dual Stack (IPv4 and IPv6), you really should be using OSPFv3 Address Families. Address Families offers a clean way to organize configurations and verifications.

Rather than running ipv4 and ipv6 under two completely different OSPF processes (or different OSPF versions), Address Families brings ipv4 and ipv6 under the same OSPFv3 process.

Under the OSPFv3 process, ipv4 and ipv6 information gets injected into the same:
Neighbor Table
Link State Database (LSDB)

This means that one verification command for the Neighbor Table or LSDB can reveal information for both IPv4 and IPv6. The output is nicely laid out.

IPv4 and IPv6 have completely separate routing tables. This means that we must run a separate verification command for each routing table.

Both IPv4 and IPv6 routing information (i.e. creating and maintaining OSPFv3 neighbors and adjacencies) is sent by IPv6 unicast. Even if we have an IPv4 only island, the IPv4 routing information is delivered via IPv6 Link Local Addresses (LLAs).

How it Works

As mentioned above, OSPFv3 messages are sent via IPv6's Link Local Addresses (LLAs) to share both IPv4 and IPv6 routing information.

OSPFv3 address families have an hierarchical structure that is used to simplify the configuration and verification of IPv4 and IPv6.

OSPFv3 Messages

Since OSPFv3 update messages are transmitted using IPv6 LLAs, routers must have LLAs assigned to the interfaces and ipv6 unicast-routing enabled.

This is true even if we're using OSPFv3 through an IPv4 island (an area where routed information is ipv4 only).

Hierarchical Configuration Structure

OSPFv3 Address Families use an hierarchical configuration structure that simplifies configuration and verification.

Commands can be entered under each address family. Commands can also be entered in router configuration mode and then command will then be inherited to the IPv4 and the IPv6 address families. This can be easier than issuing the same command under each address family and can also offer easier to read verification output.

Hierarchical Structure Examples

Let's begin by creating both the ipv4 and ipv6 address families:

conf t
ipv6 unicast-routing
router ospfv3 64
address-family ipv4
exit
address-family ipv6
end

We can verify the creation of the address families by checking the LSDB:

R-1#show ospfv3 database

          OSPFv3 64 address-family ipv4 (router-id 10.0.1.1)

          OSPFv3 64 address-family ipv6 (router-id 10.0.1.1)

Good. We have the ipv4 address family and the ipv6 address family both with the same OSPFv3 process ID of 64.

The Router ID (RID) was automatically generated from the lowest IPv4 address on an active interface. In this case, it was generated from the IPv4 address on Lo 146:

R-1#sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0         10.0.12.1       YES manual up                    up      
GigabitEthernet0/1         10.0.10.1       YES manual up                    up      
GigabitEthernet0/2         unassigned      YES NVRAM  administratively down down    
GigabitEthernet0/3         unassigned      YES NVRAM  administratively down down    
Loopback146                10.0.1.1        YES manual up                    up

To learn more about how routers select the OSPFv3 RID see the OSPFv3 Router ID (RID) lesson.

Pro Tip: It’s a best practice to hard-code the RID. A future change to the topology addressing could make a mess of OSPFv3.

Below we'll walk through the two examples that will To illustrate OSPFv3’s address family hierarchical structure.

In the first example, we'll hard-code the RID under the OSPFv3 process and verify that it was inherited by the ipv4 and ipv6 address families.

In the second example, we'll hard-code unique RIDs under each address family and verify.

router ospfv3 46

passive-interface g0/1
  
int g0/1
ospfv3 46 ipv4 area 23
ospfv3 46 ipv6 area 23

Example 1: Inheritance

R-1(config)#router OSPFv3 64
R-1(config-router)#router-id 1.1.1.1
R-1(config-router)#end
R-1#show ospfv3 database
*Aug 20 07:43:55.874: %SYS-5-CONFIG_I: Configured from console by console

          OSPFv3 64 address-family ipv4 (router-id 1.1.1.1)

          OSPFv3 64 address-family ipv6 (router-id 1.1.1.1)

By configuring the RID by hard-coding under the OSPFv3 process, the RID was inherited by both the ipv4 and ipv6 address families.

Example 2: Unique Configuration for Each Family

First let's remove the configuration from the last example.

R-1(config)#router OSPFv3 64
R-1(config-router)#no router-id 1.1.1.1
R-1(config-router)#end
R-1#show ospfv3 database

          OSPFv3 64 address-family ipv4 (router-id 10.0.1.1)

          OSPFv3 64 address-family ipv6 (router-id 10.0.1.1)

The router has removed the RID of 1.1.1.1 from the last example. It also generated a RID from the interface with the lowest ipv4 address.

R-1(config)#router ospfv3 64
R-1(config-router)#address-family ipv4
R-1(config-router-af)#router-id 1.1.1.4
R-1(config-router-af)#exit
R-1(config-router)#address-family ipv6
R-1(config-router-af)#router-id 1.1.1.6
R-1(config-router-af)#end
R-1#show ospfv3 database

          OSPFv3 64 address-family ipv4 (router-id 1.1.1.4)

          OSPFv3 64 address-family ipv6 (router-id 1.1.1.6)

By configuring the RID under the router address-family configuration mode for each address-family, the ipv4 and ipv6 address-families have unique RIDs.

In Sum, with the hierarchical structure of OSPFv3 address-families, the RID can be configured under the OSPFv3 process to be inherited into both the ipv4 and ipv6 address-families or uniquely configured under each address-family.

You should now have a good understanding of what OSPFv3 is used for and how the hierarchical structure is used to configure and verify IPv4 and IPv6 routing.

Pro Tip: Many of the commands under OSPFv3 router configuration mode, ipv4 address family configuration and ipv6 address family configuration modes are the same. However, the commands available under each of these modes do differ.

Under OSPFv3 router configuration mode these commands are available:

R-1(config)#router ospfv3 64
R-1(config-router)#?
Router configuration commands:
  address-family         Enter Address Family command mode
  adjacency              Control adjacency formation
  area                   OSPF area parameters
  authentication         Authentication parameters
  auto-cost              Calculate OSPF interface cost according to bandwidth
  bfd                    BFD configuration commands
  compatible             Compatibility list
  default                Set a command to its defaults
  event-log              Event Logging
  exit                   Exit from routing protocol configuration mode
  graceful-restart       Graceful-restart options
  help                   Description of the interactive help system
  interface-id           Source of the interface ID
  limit                  Limit a specific OSPF feature
  local-rib-criteria     Enable or disable usage of local RIB as route criteria
  log-adjacency-changes  Log changes in adjacency state
  manet                  Specify MANET OSPF parameters
  max-lsa                Maximum number of non self-generated LSAs to accept
  max-metric             Set maximum metric
  no                     Negate a command or set its defaults
  passive-interface      Suppress routing updates on an interface
  prefix-suppression     Enable prefix suppression
  queue-depth            Hello/Router process queue depth
  router-id              router-id for this OSPF process
  shutdown               Shutdown the router process
  timers                 Adjust routing timers

While the following commands are available under the ipv4 address family configuration modes:

R-1(config-router)#address-family ipv4
R-1(config-router-af)#?
Router Address Family configuration commands:
  adjacency              Control adjacency formation
  area                   OSPF area parameters
  authentication         Authentication parameters
  auto-cost              Calculate OSPF interface cost according to bandwidth
  bfd                    BFD configuration commands
  compatible             Compatibility list
  default                Set a command to its defaults
  default-information    Control distribution of default information
  default-metric         Set metric of redistributed routes
  discard-route          Enable or disable discard-route installation
  distance               Define an administrative distance
  distribute-list        Filter networks in routing updates
  event-log              Event Logging
  exit-address-family    Exit from Address Family configuration mode
  graceful-restart       Graceful-restart options
  help                   Description of the interactive help system
  interface-id           Source of the interface ID
  limit                  Limit a specific OSPF feature
  local-rib-criteria     Enable or disable usage of local RIB as route criteria
  log-adjacency-changes  Log changes in adjacency state
  manet                  Specify MANET OSPF parameters
  max-lsa                Maximum number of non self-generated LSAs to accept
  max-metric             Set maximum metric
  maximum-paths          Forward packets over multiple paths
  no                     Negate a command or set its defaults
  passive-interface      Suppress routing updates on an interface
  prefix-suppression     Enable prefix suppression
  queue-depth            Hello/Router process queue depth
  redistribute           Redistribute information from another routing protocol
  router-id              router-id for this OSPF process
  shutdown               Shutdown the router process
  snmp                   Modify snmp parameters
  summary-prefix         Configure IP address summaries
  timers                 Adjust routing timers

While the following commands are available under the ipv6 address family configuration modes:

R-1(config-router)#address-family ipv6
R-1(config-router-af)#?
Router Address Family configuration commands:
  adjacency              Control adjacency formation
  area                   OSPF area parameters
  authentication         Authentication parameters
  auto-cost              Calculate OSPF interface cost according to bandwidth
  bfd                    BFD configuration commands
  compatible             Compatibility list
  default                Set a command to its defaults
  default-information    Distribution of default information
  default-metric         Set metric of redistributed routes
  discard-route          Enable or disable discard-route installation
  distance               Administrative distance
  distribute-list        Filter networks in routing updates
  event-log              Event Logging
  exit-address-family    Exit from Address Family configuration mode
  graceful-restart       Graceful-restart options
  help                   Description of the interactive help system
  interface-id           Source of the interface ID
  limit                  Limit a specific OSPF feature
  local-rib-criteria     Enable or disable usage of local RIB as route criteria
  log-adjacency-changes  Log changes in adjacency state
  manet                  Specify MANET OSPF parameters
  max-lsa                Maximum number of non self-generated LSAs to accept
  max-metric             Set maximum metric
  maximum-paths          Forward packets over multiple paths
  no                     Negate a command or set its defaults
  passive-interface      Suppress routing updates on an interface
  prefix-suppression     Enable prefix suppression
  queue-depth            Hello/Router process queue depth
  redistribute           Redistribute IPv6 prefixes from another routing
                         protocol
  router-id              router-id for this OSPF process
  shutdown               Shutdown the router process
  snmp                   Modify snmp parameters
  summary-prefix         Configure IPv6 summary prefix
  table-map              Map external entry attributes into routing table
  timers                 Adjust routing timers

Notice, for example, that the redistribute command isn't available under the OSPFv3 router configuration mode, but is available under the OSPFv3 ipv4 and ipv6 address family configuration modes.

Also notice, some commands available under the ipv4 address family configuration mode may or may not be available under the ipv6 address family configuration mode. This makes sense as ipv4 and ipv6 share some features, but also have different features.

Don't forget, using the ? to reveal the available commands in different configuration modes is valuable!

OSPFv3 Tables

To master OSPFv3, it’s important that we have a solid understanding of how to accurately specify configurations and verifications for:

  1. ipv4 only
  2. ipv6 only
  3. ipv4 and ipv6

This sounds more difficult than it really is. It is easy.

Let’s discuss the following OSPFv3 tables:

  • Neighbor Table
  • Link State Database (LSDB)
  • IPv4 routing table
  • IPv6 routing table

The Neighbor Table and the Link State Database (LSDB) both contain ipv4 and ipv6 information.

We can view the output from these tables by:

  1. ipv4 only
  2. ipv6 only
  3. ipv4 and ipv6

For example, we can verify the Neighbor Table with these commands:

show ospfv3 ipv4 neighbor - Filters and then displays only IPv4 information
show ospfv3 ipv6 neighbor - Filters and then displays only IPv6 information
show ospfv3 neighbor - Displays both ipv4 and ipv6 information

Similarly, we can see output from the LSDB with these commands:

show ospfv3 ipv4 database - Filters and then displays only IPv4 information
show ospfv3 ipv6 database - Filters and then displays only IPv6 information
show ospfv3 database - Displays both ipv4 and ipv6 information

However, ipv4 and ipv6 use completely separate routing tables:
sh ip route – Displays only the IPv4 routing table. Note that ip denotes ipv4.
sh ipv6 route - Displays only the IPv6 routing table.

You should now have a solid foundation for how OSPFv3 Address Families work. Next, we'll use them in a more comprehensive lab.

OSPFv3 Address Families Lab

In the lab below, we'll dive deeper into OSPFv3 address families with more configurations and verifications to better understand how to use it for the "Real World".

Topology

In this lab we’ll use the following topology:

OSPFv3 Address Families Topology
OSPFv3 Address Families Topology

For this lab, all interfaces have been pre-configured with both ipv4 and ipv6 addresses and the ISP router has static routing pre-configured to simulate the return of Internet/WAN traffic.

The Multi-layer switches (MLS-11 and MLS-22) connect to LANs.

For your convenience, you can copy and paste the below address configurations into your own lab environment:

ISP


Configure terminal

hostname ISP-1

ipv6 unicast-routing

interface g0/0
no shut
ip address 10.0.10.2 255.255.255.252
ipv6 address FE80:10::2 link-local
ipv6 address 2001:10::2/64

end

! The below verification commands have been commented because the interfaces may need some time to apply the above configuration.
! show ip interface brief
! show ipv6 interface brief

R-1

Conf terminal

hostname R-1

ipv6 unicast-routing

int lo146
ip address 10.0.1.1 255.255.255.255
ipv6 address FE80:1::1 link-local
ipv6 address 2001:1::1/128

interface g0/0
no shutdown
ip address 10.0.12.1 255.255.255.252
ipv6 address FE80:12::1 link-local
ipv6 address 2001:12::1/64

int g0/1
no sh
ip address 10.0.10.1 255.255.255.252
ipv6 address FE80:10::1 link-local
ipv6 address 2001:10::1/64

end

! The below verification commands have been commented because the interfaces may need some time to apply the above configuration.
! show ip interface brief
! show ipv6 interface brief

R-2

conf t

hostname R-2

ipv6 unicast-routing

int lo246
ip address 10.0.2.2 255.255.255.255
ipv6 address FE80:2::2 link-local
ipv6 address 2001:2::2/128

interface g0/0
no sh
ip address 10.0.12.2 255.255.255.0
ipv6 address FE80:12::2 link-local
ipv6 address 2001:12::2/64

interface g0/1
no sh
ip address 10.0.23.2 255.255.255.252
ipv6 address FE80:23::2 link-local
ipv6 address 2001:23::2/64

interface g0/2
no sh
ip address 10.0.24.2 255.255.255.0
ipv6 address FE80:24::2 link-local
ipv6 address 2001:24::2/64

end

! The below verification commands have been commented because the interfaces may need some time to apply the above configuration.
! show ip interface brief
! show ipv6 interface brief

R-3

conf t

hostname R-3

ipv6 unicast-routing

int lo346
ip address 10.0.3.3 255.255.255.255
ipv6 address FE80:3::3 link-local
ipv6 address 2001:3::3/128

int g0/0
no sh
ip address 10.0.23.1 255.255.255.252
ipv6 address FE80:23::1 link-local
ipv6 address 2001:23::1/64

int g0/1
no sh
ip address 10.3.11.2 255.255.255.252
ipv6 address FE80:311::2 link-local
ipv6 address 2001:311::2/64

end

! The below verification commands have been commented because the interfaces may need some time to apply the above configuration.
! show ip interface brief
! show ipv6 interface brief

R-4

conf terminal

hostname R-4

ipv6 unicast-routing

int lo 446
ip address 10.0.4.4 255.255.255.255
ipv6 address FE80:4::4 link-local
ipv6 address 2001:4::4/128

int g0/0
no sh
ip address 10.0.24.1 255.255.255.252
ipv6 address FE80:24::1 link-local
ipv6 address 2001:24::1/64

int g0/1
no sh
ip address 10.4.22.2 255.255.255.252
ipv6 address FE80:422::2 link-local

! The below verification commands have been commented because the interfaces may need some time to apply the above configuration.
! show ip interface brief
! show ipv6 interface brief

MLS-11

conf t

hostname MLS-11

ipv6 unicast-routing

int lo 1146
ip address 10.0.11.11 255.255.255.255
ipv6 address FE80:11::11 link-local
ipv6 address 2001:11::11/128

int g0/0
no switchport
no shutdown
ip address 10.3.11.1 255.255.255.252
ipv6 address FE80:311::1 link-local
ipv6 address 2001:311::1/64
end

! The below verification commands have been commented because the interfaces may need some time to apply the above configuration.
! show ip interface brief
! show ipv6 interface brief

MLS-22

conf t

hostname MLS-22

ipv6 unicast-routing

int lo 2246
ip address 10.0.22.22 255.255.255.255

int g0/0
no switchport
no sh
ip address 10.4.22.1 255.255.255.252
ipv6 address FE80:422::1 link-local
end
sh ip int br
sh ipv6 int br

! The below verification commands have been commented because the interfaces may need some time to apply the above configuration.
! show ip interface brief
! show ipv6 interface brief

Address Family Configuration

Requirements

  1. Configure OSPFv3 Areas in this order: Area 0, 23 then 24.
    1. Each router must have unique RIDs for IPv4 and IPv6.
  2. Passive Interface enabled on all loopbacks and interfaces pointing to LANs.
  3. Configure Area 23 as a Stub Area and Area 24 as a Totally Stubby Area.
  4. Configure static route from R-1 to ISP and advertise this as the default route throughout the OSPFv3 domain.
  5. Configure static routes on ISP router to simulate return traffic from WAN.

Pro Tip: Configure the address families before enabling OSPFv3 on the interfaces. The address families could contain important parameters. We wouldn't want to send OSPFv3 information around our network, or out of our network, before these parameters are set.

Area 0 (Backbone Area)

Requirements for R-1 and R-2:

  1. Create OSPFv3 router process 46.
  2. Passive Interface enabled on R-1's and R-2's Loopback for ipv4 and ipv6.
  3. Create IPv4 and IPv6 address families with unique RIDs for each family.
  4. Enable OSPFv3 router process 46 on Area 0's physical interfaces and Loopbacks.

! R1

conf t

ipv6 unicast-routing

router ospfv3 46

passive-interface lo 146

address-family ipv4 unicast
router-id 1.1.1.4

address-family ipv6 unicast
router-id 1.1.1.6

exit

int lo 146
ospfv3 46 ipv4 area 0 
ospfv3 46 ipv6 area 0

int g0/0
ospfv3 46 ipv4 area 0 
ospfv3 46 ipv6 area 0

end

I issued the ipv6 unicast-routing command even though it was already issued with the address configurations. It can't hurt to issue it again, but forgetting to issue it early in the configurations can make troubleshooting problematic!

! R-2

conf t

ipv6 unicast-routing

router ospfv3 46

passive-interface lo 246

address-family ipv4 unicast
router-id 2.2.2.4

address-family ipv6 unicast
router-id 2.2.2.6

exit

int lo 246
ospfv3 46 ipv4 area 0 
ospfv3 46 ipv6 area 0

int g0/0
ospfv3 46 ipv4 area 0 
ospfv3 46 ipv6 area 0

end

After some time the following syslog messages appear that show us a FULL Adjacency has been achieved between R-1 and R-2:

R-2#
*Aug 26 10:04:12.457: %OSPFv3-5-ADJCHG: Process 46, IPv4, Nbr 2.2.2.4 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
*Aug 26 10:04:12.481: %OSPFv3-5-ADJCHG: Process 46, IPv6, Nbr 2.2.2.6 on GigabitEthernet0/0 from LOADING to FULL, Loading Done

R-2#
*Aug 26 10:04:12.381: %OSPFv3-5-ADJCHG: Process 46, IPv4, Nbr 1.1.1.4 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
*Aug 26 10:04:12.405: %OSPFv3-5-ADJCHG: Process 46, IPv6, Nbr 1.1.1.6 on GigabitEthernet0/0 from LOADING to FULL, Loading Done

Take a moment to make sure you're familiar with the above output. Notice that the IPv4 and IPv6 address families have unique RIDs.

Area 23

Requirements for Area 23:

  1. Configure Area 23 as a Stub Area.
  2. R-3:
    1. Create OSPFv3 router process 46.
    2. Create IPv4 and IPv6 address families and unique RIDS for them.
    3. Enable Passive Interface on the Loopback.
  3. Enable OSPFv3 router process 46 on Area 23 Loopbacks and physical interfaces.

To continue reading, please login or become a member for full access...