IPv6 OSPFv3 on Cisco IOS Router

When we use OSPF for IPv4 we are using OSPFv2. OSPF has been updated for IPv6 and is now called OSPFv3. These are two different routing protocols and in this lesson I’ll show you how to configure OSPFv3 so that you can route IPv6 traffic. Here’s the topology we’ll use:

ipv6 routing two routers

 

Let’s start with the configuration of the interfaces and the IPv6 addresses. We don’t have to configure any global unicast IPv6 addresses on the FastEthernet interfaces because OSPFv3 uses link-local addresses for the neighbor adjacency and sending LSAs. Here’s the configuration:

R1(config)#ipv6 unicast-routing 
R1(config)#interface loopback 0
R1(config-if)#ipv6 address 2001::1/128
R2(config)#ipv6 unicast-routing 
R2(config)#interface loopback 0
R2(config-if)#ipv6 address 2001::2/128

Don’t forget to enable IPv6 unicast routing otherwise, no routing protocol will work for IPv6. Let’s check the interfaces:

R1#show ipv6 interface brief 
FastEthernet0/0            [up/up]
Loopback0                  [up/up]
    FE80::CE09:18FF:FE0E:0
    2001::1
R2#show ipv6 interface brief 
FastEthernet0/0            [up/up]
Loopback0                  [up/up]
    FE80::CE0A:18FF:FE0E:0
    2001::2

After configuring the IPv6 addresses on the loopback interface, you can see the global unicast and the link-local IPv6 addresses. There is no link-local address on the FastEthernet interfaces, however, so we’ll have to fix this:

R1(config)#interface fastEthernet 0/0
R1(config-if)#ipv6 enable
R2(config)#interface fastEthernet 0/0
R2(config-if)#ipv6 enable
R1#show ipv6 interface brief 
FastEthernet0/0            [up/up]
    FE80::CE09:18FF:FE0E:0
Loopback0                  [up/up]
    FE80::CE09:18FF:FE0E:0
    2001::1
R2#show ipv6 interface brief 
FastEthernet0/0            [up/up]
    FE80::CE0A:18FF:FE0E:0
Loopback0                  [up/up]
    FE80::CE0A:18FF:FE0E:0
    2001::2

Now we can configure OSPFv3:

R1(config)#ipv6 router ospf 1
R1(config-rtr)#router-id 1.1.1.1
R1(config-rtr)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#exit
R1(config)#interface loopback 0
R1(config-if)#ipv6 ospf 1 area 0
R2(config)#ipv6 router ospf 1
R2(config-rtr)#router-id 2.2.2.2
R2(config-rtr)#exit
R2(config)#interface fastEthernet 0/0
R2(config-if)#ipv6 ospf 1 area 0
R2(config-if)#exit 
R2(config)#interface loopback 0
R2(config-if)#ipv6 ospf 1 area 0

Just like OSPFv2, you need to start a process and specify a process ID. For OSPFv3, we have to use the ipv6 router ospf command. Just like EIGRP for IPv6, we need a router ID if we don’t have any IPv4 addresses configured on our router. Finally, go to the interface and use the ipv6 ospf area command to enable OSPFv3, and select the correct area. Let’s see if we have neighbors:

R1#show ipv6 ospf neighbor 

Neighbor ID  Pri   State           Dead Time   Interface ID    Interface
2.2.2.2       1   FULL/BDR        00:00:30    4               FastEthernet0/0
R2#show ipv6 ospf neighbor 

Neighbor ID   Pri   State           Dead Time   Interface ID    Interface
1.1.1.1       1   FULL/DR         00:00:39    4               FastEthernet0/0

Use show ipv6 ospf neighbor to see your neighbors. It’s funny to see the old IPv4 neighbor ID even though OSPFv3 is IPv6-only. Let’s check the routing tables:

R1#show ipv6 route ospf 
IPv6 Routing Table - 3 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
O   2001::2/128 [110/10]
     via FE80::C00F:1AFF:FEA7:0, FastEthernet0/0
R2#show ipv6 route ospf 
IPv6 Routing Table - 3 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
O   2001::1/128 [110/10]
     via FE80::C00E:1AFF:FEA7:0, FastEthernet0/0

In our routing table, we find the fresh OSPFv3 route. That’s it! This is a fairly simple example, but it should help you to get going with OSPFv3 for IPv6.

Configurations

Want to take a look for yourself? Here you will find the final configuration of each device.

R2

hostname R2
!
ipv6 unicast-routing 
!
interface loopback 0
 ipv6 address 2001::2/128
 ipv6 ospf 1 area 0
!
interface fastEthernet 0/0
 ipv6 enable
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 2.2.2.2
!
end

R1

hostname R1
!
ipv6 unicast-routing 
!
interface loopback 0
 ipv6 address 2001::1/128
 ipv6 ospf 1 area 0
!
interface fastEthernet 0/0
 ipv6 enable
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 1.1.1.1
!
end


If you have any questions, please leave a comment.

Tags:


Forum Replies

  1. Hi Rene,
    Do areas work the same way ON IPV6 as on OSPF v2?

  2. Hi Alfredo,

    The areas are still the same, basically OSPFv2 and OSPFv3 operate in the same way but there are some differences when it comes to LSAs, building the LSDB, addressing, etc.

    I’ll cover this in another lesson if you are interested.

    Rene

  3. Hey,
    Why we use global Unicast address? isn’t it public address? I understand when its local communication we can get away with link local address and when we require routing we use Global Unicast or Unique local, right? Can we use unique local address in above example instead of Global unicast? implied we are not going to route outside it is just going to be site and inter-site based routing, so in that case we can use Unique local?

    Thanks,
    AD

  4. Also, please show how to assign a unique local address?

    Thanks,

32 more replies! Ask a question or join the discussion by visiting our Community Forum