# OSPF & IPsec

**URL:** https://forum.networklessons.com/t/ospf-ipsec/13239
**Category:** OSPF
**Created:** [January 4, 2021, 9:21am UTC](https://forum.networklessons.com/t/ospf-ipsec/13239 "2021-01-04T09:21:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![brucey54](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/b/7cd45c/32.png) [@brucey54](https://forum.networklessons.com/u/brucey54)
#### Post date: [January 4, 2021, 9:21am UTC](https://forum.networklessons.com/t/ospf-ipsec/13239/1 "2021-01-04T09:21:52Z")

</div>

Hi everyone,

I have followed the following tutorial DMVPN Phase 2 OSPF Routing  
[https://networklessons.com/cisco/ccie-enterprise-infrastructuredmvpn-phase-2-ospf-routing](https://networklessons.com/cisco/ccie-enterprise-infrastructuredmvpn-phase-2-ospf-routing)

I would like to implement IPsec over OSPF do we have a tutorial for that?

I found this tutorial, would this work by replacing RIP with OSPF?

[https://networklessons.com/cisco/ccie-enterprise-infrastructuredmvpn-over-ipsec](https://networklessons.com/cisco/ccie-enterprise-infrastructuredmvpn-over-ipsec)

Any pointers much appreciated.

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [January 6, 2021, 6:48am UTC](https://forum.networklessons.com/t/ospf-ipsec/13239/2 "2021-01-06T06:48:10Z")

</div>

Hello Thomas

> [@brucey54](#):
>
> I would like to implement IPsec over OSPF do we have a tutorial for that?

It really depends on what you mean. Do you want to be able to run the OSPF routing protocol over a network topology where IPSec is implemented? This can be using DMVPN, GRE, or simply using a pure IPSec VPN. But there are some additional tweaking that you must do for it to work as by default, OSPF will not function over an IPSec link. Take a look at the following post for more details:

> [@OSPF and IPSec Tunnel](https://forum.networklessons.com/t/ospf-and-ipsec-tunnel/4784/2):
>
> Hello Andrew OSPF in its default configuration, will not work through a pure IPsec tunnel (without GRE etc). The reason for this is because OSPF uses multicast traffic to communicate between routers and a pure IPsec tunnel will not support multicast. This is why GRE is often used in conjunction with IPsec for OSPF (and other) implementations, because it is capable of transmitting multicast traffic. Another solution to implementing OSPF over an IPsec tunnel that doesn’t support multicast is…

In addition, take a look at the following lessons that include situations where OSPF is being run across links where IPSec is employed:  
[https://networklessons.com/cisco/ccie-enterprise-infrastructureencrypted-gre-tunnel-with-ipsec](https://networklessons.com/cisco/ccie-enterprise-infrastructureencrypted-gre-tunnel-with-ipsec)

> **[GRE over IPSec with Hub and Remote Sites](https://networklessons.com/miscellaneous/gre-ipsec-hub-remote-sites)**
>
> This lesson explains how to configure GRE over IPSEC with a Hub and Remote Sites on Cisco IOS.

> [@brucey54](#):
>
> I found this tutorial, would this work by replacing RIP with OSPF?

Yes, you could do that, because in essence, a DMVPN is a multipoint GRE tunnel, and GRE supports multicast, thus it supports OSPF. A pure IPSec tunnel such as that described in the following lesson would not function (as described in the post above.)  
[https://networklessons.com/cisco/ccie-enterprise-infrastructurecisco-ipsec-tunnel-mode-configuration](https://networklessons.com/cisco/ccie-enterprise-infrastructurecisco-ipsec-tunnel-mode-configuration)

I hope this has been helpful!

Laz
