Community discussions

 
esantos999
just joined
Topic Author
Posts: 18
Joined: Sat Apr 18, 2015 5:07 pm

IP Routes gateway becomes unreachable after PPTP connection restarts

Tue Dec 15, 2015 2:27 pm

Hi,

I have a lan-to-lan via PPTP setup on two CCR1009 running RouterOS 6.31. One of the CCR1009 is managed by me and the other one by another company.

I created some routes on IP | Routes to connect to the remote LAN and everything works fine. The problem is when the PPTP connection restarts the Gateway become unreachable and have to go to IP | Routes, open each of this routes and put the Gateway back to the PPTP interface.

Is there a way for the router dont loose the configuration each time the connection goes down?
 
User avatar
pukkita
Trainer
Trainer
Posts: 2982
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: IP Routes gateway becomes unreachable after PPTP connection restarts

Tue Dec 15, 2015 5:25 pm

First thing I would ask myself is why is the PPTP restarting?

Do these CCRs have latest firmware (3.27 as of this time)? I'd also keep both un the latest bugfix-only release, 6.32.3 right now:
What's new in 6.32.3 (2015-Oct-19 11:13):
*) ppp, pptp, l2tp, pppoe: fixed router dead locked if compression was enabled on link;
*) pptp,l 2tp, sstp, pppoe: do not send data packets before we have negotiated connection with other
side (happens on dial-on-demand interfaces), this brakes when connecting to other party servers;
*) pptp, l2tp, sstp - make it work when add-default-route & dial-on-demand both are enabled;
*) pptp, l2tp, sstp, pppoe clients - fixed problem where they failed to connect
at startup and only reboot helped;
Don't you get the same IP for the PPTP each time it reconnects?

An /ip print and /ip route print will help.

You could also set the PPTP interface directly as gateway when setting the routes, as it's a point to point link...
Simplicity is the Ultimate Sophistication - Da Vinci
Getting the most out of this forum
 
esantos999
just joined
Topic Author
Posts: 18
Joined: Sat Apr 18, 2015 5:07 pm

Re: IP Routes gateway becomes unreachable after PPTP connection restarts

Tue Dec 29, 2015 7:42 pm

The PPTP restarts every time we have an internet outage or if we have a power outage and the UPS dosen't work. The connection is initiated by the other router, which is not managed by me, so the PPTP interface is dynamic.

On the routes I've setup as gateway the PPTP interface. Here's the /ip route export
/ip route
add distance=1 dst-address=10.10.20.0/24 gateway=<pptp-lisboa>
add distance=1 dst-address=10.10.30.0/24 gateway=<pptp-lisboa>
add distance=1 dst-address=10.10.50.0/24 gateway=<pptp-lisboa>
add distance=1 dst-address=10.10.70.0/24 gateway=<pptp-lisboa>




I'm using RouterOS version 6.31
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: IP Routes gateway becomes unreachable after PPTP connection restarts

Tue Dec 29, 2015 10:22 pm

So your router is the PPtP server.....

Go into PPP > Secrets and edit the account for the remote site, and there is a field "Routes"
Add the remote LAN to this, e.g. 192.168.12.0/24 and this route will be created each time the account authenticates.
When given a spoon,
you should not cling to your fork.
The soup will get cold.
 
esantos999
just joined
Topic Author
Posts: 18
Joined: Sat Apr 18, 2015 5:07 pm

Re: IP Routes gateway becomes unreachable after PPTP connection restarts

Wed Dec 30, 2015 2:00 am

I have 4 LAN's that I need to access on the other end, as you can see in my previous post. How can I add the 4 LAN's in the route field?
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: IP Routes gateway becomes unreachable after PPTP connection restarts

Wed Dec 30, 2015 2:06 am

Well, there's another way to skin this cat.

(I'd first try specifying multiple routes in that route field, but if that fails, do this:)

Give the remote site a static remote IP address, and then create 4 static routes whose next hop is that static IP.

So if you set remote-address=192.168.255.254 (or whatever) in the secret, create as many static routes as you like, but with that IP as the next hop. You could even create a black hole route for 192.168.255.254/32 with a distance of 254 so that whenever the VPN is down, the remote networks are also routed to the black hole and not out your Internet connection.

Or - if the remote networks are all part of a contiguous supernet, route that supernet:
192.168.4.0/22 = 192.168.4.0 - 192.168.7.255

Or if you're really feeling froggy, enable OSPF on the VPN. ;)

[quote=esantos999"]
I have 4 LAN's that I need to access on the other end, as you can see in my previous post. How can I add the 4 LAN's in the route field?
[/quote]

EDIT: I've tested this in my lab, and you can specify multiple routes in the PPP secret - just put them in separated by commas. e.g.: 192.168.10.0/24,192.168.55.0/24,172.16.0.0/16
When given a spoon,
you should not cling to your fork.
The soup will get cold.
 
esantos999
just joined
Topic Author
Posts: 18
Joined: Sat Apr 18, 2015 5:07 pm

Re: IP Routes gateway becomes unreachable after PPTP connection restarts

Thu Feb 18, 2016 2:35 pm

It's working now!

This is what I've done: on secrets I assigned a static IP to the user in the Remote Address field, then on IP | Routes for each route I created before I set the Gateway with the IP I assigned on the secret.

The problem was that in the secret I had no static IP, and in Profile I was using a VPN_Pool of address in Remote Address . I was complicating a simple question :D

Thanks for all your support.
 
scampbell
Trainer
Trainer
Posts: 457
Joined: Thu Jun 22, 2006 5:20 am
Location: Wellington, NZ
Contact:

Re: IP Routes gateway becomes unreachable after PPTP connection restarts

Thu Feb 18, 2016 9:21 pm

I have 4 LAN's that I need to access on the other end, as you can see in my previous post. How can I add the 4 LAN's in the route field?
You can add multiple routes in the secret :-

/ppp secret
add name=changeme password=changeme routes=192.168.1.0/24,192.168.7.0/24,192.168.5.0/24,........
MTCNA, MTCWE, MTCRE, MTCTCE, MTCSE, MTCINE, Trainer
___________________
Mikrotik Distributor - New Zealand
http://www.campbell.co.nz

Who is online

Users browsing this forum: Baidu [Spider], MSN [Bot] and 88 guests