I have successfully configured OSPF on all of our HP ProCurve 7102 routers, and most of our internal Linux routers. Routes get advertised, and all is peachy.

Except for the routes into the subnets handled by various OpenVPN services and other VPN connections around the company. Please consider the picture below, which shows a part of the company network:

enter image description here

The red arrows are VPN connections. The blue area at the bottom depicts OSPF area 0 (the backbone), which comprises routers in all other offices. The pink area depicts OSPF area 177 for one of our offices. The orange rectangle is the OpenVPN network in question, hosted on the Linux router indicated by the blue icon with the arrows.

The subnet is properly advertised to all other OSPF areas. However, despite the fact that network is included in the OSPF configuration, and interface tun0 is included in area 177(as a passive interface), this subnet does not get advertised.

Is that because this is actually an external route? If so, how would I tell the OSPF daemon to advertise that route?

2 Answers 2


The first thought that comes to mind is that you need to redistribute the kernel routes in addition to the connected routes in Quagga/Zebra OSPF. Because OpenVPN adds the routes itself, Zebra will not redistribute them if you only have 'redistribute static' in your configuration.

I am using OpenVPN in OSPF environments too, and everything redistributes just fine.

Note: you may need to add some redistribution list filters to prevent redistribution of other kernel routes that shouldn't be advertisted.

Another option is to add a static route in Zebra for the going to null or the loopback device.

  • Gotcha. I suspected that the answer was right in front of my face. Now, moving on to the two networks of 192.168.85.x and 172.23.x.y. These are VPN connections into the HP router, but since they are not connected to a GRE tunnel, the router doesn't actually have any routes for these in its own routing tables. It simply picks up the packets and matches then against the various IKE/IPSec policies. How would I publish these? Also manual routing?
    – wolfgangsz
    Jun 20, 2011 at 14:37

I found myself with a similar problem after a "get rid of kernel and static routes" orgy.

The solution for my case is to put the OpenVPN network in a different OSPF area and then use the neat trick of substituting the /32 prefix associated with the server's endpoint address to a /24 subnet prefix. e.g. is the OpenvVPN subnet on my FreeBSD 10.3-PRERELEASE OpenVPN server.

In openvpn.conf:

dev tun

When OpenVPN is started tun0 interface comes up with the following configuration:

munchkin# ifconfig tun0
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
    inet6 fe80::222:15ff:fe4b:7e10%tun0 prefixlen 64 scopeid 0x1c 
    inet --> netmask 0xffffffff 
    Opened by PID 2746

In ospfd.conf:

router ospf
network area
network area
area range substitute

OSPF then advertises instead of

N.B. This only works across an area boundary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.