Open In App
Related Articles

Configuring OSPF For IPv6 – OSPFv3 in Cisco

Like Article
Save Article
Report issue

Prerequisites:  OSPF Implementation and Open Shortest Path First (OSPF) protocol States

Open Shortest Path First (OSPF) is a link-state routing protocol used to find the best path between the source and destination router using its own shortest path first). OSPF was developed by the Internet Engineering Task Force (IETF) as one of the Internal Gateway Protocols (IGP), i.e., a protocol aimed at moving packets within a large autonomous system or routing domain. . It is a network layer protocol that operates on protocol number 89 and uses the AD value 110. OSPF uses the multicast address for normal communication and for updates to the Designated Router (DR)/ Backup Designated Router (BDR).

OSPFv3 Features : 

The latest version of the OSPF protocol. It supports both IPv4 and IPv6 address families. its Protocol ID 89. Supports multiple instances on a link. New LSA types have been introduced to carry out IPv6 prefixes.

Includes a new link-state type field that is used to :

  • Determine the flooding scope of LSA
  • Handling of unknown LSA types

IPv6 Packet Format:

Router-ID must be set manually in the routing process always. Authentication has been removed as it is now performed via IPsec extension in IPv6 packet. IPv6 link-local addressing handles the inter-router communication. OSPFv3 link-state database (LSDB) creates the shortest path topology tree based on links instead of networks.

OSPFv3 Drawbacks:

  • No backward compatibility: OSPFv3 is not backward compatible with OSPFv2.
  • No neighbor authentication: performed via IPsec extension headers.
  • No implicit router-ID: You must manually configure the RID as the OSPFv3 uses the same algorithm as OSPFv2 for dynamically locating the Router-ID. If there are no IPv4 interfaces available, the Router-ID is set to & doesn’t allow OSPF adjacency to form.
  • NBMA networks: Neighbors are not automatically detected over Non-Broadcast Multiple Access (NBMA) interfaces. The neighbor must be manually specified using the link-local address using the following interface-level subcommand :
R1(config-if)# ipv6 ospf neighbor fe80::1

Link-State Advertisement Types in OSPFv3 : 

LSA typeCommon Name 
1Router LSA
2Network LSA 
3Inter-Area Prefix LSA
4Inter-Area Router LSA
5Autonomous System External LSA
8Link LSA
9Inter-Area-Prefix LSA

However, IP address information is advertised independently by two new LSA types:

  1. Intra-area prefix LSA
  2. Link-local LSA

Configuring OSPFv3:

Step1: Create the physical topology in GNS3 as shown in the image below :


Step 2: Enable IPv6 unicast routing on both routers in global configuration mode :

R1(config)#ipv6 unicast-routing
R2(config)#ipv6 unicast-routing

Step 3: Configure IPv6 address on the physical interface fast Ethernet 0/0 on both routers :

R1(config)#interface FastEthernet0/0
R1(config-if)#ipv6 address FE80::1 link-local
R1(config-if)#ipv6 address 2001:DB8:0:1::1/64
R1(config-if)#no shutdown
R2(config)#interface FastEthernet0/0
R2(config-if)#ipv6 address FE80::2 link-local
R2(config-if)#ipv6 address 2001:DB8:0:1::2/64
R2(config-if)#no shutdown

Step 4: Configure an IPv6 unicast address on the loopback interface of both routers using the ipv6 address/prefix-length :

R1(config)#interface loopback0
R1(config-if)#ipv6 address 2001:DB8::1/128
R2(config)#interface loopback0
R2(config-if)#ipv6 address 2001:DB8::2/128

Step 5 : Configuring the OSPFv3 process on both routers as follows :

  1. Starting an OSPFv3 process with the router ospfv3 <process-id> command 
  2. Defining the router-id with the command router-id <router-id>
  3. Enabling OSPFv3 on the interfaces with the interface level sub-command ospfv3 <process-id> ipv6 area <area-id>.
R1(config)#router ospfv3 1

R1(config)#interface FastEthernet0/0
R1(config-if)#ospfv3 1 ipv6 area 0
R1(config-if)#interface loopback0
R1(config-if)#ospfv3 1 ipv6 area 0
R2(config)#router ospfv3 1

R2(config)#interface FastEthernet0/0
R2(config-if)#ospfv3 1 ipv6 area 0
R2(config-if)#interface loopback0
R2(config-if)#ospfv3 1 ipv6 area 0

Step 6: Verifying OSPFv3 configuration on both routers :

R1#show ipv6 protocol


R2#show ipv6 protocol


Step 7: Verifying the connectivity through both routers : 

Now, try pinging R2’s loopback interface from R1 and vice versa :

R1#ping 2001:DB8::2/128


R2#ping 2001:DB8::1/128


Step 8: Checking the IPv6 routing table of both the routers and seeing the OSPF route entry :

  • The route entry with the prefix “O” specifies that the entry is of OSPF Infra
R1#show ipv6 route


R2#show ipv6 route


Last Updated : 28 Oct, 2022
Like Article
Save Article
Share your thoughts in the comments
Similar Reads