In the last article, we discussed and configured EIGRPv6 on our Cisco routers. We discovered that unlike EIGRP for IPv4 which can choose router IDs automatically, EIGRP for IPv6 may need a router ID to be configured manually (if there is no IPv4 address on the router). We also found that EIGRP for IPv6 needs to be brought up using the “no shut” command because by default it is in a shutdown state. In this article, we will be looking at OSPF for IPv6 also known as OSPFv3.
For this article, we will edit our network diagram (again) to include another router in site B as shown below:
At the moment, we have EIGRP configured on all our routers excluding RTR_B2. Basic configuration for RTR_B2 is as follows:
hostname RTR_B2 ! ipv6 unicast-routing ! interface FastEthernet0/0 no ip address ipv6 address FE80::3b0 link-local ipv6 address 2001:db8:1:b023::3/64 ! interface FastEthernet0/1 no ip address ipv6 address FE80::3b link-local ipv6 address 2001:db8:1:b012::3/64 !
Overview of OSPFv3
Like EIGRP for IPv6 which is similar to EIGRP for IPv4, OSPF for IPv6 (also called OSPFv3) is also similar to OSPF for IPv4 (OSPFv2). OSPFv3 is also a link-state protocol and still makes use of Link State Advertisements (LSAs). However, there are a few differences between OSPFv2 and OSPFv3 not just from a Cisco-implementation point of view, but also from a standards point of view. For example, there are new LSA types and also, some of the previous LSA types have been renamed.
OSPFv3 makes use of the following LSA types:
Router-LSAs: These are the equivalent of type 1 router-LSAs in OSPFv2. They now have an LS type value of 0x2001. Each router in an OSPF area will generate router-LSAs to describe the states of its interfaces. They are flooded only within an area.
Network-LSAs: They have an LS type value of 0x2002 and are generated only by the Designated Router (DR) to describe the routers on the network. They also have an area flooding scope.
Inter-Area-Prefix-LSAs: They are called type 3 summary-LSAs in OSPFv2 and are generated by Area Border Routers (ABRs). They are used to advertise inter-area routes. In OSPFv3, they have an LS type value of 0x2003 and have an area flooding scope.
Inter-Area-Router-LSAs: They are called type 4 summary-LSAs in OSPFv2 and are used to advertise the location of an Autonomous System Boundary Router (ASBR). They have an LS type value of 0x2004 also with an area flooding scope.
AS-External-LSAs: They are used to describe prefixes that are external to the AS e.g. redistributed routes. They are generated by ASBRs and they have an LS type value of 0x4005 with an AS flooding scope.
NSSA-LSAs: Similar in function to an AS-External-LSA except that it has an LS type value of 0x2007. They are generated by ASBRs within an NSSA and they have an area flooding scope.
Link-LSAs: This is one of the newly defined LSAs and it has an LS type value of 0x0008. These LSAs are generated by a router to inform other routers on the link about its link-local addresses and on-link prefixes. A DR will also use the link-LSA to advertise a collection of Options bits in the network-LSA.
Intra-Area-Prefix-LSAs: This is the 2nd newly defined LSA with an LS type value of 0x2009. They carry IPv6 prefix information associated with either a network-LSA or router-LSA. They have an area flooding scope.
While outlining the different LSA types, I have talked about “flooding scope”. In OSPFv3, the flooding scope of the LSA types is encoded in their LS type value. The LS type is made up of 16 bits as shown below:
The ‘U’ bit dictates how a router should handle an unknown LSA. A value of 0 means that the router should treat the unknown LSA as having a link-local scope flooding; while a value of 1 tells the router to store the LSA and flood it as if it understood it.
The S1 and S2 indicate the flooding scope of the LSA. The table below shows the different values and their corresponding flooding scope:
As you can see from the LSA types outlined above, most of them have an area flooding scope; one has a link-local scoping; and one has an AS flooding scope.
The LSA Function Code are between 1 and 9 corresponding to the last hexadecimal character is the LSA types described above.
Let’s get down to business with the configuration of OSPFv3 on our routers. We will replace our EIGRP configurations in site B with OSPFv3. The OSPF area diagram will be as shown below:
Like EIGRPv6 in Cisco routers, OSPFv3 is also enabled directly on interfaces using the ipv6 ospf area
. You may also need to configure a router ID under the ipv6 router ospf configuration just like we did for EIGRPv6 in the last article.
The configurations on the OSPF routers are as follows:
interface fa1/1 no ipv6 eigrp 10 no ipv6 summary-address eigrp 10 2001:DB8:1:A000::/52 ipv6 ospf 1 area 0 ! ipv6 router ospf 1 router-id 22.214.171.124
no ipv6 router eigrp 10 interface fa0/0 ipv6 address 2001:db8:1:b023::2/64 ipv6 ospf 1 area 1 no shut interface fa0/1 ipv6 ospf 1 area 0 interface lo0 ipv6 ospf 1 area 1 interface lo1 ipv6 ospf 1 area 1 interface lo2 ipv6 ospf 1 area 1 ! ipv6 router ospf 1 router-id 126.96.36.199
interface fa0/0 ipv6 ospf 1 area 1 interface fa0/1 ipv6 ospf 1 area 0 ! ipv6 router ospf 1 router-id 188.8.131.52
Note: Newer IOSs in the 15 series support address families in OSPFv3 meaning you can configure IPv4 and IPv6 address families on the router. These IOSs also support a different syntax for OSPFv3 configuration such as router ospfv3 instead of ipv6 router ospf.
Let’s look at a few show commands to verify our OSPFv3 implementation. The first one which is not OSPF specific is the routing table.
For OSPF specific show commands, we have show ipv6 ospf, show ipv6 ospf neighbor, show ipv6 ospf database and so on.
Although we have connectivity in the OSPF AS (Site B) and in the EIGRP AS (Site A), there is no connectivity between the two autonomous systems.
I suppose you are familiar with route redistribution from IPv4 days and it’s not any different in IPv6. I will redistribute EIGRPv6 routes into OSPFv3 and vice versa. This will be done on the CORE_RTR because it is the only one running the two protocols. The configuration is as follows:
ipv6 router eigrp 10 redistribute ospf 1 metric 1000 1 1 1 1 include-connected ! ipv6 router ospf 1 redistribute eigrp 10 include-connected
Notice that I have added the “include-connected” command in both redistribute statements so that the connected routes on the CORE_RTR can also be redistributed. If I don’t add this command, the 2001:db8:1:a012::/64 and 2001:db8:1:b012::/64 prefixes will not be redistributed.
Now I can ping RTR_A from RTR_B2.
In this article, we have discussed OSPFv3. We have seen that although OSPFv3 is quite similar to OSPFv2, there are certain changes to the protocol to accommodate the address length and general working of IPv6. We discussed the different LSA types along with their flooding scope. We also configured OSPFv3 on our Cisco routers. Finally, we configured route redistribution to make sure we have connectivity between sites.
It may be worth taking a deeper look into the workings of OSPF (v2 and v3) especially if you are going for the CCIE certification. I hope you have enjoyed reading this article and I look forward to the next article in the series.
References and further reading
IPv6 Configuration Guide, Cisco IOS Release 15.2M&T: http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipv6/configuration/15-2mt/ip6-15-2mt-book.html
RFC 5340: OSPF for IPv6: http://tools.ietf.org/html/rfc5340