Routing IPv4 with OSPFv3 – IOS & JUNOS

So you thought that OSPFv3 was for IPv6 only? Well you’d be quite wrong :)

While OSPFv3 might’ve initially been developed to run IPv6, there was talk about it being able to do more than just IPv6. Why not use the same routing protocol for IPv4?

Well with address families now you can. As of IOS versions 15.1(3)S and 15.2(1)T and JUNOS version 9.2 you can now use OSPFv3 to route either or both IPv4 and IPv6. It also means that OSPFv3 shold be able to route other address families if needed in the future. Maybe multicast? Maybe something else?

Let’s take a look at both platforms and see how we get on.


When enabling OSPFv3 on 12.4T you had to type ‘ipv6 router ospf’ – This of course has to change as it’s no longer simply IPv6. This is the router version I’ll test on:

R4#sh ver
Cisco IOS Software, 7200 Software (C7200-SPSERVICESK9-M), Version 15.1(3)S4

R4(config)#router ospfv3 1
%OSPFv3: IPv6 routing not enabled

Ok, so even though I only want to run it for IPv4, I still need to enable IPv6. Why? More than likely due to the fact that OSPFv3 uses IPv6 for hellos and the like, but even then link-local IPv6 traffic works without ipv6 unicast-routing configured. But let’s play ball:

R4(config)#ipv6 unicast-routing
R4(config)#router ospfv3 1
R4(config-router)#address-family ipv4 unicast

So far so good. You’ll notice that you now configure the protocol directly under ‘router’ and not ‘ipv6 router’

R4(config-router-af)#int fa1/1
R4(config-if)#ospfv3 1 area 0 ipv4
% OSPFv3: No IPV6 enabled on this interface

Now it wants an IPv6 address, even though we are only routing IPv4. This is due to the fact that OSPFv3 needs a link-local address to use, of which it won’t have one until an address is configured:

R4(config-if)#ipv6 address 2001::4/64
R4(config-if)#ospfv3 1 area 0 ipv4

Oddly enough, I even needed a v6 address on my loopback in order to get that into OSPFv3.
I’ve now configured the same on a neighbour router so let’s see how it looks:

R4#show ospfv3 neighbor 

            OSPFv3 Router with ID ( (Process ID 1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface           1   FULL/DR         00:00:38    4               FastEthernet1/1

R4#sh ip route | beg Gate
Gateway of last resort is not set is subnetted, 1 subnets
O [110/1] via, 00:02:03, FastEthernet1/1 is subnetted, 1 subnets
C is directly connected, Loopback0 is variably subnetted, 2 subnets, 2 masks
C is directly connected, FastEthernet1/1
L is directly connected, FastEthernet1/1

R4#sh ip route
Routing entry for
  Known via "ospfv3 1", distance 110, metric 1, type intra area
  Last update from on FastEthernet1/1, 00:02:24 ago
  Routing Descriptor Blocks:
  *, from, 00:02:24 ago, via FastEthernet1/1
      Route metric is 1, traffic share count is 1

R4#sh ospfv3 database 

            OSPFv3 Router with ID ( (Process ID 1)

		Router Link States (Area 0)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits         315         0x80000004  0            1           None         314         0x80000002  0            1           None

		Net Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Rtr count         315         0x80000001  4          2

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

ADV Router       Age         Seq#        Link ID    Interface         1072        0x80000001  4          Fa1/1         319         0x80000001  4          Fa1/1

		Intra Area Prefix Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Ref-lstype  Ref-LSID         165         0x80000001  0          0x2001      0         315         0x80000001  4096       0x2002      4         201         0x80000001  0          0x2001      0

R4#ping source lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Packet sent with a source address of 
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/20/24 ms

One thing IOS does not yet have is a show ip route ospfv3. sh ip route ospf shows nothing as does show ipv6 route ospf.


JUNOS is a bit different. IPv6 routing is enabled ‘out the box’ and so I don’t actually need to enable it. Like IOS though I do need to configure an IPv6 address on the link in question. Again this will be because of the way that OSPFv3 speaks to it’s neighbours.
Let’s take a look at the code version:

[email protected]_JT> show version
Hostname: R4_JT
Model: m10
JUNOS Base OS boot [10.4R6.5]

Config wise:

[email protected]> show configuration interfaces fe-1/3/3.0
family inet {
family inet6 {
    address 2001::3/64;

[email protected]> show configuration interfaces lo0.0
family inet {

[email protected]> show configuration protocols ospf3
realm ipv4-unicast {
    area {
        interface fe-1/3/3.0;
        interface lo0.0;
area {
    interface fe-1/3/3.0;
    interface lo0.0;

Let’s have a look at how it went:

[email protected]> show ospf3 neighbor
ID               Interface              State     Pri   Dead          fe-1/3/3.0             Full      128     32
  Neighbor-address fe80::290:69ff:fe6c:28bf

[email protected]> show route

inet.0: 26 destinations, 31 routes (26 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both         *[OSPF/10] 00:11:10, metric 1
                    > to via fe-1/3/3.0
[email protected]> ping source rapid
PING ( 56 data bytes
--- ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.999/1.092/1.415/0.162 ms

The database is also very similar. I didn’t want to post it as it has a number of other routes in there not relevant to this post.
Out of interest, I don’t need to have a v6 address on my JUNOS loopback, even though I do with IOS.

So there you have it. The bigger question is WHY would you want to use OSPFv3 for IPv4? Well I wouldn’t do it anytime soon, but there most certainly are certain benefits. But those benefits will be left to another post :)

© 2009-2019 Darren O'Connor All Rights Reserved -- Copyright notice by Blog Copyright