Home > Articles > Certification > Cisco Certification > CCNP

  • Print
  • + Share This
This chapter is from the book

OSPFv3

OSPF is a widely used IGP in IPv4, IPv6, and dual-stack (IPv4/IPv6) environments. The OSPF upgrade to support IPv6 generated a number of significant changes to how the protocol behaves. Understanding the differences between OSPFv2 and OSPFv3 is required for the successful deployment and operation of an IPv6 network using OSPF for routing. This section describes OSPFv3, the IPv6-capable version of the OSPF routing protocol, including its operations, configuration, and commands.

Upon completing this section, you will be able to do the following:

  • Implement OSPFv3 in a dual-stack (IPv4/IPv6) environment
  • Configure external route summarization and load balancing in OSPFv3
  • Explain the limitations and where you need to be careful when configuring OSPFv3

Configuring OSPFv3

In this section, you will learn how to implement OSPFv3 in a dual-stack (IPv4/IPv6) environment. Using the IPv6 topology in Figure 3-35 for IPv6 and Figure 3-36 for IPv4, routers R2, R3, and R4 have been completely preconfigured. R1 has been preconfigured with the necessary IPv4/IPv6 addresses, but does not have any routing protocol configuration. On R1, we will first configure OSPFv3 for IPv6 in the traditional way, in which a dedicated OSPF process serves the IPv6 protocol. Then we will migrate the configuration to the newest configuration approach, in which a single OSPFv3 process serves both address families, IPv4 and IPv6.

Figure 3-35

Figure 3-35 IPv6 Topology OSPFv3

Figure 3-36

Figure 3-36 IPv4 Topology OSPFv3

Implementing OSPFv3

Example 3-67 shows R1 enabled for IPv6 unicast routing and starting an IPv6 OSPF router process with ID 1. R1 is configured with a router ID 1.1.1.1 and loopback 0 is as a passive interface.

Example 3-67 Enabling OSPFv3 on R1

R1(config)# ipv6 unicast-routing
R1(config)# ipv6 router ospf 1
R1(config-rtr)# router-id 1.1.1.1
R1(config-rtr)# passive-interface Loopback0

OSPFv3 is the IPv6-capable version of the OSPF routing protocol. It is a rewrite of the OSPF protocol to support IPv6, although the foundation remains the same as in IPv4 and OSPFv2. The OSPFv3 metric is still based on interface cost. The packet types and neighbor discovery mechanisms are the same in OSPFv3 as they are for OSPFv2. OSPFv3 also supports the same interface types, including broadcast, point-to-point, point-to-multipoint, NBMA, and virtual links. LSAs are still flooded throughout an OSPF domain, and many of the LSA types are the same, though a few have been renamed or newly created.

Cisco IOS routers offer two OSPF configuration methods for IPv6:

  • Using the traditional ipv6 router ospf global configuration command
  • Using the new-style router ospfv3 global configuration command

We will first examine the traditional configuration approach, and then migrate the configuration to the new style.

To start any IPv6 routing protocols, you need to enable IPv6 unicast routing using the ipv6 unicast-routing command. In the traditional configuration approach, the OSPFv3 and OSPFv2 processes run independently on a router. In the traditional way, the OSPF process for IPv6 is started using the ipv6 router ospf command.

The OSPF process for IPv6 does not require an IPv4 address to be configured on the router, but it does require a 32-bit value for the router ID, which uses IPv4 address notation. The router ID is defined using the router-id command. If the router ID is not specifically configured, the system will try to dynamically choose an ID from the currently active IPv4 addresses, using the same process as OSPFv2 does for IPv4. If there is no active IPv4 address, the process will fail to start.

In the ipv6 router ospf configuration mode, you can specify the passive interfaces (using the passive-interface command), enable summarization, and fine-tune the operation, but you do not enable the process on specific interfaces. There is no network command. To activate the OSPF process on required interfaces, you will need the ipv6 ospf command in the interface configuration mode.

In Example 3-68, R1 is enabled for the OSPF-for-IPv6 process on its active interfaces. Interface Loopback 0 and Ethernet 0/0 are assigned to area 0, Serial 2/0 to area 1, and Ethernet 0/1 to area 2. The exit interface command does not need to be used between interfaces. It is only used in this example to better illustrate that OSPF-for-IPv6 is enabled on each specific interface.

Example 3-68 Enabling OSPFv3 on the Interface

R1(config)# interface Loopback0
R1(config-if)# ipv6 ospf 1 area 0
R1(config-if)# exit
R1(config)# interface Ethernet0/0
R1(config-if)# ipv6 ospf 1 area 0
R1(config-if)# exit
R1(config)# interface Serial2/0
R1(config-if)# ipv6 ospf 1 area 1
R1(config-if)# exit
R1(config)# interface Ethernet0/1
R1(config-if)# ipv6 ospf 1 area 2
 %OSPFv3-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Ethernet0/0 from LOADING to FULL,
Loading Done
 %OSPFv3-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Ethernet0/1 from LOADING to FULL,
Loading Done

To enable the OSPF-for-IPv6 process on an interface and assign that interface to an area, use the ipv6 ospf ospf-process area area-id command in the interface configuration mode. To be able to enable OSPFv3 on an interface, the interface must be enabled for IPv6. This occurs when the interface is configured with a global unicast IPv6 address.

Example 3-69 examines R1’s OSPF adjacencies and routing table.

Example 3-69 R1’s Adjacencies and Routing Table

R1# show ipv6 ospf neighbor

            OSPFv3 Router with ID (1.1.1.1) (Process ID 1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
4.4.4.4           1   FULL/DR         00:00:37    3               Ethernet0/0
3.3.3.3           1   FULL/DR         00:00:35    4               Ethernet0/1
R1# show ipv6 route ospf
<Output omitted>
O   2001:DB8:0:33::/64 [110/11]
     via FE80::A8BB:CCFF:FE00:AD10, Ethernet0/1
O   2001:DB8:0:44::/64 [110/11]
     via FE80::A8BB:CCFF:FE00:AE00, Ethernet0/0

After enabling the OSPF process on IPv6 interfaces you can verify the adjacencies and the IPv6 routing table. You can selectively display the OSPF-populated part of the routing table if you use the show ipv6 route command with the ospf keyword.

Why is the OSPF adjacency with R2, via Serial2/0, not working? On NBMA interfaces, the NBMA network type is by default used in OSPF routing. On such links, at least one side needs to define the OSPF neighbor, similarly as in OSPFv2. The neighbor command in the IPv6 environment requires that the IPv6 link-local address is specified for the peer, instead of using an IPv6 global unicast address. The IPv6 link-local addresses start with the FE80 prefix. In this scenario, the link-local address of R2 is FE80::2.

Example 3-70 specifies the IPv6 neighbor, FE80::2, for OSPFv3 on the NBMA interface Serial 2/0.

Example 3-70 Specifying the Neighbor on an NBMA Interface

R1(config)# interface serial 2/0
R1(config-if)# ipv6 ospf neighbor FE80::2
 %OSPFv3-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial2/0 from LOADING to FULL, Loading
Done

OSPF adjacencies over NBMA links require that IPv6 connectivity for both the link-local and the global addresses is established. Depending on the transport network, this may require mapping of IPv6 addresses to Layer 2 circuit identifiers. In this scenario, R1 and R2 have been pre-configured with the necessary mappings. The relevant configuration on R1, including the neighbor address, is shown in Example 3-71:

Example 3-71 R1’s Partial Running-Config

R1# show running-config interface serial 2/0
Building configuration...

Current configuration : 404 bytes
!
interface Serial2/0
 ip address 172.16.12.1 255.255.255.252
 encapsulation frame-relay
 ipv6 address FE80::1 link-local
 ipv6 address 2001:DB8:0:12::1/64
 ipv6 ospf 1 area 1
 ipv6 ospf neighbor FE80::2
 serial restart-delay 0
 frame-relay map ip 172.16.12.2 102 broadcast
 frame-relay map ipv6 2001:DB8:0:12::2 102 broadcast
 frame-relay map ipv6 FE80::2 102 broadcast
 no frame-relay inverse-arp
end

Example 3-72 examines the IPv6 OSPF database on R1.

Example 3-72 R1’s OSPF LSDB

R1# show ipv6 ospf database

            OSPFv3 Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 0)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits
 1.1.1.1         854         0x80000003  0            1           B
 4.4.4.4         871         0x80000002  0            1           None

                Net Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Rtr count
 4.4.4.4         871         0x80000001  3          2

                Inter Area Prefix Link States (Area 0)

ADV Router       Age         Seq#        Prefix
 1.1.1.1         845         0x80000001  2001:DB8:0:12::/64
 1.1.1.1         845         0x80000001  2001:DB8:0:13::/64
 1.1.1.1         845         0x80000001  2001:DB8:0:33::/64
<Output omitted>

                Link (Type-8) Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Interface
 1.1.1.1         870         0x80000001  3          Et0/0
 4.4.4.4         1056        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         865         0x80000003  0          0x2001      0
 4.4.4.4         871         0x80000003  0          0x2001      0
 4.4.4.4         871         0x80000001  3072       0x2002      3

OSPFv3 (for IPv6) renames two LSA types and defines two additional LSA types that do not exist in OSPFv2 (for IPv4).

The two renamed LSA types are as follows:

  • Interarea prefix LSAs for ABRs (Type 3): Type 3 LSAs advertise internal networks to routers in other areas (interarea routes). Type 3 LSAs may represent a single network or a set of networks summarized into one advertisement. Only ABRs generate summary LSAs. In OSPF for IPv6, addresses for these LSAs are expressed as prefix/prefix length instead of address and mask. The default route is expressed as a prefix with length 0.
  • Interarea router LSAs for ASBRs (Type 4): Type 4 LSAs advertise the location of an ASBR. Routers that are trying to reach an external network use these advertisements to determine the best path to the next hop. ASBRs generate Type 4 LSAs.

The two new LSA types are as follows:

  • Link LSAs (Type 8): Type 8 LSAs have local-link flooding scope and are never flooded beyond the link with which they are associated. Link LSAs provide the link-local address of the router to all other routers attached to the link. They inform other routers attached to the link of a list of IPv6 prefixes to associate with the link. In addition, they allow the router to assert a collection of option bits to associate with the network LSA that will be originated for the link.
  • Intra-area prefix LSAs (Type 9): A router can originate multiple intra-area prefix LSAs for each router or transit network, each with a unique link-state ID. The link-state ID for each intra-area prefix LSA describes its association to either the router LSA or the network LSA. The link-state ID also contains prefixes for stub and transit networks.

Example 3-73 reexamines the OSPFv3 adjacencies and routing table on R1.

Example 3-73 R1’s OSPFv3 Adjacencies and Routing Table

R1# show ipv6 ospf neighbor

            OSPFv3 Router with ID (1.1.1.1) (Process ID 1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
4.4.4.4           1   FULL/DR         00:00:39    3               Ethernet0/0
2.2.2.2           1   FULL/DR         00:01:43    3               Serial2/0
3.3.3.3           1   FULL/DR         00:00:39    4               Ethernet0/1
R1# show ipv6 route ospf
<Output omitted>
O   2001:DB8:0:22::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:33::/64 [110/11]
     via FE80::A8BB:CCFF:FE00:AD10, Ethernet0/1
O   2001:DB8:0:44::/64 [110/11]
     via FE80::A8BB:CCFF:FE00:AE00, Ethernet0/0
O   2001:DB8:0:220::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:221::/64 [110/65]
     via FE80::2, Serial2/0
<Output omitted>

After enabling the OSPF on the NBMA interface, notice an additional adjacency across Serial 2/0 and multiple OSPF intra-area routes received via this interface.

OSPFv3 for IPv4 and IPv6

OSPFv3 does not only support exchange of IPv6 routes, but it also supports exchange of IPv4 routes.

The newest OSPFv3 configuration approach utilizes a single OSPFv3 process. It is capable of supporting IPv4 and IPv6 within a single OSPFv3 process. OSPFv3 builds a single database with LSAs that carry IPv4 and IPv6 information. The OSPF adjacencies are established separately for each address family. Settings that are specific to an address family (IPv4/IPv6) are configured inside that address family router configuration mode.

Running single OSPFv3 for both IPv4 and IPv6 is supported since Cisco IOS Software Release 15.1(3)S.

Example 3-74 shows R1’s configuration of an OSPFv3 process using the new configuration style (router ospfv3), using process number 1, OSPF router ID 1.1.1.1, and making the Loopback 0 interface passive.

Example 3-74 Configuring OSPFv3 Using the router ospfv3 Command

R1(config)# router ospfv3 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# passive-interface Loopback0

The new-style OSPFv3 process is enabled using the router ospfv3 process-number command. Within the OSPF process configuration mode, the OSPF process ID is defined (using the router-id ospf-process-ID command), the passive interfaces are set, and per-process OSPF behavior can be tuned.

Example 3-75 displays the OSPFv3 router configuration on R1 using the show running-config | section router command. The old-style OSPF router configuration (ipv6 router ospf) has disappeared and has been replaced by the new-style router ospfv3 with an address family sub-mode.

Example 3-75 R1’s OSPFv3 Configuration

R1# show running-config | section router
router ospfv3 1
 router-id 1.1.1.1
 !
 address-family ipv6 unicast
  passive-interface Loopback0
  router-id 1.1.1.1
 exit-address-family

The router ID is displayed in the router configuration mode that is valid globally for all address families.

The address-family ipv6 unicast has been automatically created on R1. Cisco IOS Software has parsed the previous old-style OSPFv3 configuration and found that the OSPF process was enabled only for IPv6. Consequently, when you chose the new-style configuration, the IPv6 address family has been instantiated and the IPv4 address family does not show in the configuration.

The passive-interface configuration is actually a setting that is valid per address family. You can have dissimilar settings for IPv4 and IPv4. Therefore this command has been placed in the address family submode.

Example 3-76 verifies R1’s OSPFv3 operation by verifying its adjacencies, routing table, and database. The OSPFv3 operation can be verified using the old-style commands (show ipv6 ospf neighbor, show ipv6 ospf database) or the new-style commands, such as show ospfv3 neighbor and show ospfv3 database.

Example 3-76 R1’s OSPFv3 Adjacencies, Routing Table, and LSDB

R1# show ospfv3 neighbor

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

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
4.4.4.4           1   FULL/DR         00:00:37    3               Ethernet0/0
2.2.2.2           1   FULL/DR         00:01:44    3               Serial2/0
3.3.3.3           1   FULL/DR         00:00:35    4               Ethernet0/1
R1# show ipv6 route ospf
IPv6 Routing Table - default - 28 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
       H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
       IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
       ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
       O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2, l - LISP
O   2001:DB8:0:22::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:33::/64 [110/11]
     via FE80::A8BB:CCFF:FE00:AD10, Ethernet0/1
O   2001:DB8:0:44::/64 [110/11]
     via FE80::A8BB:CCFF:FE00:AE00, Ethernet0/0
O   2001:DB8:0:220::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:221::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:222::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:223::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:224::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:225::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:226::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:227::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:228::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:229::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:22A::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:22B::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:22C::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:22D::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:22E::/64 [110/65]
     via FE80::2, Serial2/0
O   2001:DB8:0:22F::/64 [110/65]
     via FE80::2, Serial2/0
R1# show ospfv3 database

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

                Router Link States (Area 0)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits
 1.1.1.1         793         0x80000006  0            1           B
 4.4.4.4         135         0x8000000D  0            1           None

                Net Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Rtr count
 4.4.4.4         379         0x80000006  3          2

                Inter Area Prefix Link States (Area 0)

ADV Router       Age         Seq#        Prefix
 1.1.1.1         301         0x80000006  2001:DB8:0:12::/64
 1.1.1.1         301         0x80000006  2001:DB8:0:33::/64
 1.1.1.1         301         0x80000006  2001:DB8:0:13::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:220::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:221::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:222::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:223::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:224::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:225::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:226::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:227::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:228::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:229::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22A::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22B::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22C::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22D::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22E::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22F::/64

                Link (Type-8) Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Interface
 1.1.1.1         793         0x80000006  3          Et0/0
 4.4.4.4         135         0x8000000B  3          Et0/0

                Intra Area Prefix Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Ref-lstype  Ref-LSID
 1.1.1.1         793         0x80000006  0          0x2001      0
 4.4.4.4         379         0x8000000F  0          0x2001      0
 4.4.4.4         379         0x80000006  3072       0x2002      3

                Router Link States (Area 1)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits
 1.1.1.1         793         0x80000007  0            1           B
 2.2.2.2         1464        0x80000029  0            1           None

                Net Link States (Area 1)

ADV Router       Age         Seq#        Link ID    Rtr count
 2.2.2.2         1464        0x80000004  3          2

                Inter Area Prefix Link States (Area 1)

ADV Router       Age         Seq#        Prefix
 1.1.1.1         301         0x80000006  2001:DB8:0:33::/64
 1.1.1.1         301         0x80000006  2001:DB8:0:13::/64
 1.1.1.1         301         0x80000006  2001:DB8:0:11::1/128
 1.1.1.1         301         0x80000006  2001:DB8:0:44::/64
 1.1.1.1         301         0x80000006  2001:DB8:0:14::/64

                Link (Type-8) Link States (Area 1)

ADV Router       Age         Seq#        Link ID    Interface
 1.1.1.1         793         0x80000006  11         Se2/0
 2.2.2.2         1962        0x80000029  3          Se2/0

                Intra Area Prefix Link States (Area 1)

ADV Router       Age         Seq#        Link ID    Ref-lstype  Ref-LSID
 2.2.2.2         1464        0x80000040  0          0x2001      0
 2.2.2.2         1464        0x80000004  3072       0x2002      3

                Router Link States (Area 2)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits
 1.1.1.1         793        0x80000006       0            1           B
 3.3.3.3        1901        0x8000002B       0            1           None

                Net Link States (Area 2)

ADV Router       Age         Seq#        Link ID    Rtr count
 3.3.3.3        376         0x80000006  4          2

                Inter Area Prefix Link States (Area 2)

ADV Router       Age         Seq#        Prefix
 1.1.1.1         301         0x80000006  2001:DB8:0:12::/64
 1.1.1.1         301         0x80000006  2001:DB8:0:11::1/128
 1.1.1.1         301         0x80000006  2001:DB8:0:44::/64
 1.1.1.1         301         0x80000006  2001:DB8:0:14::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:220::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:221::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:222::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:223::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:224::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:225::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:226::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:227::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:228::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:229::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22A::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22B::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22C::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22D::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22E::/64
 1.1.1.1         1301        0x80000004  2001:DB8:0:22F::/64

                Link (Type-8) Link States (Area 2)

ADV Router       Age         Seq#        Link ID    Interface
 1.1.1.1         793         0x80000006  4          Et0/1
 3.3.3.3        1901        0x80000028  4          Et0/1

                Intra Area Prefix Link States (Area 2)

ADV Router       Age        Seq#        Link ID    Ref-lstype  Ref-LSID
 3.3.3.3         376        0x8000002B       0         0x2001         0
 3.3.3.3         376        0x80000006    4096         0x2002         4

Despite the change of the OSPFv3 configuration to the new-style approach, the OSPF connectivity has been retained. In fact, R1 now uses a mixed configuration: new-style process configuration, and old-style interface commands. Example 3-77 shows the old-style interface commands.

Example 3-77 OSPFv3 Old-Style OSPF Configuration Commands

interface Loopback0
 ipv6 ospf 1 area 0
!
interface Ethernet0/0
 ipv6 ospf 1 area 0
!
interface Ethernet0/1
 ipv6 ospf 1 area 2
!
interface Serial2/0
 ipv6 ospf 1 area 1
 ipv6 ospf neighbor FE80::2

In Example 3-78, R1 is enabled using the OSPFv3 IPv6 address family on the active interfaces using the new-style configuration approach. Once again, the exit interface command is not needed but used make the configuration clearer.

Example 3-78 OSPFv3 New-Style OSPF Configuration Commands

R1(config)# interface Loopback 0
R1(config-if)# ospfv3 1 ipv6 area 0
R1(config-if)# exit
R1(config)# interface Ethernet 0/0
R1(config-if)# ospfv3 1 ipv6 area 0
R1(config-if)# exit
R1(config)# interface Serial 2/0
R1(config-if)# ospfv3 1 ipv6 area 1
R1(config-if)# exit
R1(config)# interface Ethernet 0/1
R1(config-if)# ospfv3 1 ipv6 area 2

The preferred interface mode command for the new style OSPFv3 configuration is the ospfv3 process-id {ipv4|ipv6} area area-id command. It allows you to selectively activate the OSPFv3 process for an address family (IPv4 or IPv6) on a given interface.

With the OSPFv3 address families feature, you may have two device processes per interface, but only one process per AF. If the IPv4 AF is used, an IPv4 address must first be configured on the interface. For IPv6 AF it is enough, if only IPv6 is enabled on the interface, as OSPFv3 uses link-local addresses. A single IPv4 or IPv6 OSPFv3 process running multiple instances on the same interface is not supported.

Example 3-79 verifies the resulting configuration and operation on R1. The interface configuration can be viewed using the show running-config interface command. The include keyword can be used to display only the interface commands that include a certain information.

Example 3-79 Verifying OSPFv3 Configuration and Operation on R1

R1# show running-config interface Loopback 0 | include ospf
 ospfv3 1 ipv6 area 0
R1# show running-config interface Ethernet 0/0 | include ospf
 ospfv3 1 ipv6 area 0
R1# show running-config interface Serial 2/0 | include ospf
 ospfv3 1 ipv6 area 1
 ospfv3 1 ipv6 neighbor FE80::2
R1# show running-config interface Ethernet 0/1 | include ospf
 ospfv3 1 ipv6 area 2
R1# show ospfv3 neighbor
          OSPFv3 1 address-family ipv6 (router-id 1.1.1.1)
Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
4.4.4.4           1   FULL/DR         00:00:32    3               Ethernet0/0
2.2.2.2           1   FULL/DR         00:01:48    3               Serial2/0
3.3.3.3           1   FULL/DR         00:00:31    4               Ethernet0/1

The configuration on R1 shows that the new-style interface-mode commands have replaced the old-style (ipv6 ospf) commands. The configuration of the NBMA interface (Serial 2/0) shows that the neighbor commands has been automatically updated with the ospfv3 process-id ipv6 neighbor command.

The OSPF operation has not been affected. The OSPFv3 adjacencies, database, and routing table are functional.

Example 3-80 shows R1 enabled the OSPFv3 process enabled for IPv4 and the Loopback 0 interface is configured as passive. To activate OSPFv3 for IPv4, you need to configure the ospfv3 process-number ipv4 area area-id command in the configuration mode of the desired interface.

Example 3-80 Enabling OSPFv3 for IPv4

R1(config)# interface Loopback0
R1(config-if)# ospfv3 1 ipv4 area 0
R1(config-if)# exit
R1(config)# interface Ethernet0/0
R1(config-if)# ospfv3 1 ipv4 area 0
R1(config-if)# exit
R1(config)# interface Ethernet0/1
R1(config-if)# ospfv3 1 ipv4 area 2
R1(config)# exit
R1(config-if)# interface Serial2/0
R1(config-if)# ospfv3 1 ipv4 area 1
R1(config-if)# ospfv3 1 ipv4 neighbor FE80::2
R1(config-if)# exit
R1(config)# router ospfv3 1
R1(config-router)# address-family ipv4 unicast
R1(config-router-af)# passive-interface Loopback0
%OSPFv3-5-ADJCHG: Process 1, IPv4, Nbr 0.0.0.0 on Serial2/0 from ATTEMPT to DOWN,
Neighbor Down: Interface down or detached
%OSPFv3-5-ADJCHG: Process 1, IPv4, Nbr 3.3.3.3 on Ethernet0/1 from LOADING to FULL,
Loading Done
%OSPFv3-5-ADJCHG: Process 1, IPv4, Nbr 4.4.4.4 on Ethernet0/0 from LOADING to FULL,
Loading Done

This way some (or all) of the links can be enabled for IPv4 forwarding and be configured with IPv4 addresses. For example, pockets of IPv4-only devices may exist around the edges running an IPv4 static or dynamic routing protocol. In that scenario, you could forward IPv4 or IPv6 traffic between these pockets. The transit device needs both IPv4 and IPv6 forwarding stacks (that is, a dual stack).

This feature allows a separate (possibly incongruent) topology to be constructed for the IPv4 address family. It installs IPv4 routes in the IPv4 RIB, and then the forwarding occurs natively. The OSPFv3 process fully supports an IPv4 AF topology and can redistribute routes from and into any other IPv4 routing protocol.

An OSPFv3 process can be configured to be IPv4 or IPv6. The address-family command is used to determine which AF will run in the OSPFv3 process. Once the address family is selected, you can enable multiple instances on a link and enable address–family-specific commands.

On the NBMA links, such as the interface Serial 2/0 in this scenario, you need to define the OSPF neighbor. In the new-style OSPFv3 you must configure the IPv6 link-local address of the peer as the OSPF neighbor. Both address families use IPv6 as the underlying transport.

Example 3-81 examines R1’s OSPFv3 adjacencies. The OSPF adjacencies can be displayed using the show ospfv3 neighbor command for both address families.

Example 3-81 R1’s OSPFv3 Adjacencies for Both IPv4 and IPv6 Address Families

R1# show ospfv3 neighbor

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

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
4.4.4.4           1   FULL/DR         00:00:34    3               Ethernet0/0
2.2.2.2           1   FULL/DR         00:01:38    3               Serial2/0
3.3.3.3           1   FULL/DR         00:00:36    4               Ethernet0/1

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

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
4.4.4.4           1   FULL/DR         00:00:35    3               Ethernet0/0
2.2.2.2           1   FULL/DR         00:01:58    3               Serial2/0
3.3.3.3           1   FULL/DR         00:00:34    4               Ethernet0/1

In Example 3-82, R1’s IPv4 routing table is displayed computed from the OSPFv3 database. The IPv4 routing table, computed from the OSPFv3 database, can be displayed using the show ip route ospfv3 command. The ospfv3 keyword filters the content of the routing table and displays only the OSPFv3 routes.

Note that command show ip route ospf will not show any routes.

Example 3-82 R1’s IPv4 Routing Table with OSPFv3 Routes

R1# show ip route ospfv3
<Output omitted>

      192.168.2.0/32 is subnetted, 1 subnets
O        192.168.2.2 [110/64] via 172.16.12.2, 00:27:49, Serial2/0
      192.168.3.0/32 is subnetted, 1 subnets
O        192.168.3.3 [110/10] via 172.16.13.2, 00:30:08, Ethernet0/1
      192.168.4.0/32 is subnetted, 1 subnets
O        192.168.4.4 [110/10] via 172.16.14.4, 00:30:08, Ethernet0/0

The OSPFv3 database for R1 is examined in Example 3-83. A router maintains a single OSPFv3 database, which contains various LSAs. Some LSAs carry IPv4-related information, others carry IPv6-related information, and others carry mixed information. You have to examine specific LSA types to see which address family is described by a given LSA.

Note that old-style verification commands like show ip ospf database will not show any information.

Example 3-83 R1’s OSPFv3 LSDB

R1# show ospfv3 database inter-area prefix
          OSPFv3 1 address-family ipv4 (router-id 1.1.1.1)
                Inter Area Prefix Link States (Area 0)
  LS Type: Inter Area Prefix Links
  Advertising Router: 1.1.1.1
 <Output omitted>
  Prefix Address: 172.16.12.0
  Prefix Length: 30, Options: None
 <Output omitted>

         OSPFv3 1 address-family ipv6 (router-id 1.1.1.1)
                Inter Area Prefix Link States (Area 0)
  LS Type: Inter Area Prefix Links
  Advertising Router: 1.1.1.1
 <Output omitted>
  Prefix Address: 2001:DB8:0:12::
  Prefix Length: 64, Options: None
 <Output omitted>

Example 3-84 shows the IPv6 routing tables for R3 and R4. Configuring the areas using one of the stub options can help reduce the size of the routing tables.

Example 3-84 OSPFv3 Routes in the Routing Tables of R3 and R4

R3# show ipv6 route ospf
<Output omitted>
OI  2001:DB8:0:11::1/128 [110/10]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:12::/64 [110/74]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:14::/64 [110/20]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:22::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:44::/64 [110/21]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:220::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:221::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:222::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:223::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:224::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:225::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:226::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:227::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:228::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:229::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:22A::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:22B::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:22C::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:22D::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:22E::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
OI  2001:DB8:0:22F::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
R4# show ipv6 route ospf
<Output omitted>
O   2001:DB8:0:11::1/128 [110/10]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:12::/64 [110/74]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:13::/64 [110/20]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:22::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:33::/64 [110/21]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:220::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:221::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:222::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:223::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:224::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:225::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:226::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:227::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:228::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:229::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:22A::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:22B::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:22C::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:22D::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:22E::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:22F::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0

When you display the IPv6 routing tables on R3 and R4, you will see numerous OSPF interarea routes. Making the nonbackbone area 2 a stub area can reduce the size of the R3 routing table. Summarizing the interarea routes on the area border router can reduce R4’s routing table in area 0.

In Example 3-85, ABR R1 and area 2 router R3 are configured to act as a totally stubby area for IPv6.

Example 3-85 Area 2 Routers Configured as a Totally Stubby Area

R1(config)# router ospfv3 1
R1(config-router)# address-family ipv6 unicast
R1(config-router-af)# area 2 stub no-summary
%OSPFv3-5-ADJCHG: Process 1, IPv6, Nbr 3.3.3.3 on Ethernet0/1 from FULL to DOWN,
Neighbor Down: Adjacency forced to reset
R3(config)# router ospfv3 1
R3(config-router)# address-family ipv6 unicast
R3(config-router-af)# area 2 stub
%OSPFv3-5-ADJCHG: Process 1, IPv6, Nbr 1.1.1.1 on Ethernet0/1 from LOADING to FULL,
Loading Done

Features specific to an address family are configured for the given address family. The stubbiness or total stubbiness of an area, for example, could be enabled individually for IPv4, IPv6, or both. In this scenario, area 2 is configured as a stub area for the IPv6 address family.

OSPF uses a stub feature flag in the Hello packets. This flag must match between the neighbors for the adjacency to be established. The flag is exchanged individually for each address family. This example illustrates how the adjacency fails if only one side has the area configured as stub, and then succeeds when both R1 and R3 have matching configuration.

The IPv6 and IPv4 routing in area 2 is verified by examining the routing table of R3 in Example 3-86.

Example 3-86 Examining the Differences Between R3’s IPv4 and IPv6 Routing Tables

R3# show ipv6 route ospf
<Output omitted>
OI  ::/0 [110/11]
     via FE80::A8BB:CCFF:FE00:AB10, Ethernet0/1
R3# show ip route ospfv3
<Output omitted>
O IA     172.16.12.0/30 [110/74] via 172.16.13.1, 00:09:55, Ethernet0/1
O IA     172.16.14.0/25 [110/20] via 172.16.13.1, 00:09:55, Ethernet0/1
      192.168.1.0/32 is subnetted, 1 subnets
O IA     192.168.1.1 [110/10] via 172.16.13.1, 00:09:55, Ethernet0/1
      192.168.2.0/32 is subnetted, 1 subnets
O IA     192.168.2.2 [110/74] via 172.16.13.1, 00:09:55, Ethernet0/1
      192.168.4.0/32 is subnetted, 1 subnets
O IA     192.168.4.4 [110/20] via 172.16.13.1, 00:09:55, Ethernet0/1

When viewing the OSPF routing table for IPv4 and IPv6, notice the difference in the area 2 operations between the two address families. Area 2 acts as a standard area for IPv4 and therefore you see all external and interarea routes received via the backbone area. Area acts as a totally stubby area for IPv6. Therefore you see a default route toward the ABR.

Example 3-87 summarizes the IPv6 networks advertised by R2 (2001:DB8:0:220::/64 to 2001:DB8:0:22F::/64) using the smallest possible address block.

Example 3-87 Summarizing an IPv6 Address Block on R1

R1(config)# router ospfv3 1
R1(config-router)# address-family ipv6 unicast
R1(config-router-af)# area 1 range 2001:DB8:0:220::/60

Like in IPv4, OSPFv3 supports IPv6 address summarization. Interarea routes can be summarized on area border routers using the area area-id range command in the desired address family mode. In this scenario, a set of IPv6 network addresses are summarized using the address block 2001:DB8:0:220::/60.

Although not demonstrated in these examples, you can summarize external routes on the ASBRs. To perform such summarization for IPv6, you would use the summary-prefix command in the IPv4 address family router configuration mode.

Example 3-88 verifies the IPv6 summarization effects in the backbone area by viewing the IPv6 routing table on the backbone router R4. R4 contains the summary address 2001:DB8:0:220::/60 instead of the individual smaller networks.

Example 3-88 OSPF Routes in R1’s Routing Table

R4# show ipv6 route ospf
<Output omitted>
O   2001:DB8:0:11::1/128 [110/10]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:12::/64 [110/74]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:13::/64 [110/20]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:22::/64 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:33::/64 [110/21]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0
OI  2001:DB8:0:220::/60 [110/75]
     via FE80::A8BB:CCFF:FE00:AB00, Ethernet0/0

Configuring Advanced OSPFv3

OSPFv3 offers you a set of tools that is very similar to that of OSPFv2 to fine-tune the OSPFv3 functionality.

Networks on the ASBR can be summarized during redistribution into OSPFv3. To configure an IPv6 summary prefix in Open Shortest Path First Version 3 (OSPFv3), use the following command in OSPFv3 router configuration mode, IPv6 address family configuration mode, or IPv4 address family configuration mode:

summary-prefix prefix [ not-advertise | tag tag-value ] [ nssa-only]

To restore the default, use the no form of this command. Table 3-8 describes the command parameters.

Table 3-8 Parameters for summary-prefix Command

Parameter

Description

prefix

IPv6 route prefix for the destination.

not-advertise

(Optional) Suppresses routes that match the specified prefix and mask pair. This keyword applies to OSPFv3 only.

tag tag-value

(Optional) Specifies the tag value that can be used as a match value for controlling redistribution via route maps. This keyword applies to OSPFv3 only.

nssa-only

(Optional) Limits the scope of the prefix to the area. Sets the NSSA-only attribute for the summary route (if any) generated for the specified prefix.

Example 3-89 shows a sample configuration. Redistribution is discussed in Chapter 4.

Example 3-89 Configuring the summary-prefix Command on an ASBR

Router(config)# router ospfv3 1
Router(config-router)# address-family ipv6 unicast
Router(config-router-af)# summary-prefix 2001:db8:1::/56

Load-balancing behavior can also be controlled on OSPFv3 routers. To control the maximum number of equal-cost routes that a process for OSPFv3 routing can support, use the maximum-paths command in IPv6 or IPv4 address family configuration mode, shown in Example 3-90. The range in OSPFv3 is from 1 through 64.

Example 3-90 maximum-paths Command Configured in Address Family Mode

Router(config)# router ospfv3 1
Router(config-router)# address-family ipv6 unicast
Router(config-router-af)# maximum-paths 8

OSPFv3 Caveats

The OSPF processes: traditional OSPFv2, traditional OSPFv3, and new OSPFv3 that uses the address families to supports both IP stacks, differ in the transport protocols.

The traditional OSPFv2 method, configured with the router ospf command, uses IPv4 as the transport mechanism. The traditional OSPFv3 method, configured with the ipv6 router ospf command, uses IPv6 as the transport protocol. The new OSPFv3 framework, configured with the router ospfv3 command, uses IPv6 as the transport mechanism for both address families. Therefore, it will not peer with routers running the traditional OSPFv2 protocol.

The OSPFv3 address families feature is supported as of Cisco IOS Release 15.1(3)S and Cisco IOS Release 15.2(1)T. Cisco devices that run software older than these releases and third-party devices will not form neighbor relationships with devices running the address family feature for the IPv4 address family because they do not set the address family bit. Therefore, those devices will not participate in the IPv4 address family SPF calculations and will not install the IPv4 OSPFv3 routes in the IPv6 Routing Information Base (RIB).

  • + Share This
  • 🔖 Save To Your Account