IPv6 OSPFv3 Default Route

Just like OSPF for IPv4, it is possible to advertise a default route in OSPFv3 for IPv6. In this lesson, I’ll show you how to do this.


We only need two routers for this example:

ipv6 r1 r2 loopback l0

R2 has a loopback interface with IPv6 address 2001:DB8:2:2::2/128. We won’t advertise this in OSPFv3 directly but will reach it from R1 with a default route that is advertised by R2.

First, we have to enable IPv6 routing:

R1 & R2
(config)#ipv6 unicast-routing 

Let’s configure some global unicast IPv6 addresses. We don’t need global unicast addresses for OSPFv3 but we will need them if we want to send a ping from R1 to R2’s loopback address.

R1(config)#interface GigabitEthernet 0/1
R1(config-if)#ipv6 address 2001:DB8:12:12::1/64
R2(config)#interface GigabitEthernet 0/1
R2(config-if)#ipv6 address 2001:DB8:12:12::2/64

R2(config)#interface loopback 0
R2(config-if)#ipv6 address 2001:DB8:2:2::2/128

Let’s enable OSPFv3 on R1:

R1(config)#ipv6 router ospf 1

R1(config)#interface GigabitEthernet 0/1
R1(config-if)#ipv6 ospf 1 area 0

We do the same thing on R2, but also include the default route:

R2(config)#ipv6 router ospf 1
R2(config-rtr)#default-information originate always

R2(config)#interface GigabitEthernet 0/1
R2(config-if)#ipv6 ospf 1 area 0

The default-information originate command is what advertises the default route, it’s the same command that OSPFv2 for IPv4 uses.

The always parameter is required if you don’t have a default route in your own local routing table. If R2 had a default route pointing to another router, then you can remove the always parameter.


Let’s verify our work. First, let’s make sure our two routers are OSPFv3 neighbors:

R1#show ipv6 ospf neighbor 

            OSPFv3 Router with ID ( (Process ID 1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface           1   FULL/BDR        00:00:34    3               GigabitEthernet0/1

This seems to be the case. Let’s check if R1 has learned a default route from R2:

R1#show ipv6 route ospf 

OE2 ::/0 [110/1], tag 1
     via FE80::F816:3EFF:FE06:2CB2, GigabitEthernet0/1

Above you can see the default route. Note that it is advertised as an OSPF external type 2 route with a default cost of 1. Let’s see if we can ping the loopback interface of R2:

R1#ping 2001:DB8:2:2::2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:DB8:2:2::2, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 3/6/18 ms

Our ping is working, which proves that our default route works.


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


hostname R1
ipv6 unicast-routing
ipv6 cef
interface GigabitEthernet0/1
 no ip address
 ipv6 address 2001:DB8:12:12::1/64
 ipv6 ospf 1 area 0
ipv6 router ospf 1


hostname R2
ipv6 unicast-routing
ipv6 cef
interface Loopback0
 no ip address
 ipv6 address 2001:DB8:2:2::2/128
interface GigabitEthernet0/1
 no ip address
 ipv6 address 2001:DB8:12:12::2/64
 ipv6 ospf 1 area 0
ipv6 router ospf 1
 default-information originate always


You have now learned how to configure an IPv6 OSPFv3 default route with the default-information originate command. Keep in mind you need the always parameter if you don’t have a default route in the routing table of the router that is going to advertise the default route. The default route type is an external type 2 with a cost of 1.

Tags: ,

Forum Replies

  1. Why do you have to activate OSPF on the interface? You don’t have to do this for IPv4.

  2. This question was originally posted by @maxturpin, I’m not sure why it has changed ownership. However, I will answer the question here.

    OSPFv3 has a different philosophy than OSPFv2 for IPv4. In IPv4, OSPF is enabled globally and the participating networks are added using the network command. OSPFv3 functions differently. You enable OSPF on the participating interface. in this way, you are indicating which subnets are participating (the subnet directly connected to the interface) and you are also indicating the area to which the interface belongs. This is

    ... Continue reading in our forum

  3. Hi Rene,
    What is signfinace of TAG value …I see it get changes in examples . For example ,in your document it is 1 and in my example it is 100

    R1#sh ipv6 route
    IPv6 Routing Table - default - 4 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 
    ... Continue reading in our forum

  4. Hi Vinod,

    Good question, I never really noticed it before. The answer is in the RFC:


    Inclusion of a forwarding address or external route tag in AS-external-LSAs is now optional. In addition, AS-external-LSAs can now reference another LSA, for inclusion of additional route attributes that are outside the scope of the OSPF protocol. For example, this reference could be used to attach BGP path attributes to external routes.

    The external route tag is present in the AS-external-LSA if and only if the AS-external-LSA’s bit T i

    ... Continue reading in our forum

  5. Hi Rene/Laz
    Could you explain this sentence: “We don’t need global unicast addresses for OSPFv3 but we will need them if we want to send a ping from R1 to R2’s loopback address”


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