<div dir="ltr"><div><div><div><div><div>I am having some difficulty getting my OSPF configuration to play nicely with OpenVPN tunnels on FreeBSD. I have a number of point-to-point tunnels between sites, with a BIRD instance running on each tunnel endpoint. Endpoint addresses for a tunnel use a logical /31. Initially, the BIRD instances would talk to each other, but the endpoint addresses were not advertised by OSPF, making them unreachable.<br>
<br></div>I remedied this by adding stubnet declarations (/32) for each of the tunnel endpoints. This has the effect of making all of my endpoint addresses reachable, but causes another issue. In this configuration, if I restart one of my OpenVPN tunnels, it fails to set addressing on the tunnel, because the host route already exists in the routing table (due to the stubnet).<br>
<br></div>I have attached my OSPF configuration below. Is there some better way of configuring this, to make my tunnel endpoints advertise properly without declaring them as stubnets?<br><br></div>Thanks!<br><br>protocol ospf {<br>
tick 2;<br> area 0 {<br> stub no;<br> stubnet <a href="http://10.70.0.3/32">10.70.0.3/32</a>;<br> stubnet <a href="http://172.26.26.5/32">172.26.26.5/32</a>;<br> stubnet <a href="http://1.2.3.221/32">1.2.3.221/32</a>;<br>
interface "re0" {<br> stub;<br> cost 100;<br> hello 2;<br> dead 10;<br> authentication cryptographic;<br> password "password";<br>
};<br> interface "tun*" {<br> type ptp;<br> hello 2;<br> dead 10;<br> authentication cryptographic;<br> password "password";<br> };<br>
};<br>}<br></div></div></div>