Community discussions

MikroTik App
 
kiwitech
just joined
Topic Author
Posts: 9
Joined: Sat Jun 14, 2014 3:04 am

OSPF over SSTP Tunnel

Wed Oct 10, 2018 7:41 am

I recently started playing with using OSPF and getting it to work over our SSTP secure VPN.
The SSTP VPN is working just fine, but I wanted to be able to add routes dynamically instead of setting them statically each time we connect to the VPN.

I have used OSPF successfully in the past on different hardware, and between different hardware, Mikrotik, Cisco, Allied Telesis, etc. so didn't think I would have too much trouble with two Mikrotik routers.

Of course I looked to see if there were examples by those who may have already gone down this path, and found just what I was looking for here:
https://wiki.mikrotik.com/wiki/Manual:O ... interfaces

Ok, this hasn't been updated since 2010, so I am not sure when things have changed, but it is clear that the information in the configuration example is in need of updating.

So to begin, I ran up a pair of virtual RouterOS mahines and configured them as per the example, even using pppoe as per. Once the pppoe tunnel was up, I could ping backwards and forwards across both ether interfaces and pppoe interfaces.

I then added the pppoe interface addresses as directed into /routing ospf network and then monitored the /routing ospf neighbor expectantly waiting for something to show up.

Eventually I turned on OSPF logging, tore down the pppoe tunnel and re-established it, and nothing.

I even tried adding the ether ip addresses to /routing ospf network and still nothing.

It seems the issue is with using the host address rather than the network address, so I instead adjusted the network addresses on each end to 10.1.1.0/24, re-established the pppoe session and voila! I have neighbors :)

Taking this learning and set things up on the office vpn receiver, and my home vpn client, and once the SSTP was established, OSPF almost nearly worked, I just needed to add some filters to each firewall to allow OSPF protocol, and then watched as routes were exchanged and traffic started passing freely (or as expected) between the networks.

To clarify the example:
Client Router using OSPF over PPPoE
[admin@I] > /ip address p
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.0.0.133/24 10.0.0.0 10.0.0.255 ether1
1 D 10.1.1.254/32 10.1.1.1 0.0.0.0 pppoe-out1
[admin@I] > routing ospf network add network=10.1.1.254/24 area=backbone

Server Router using OSF over PPPoE
[admin@II] > /ip address p
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.0.0.134/24 10.0.0.0 10.0.0.255 ether1
1 D 10.1.1.1/32 10.1.1.254 0.0.0.0 <pppoe-atis>
[admin@II] > routing ospf network add network=10.1.1.1/24 area=backbone

And in my case the neighbor print was a little different, with both ends showing as in full state:
[admin@I] > routing ospf neighbor pr
router-id=10.1.1.2 address=10.1.1.254 priority=1 dr-address=0.0.0.0
backup-dr-address-id=0.0.0.0 state="Full" state-changes=5 ls-retransmits=0
ls-requests=0 db-summaries=0
router-id=10.1.1.1 address=10.1.1.1 priority=1 dr-address=0.0.0.0
backup-dr-address-id=0.0.0.0 state="Full" state-changes=5 ls-retransmits=0
ls-requests=0 db-summaries=0
[admin@I] >

So there you have it.
 
Muqatil
Trainer
Trainer
Posts: 573
Joined: Mon Mar 03, 2008 1:03 pm
Location: London - UK
Contact:

Re: OSPF over SSTP Tunnel

Wed Oct 10, 2018 2:16 pm

Have you tried to set the ospf interface to Unicast instead of Multicast? Try to set the ospf interface to PTMP. I don't think multicast packets are sent through SSTP tunnel

Who is online

Users browsing this forum: No registered users and 57 guests