Community discussions

MikroTik App
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

An Ipsec reserve for an IPIP

Wed Oct 07, 2015 5:13 pm

Hi all

manual (http://wiki.mikrotik.com/wiki/Manual:IP/IPsec) tell that a priority - Policy ordering classificator (signed integer). Larger number means higher priority.
Is it correct, considering than the general behaviour of priority is oppositely ?

And next question?

What kind a connection has a higher priority for a routing
IPSEC or IPIP ????
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Thu Oct 15, 2015 9:56 pm

bump
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 3175
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: An Ipsec reserve for an IPIP

Thu Oct 15, 2015 10:34 pm

about routing with ipsec trafic is routed toward wan

with ipip is routed as another interface
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Mon Oct 19, 2015 9:48 am

If I have one route using IPIP interface to 192.168.0.0/16 subnet and second route using IPSec to 192.168.0.0/16.

Which of route will be highest priority if metrics the same for both?

And in this case what should I do If general route has a metric : the least number - that the high priority on other hand an IPsec
policy route - the highest number - that the high priority. I see a paradox
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Wed Oct 21, 2015 1:26 pm

Please help
 
pe1chl
Forum Guru
Forum Guru
Posts: 10551
Joined: Mon Jun 08, 2015 12:09 pm

Re: An Ipsec reserve for an IPIP

Wed Oct 21, 2015 7:26 pm

It is not very clear to me what you want to ask and what problem you encounter.
But let me tell you that IPsec policies for tunnels cut in at a different place in the network than routing tables and relative priorities of routes.
So when you define an IPsec policy for those two subnets, that IPsec tunnel will be taken no matter what you do with routing.
The priorities of policies are only relative between IPsec policies, not relative to route priorities.

When you don't like that, setup an IP or GRE tunnel interface with IPsec secret, this will result in an IPsec policy for only GRE traffic between the external addresses of the routers. Then route the traffic for the subnets over that IP or GRE tunnel using normal routes or an autorouting protocol (like BGP).
Then, you can determine what to route using the normal route priorities.
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Wed Oct 21, 2015 10:56 pm

Ok. This is what I want.

I have a HQ with two ISPs(public ip addresses ) and I have a branch with one ISP ( cable and a public ip address ) and second ISP ( 3g modem and a DYNAMIC ip assress ) for a reserve.

I want that the branch, if no connect via the main connection ( cable ) switch to 3g modem. Can I reach this without scripting?

AND main problem is that 3g modem ISP has dynamic IP and Nat Traversal obviously I can't create GRE,IPIP or EoIP

IPSec Polices give me a possibility use a dynamic source ip but I can't understand when go a traffic if in the same time will be work both ISPs ( cabel's ISP and 3G ISP )
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Mon Oct 26, 2015 11:24 am

Bump

Help! I need sombody
Help! Not just anybody
Help! You know I need someone
Heeelp
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1770
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: An Ipsec reserve for an IPIP

Mon Oct 26, 2015 11:40 am

good song! but topic itself doesn't make any sense, at least to me.

Make a basic diagram of your network, explain the what would be ideal end result (what you are trying to achieve, and then describe the problem.

P.S. If you use latest version, IPIP tunnels now can have IPSec encryption on them, so maybe you can just use that)
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Mon Oct 26, 2015 2:15 pm

[img]Problem.jpg[/img]

Scheme of networks
You do not have the required permissions to view the files attached to this post.
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Mon Oct 26, 2015 2:20 pm

At the moment.

HQ
[ ISP1-HQ + ISP1-Branch ] - EoIP1-hq
[ ISP2-HQ + ISP1-Branch ] - EoIP2-hq
[ EoIP1-hq + EoIP2-hq ] - Bonding hq

Branch
[ ISP1-Branch + ISP1-HQ ] - EoIP1-branch
[ ISP1-Branch + ISP2-HQ ] - EoIP2-branch
[ EoIP1-branch + EoIP2-branch ] - Bonding branch


All works excelent !!!! BUT, if ISP1-Branch , what I should to do?
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Mon Oct 26, 2015 2:22 pm

How to implement a failover using ISP2-Branch and do not use a scripts
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1770
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: An Ipsec reserve for an IPIP

Mon Oct 26, 2015 2:41 pm

Bonding? EoIP? IPIP? IPsec? - why each time you write there are new set of features mentioned?

What is your task? Ensure connectivity? load-balancing?.

I would personally use policy routing based load balancing on both devices:
http://wiki.mikrotik.com/wiki/Manual:PC ... _Balancing
For all traffic that is leaving devices to internet.

Or do you need direct communications between private network devices?
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Mon Oct 26, 2015 4:23 pm

In this case I don't see a big difference between the ipip and the eoip connection.
Main question is if in the same time works bonding and ipsec ( in the shown case via 3g modem ) , what of these connections will get a highest priority ? On the branch side, obviously I have two routes (via bonding-branch and via ipsec throug 3g modem ) into the same network(192.168.0.0/24) but I don't understand where will flow the traffic, how mikrotik decides what of the connections use ? Because ipsec polices's routes not shown in a share routes table
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Mon Oct 26, 2015 4:26 pm

And yes, I need a direct communication between private networks
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Wed Oct 28, 2015 9:00 am

How the RouterOS decides, where to forward a traffic if exists two connections into a one subnet via an ipip and via a ipsec. ?
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Thu Nov 05, 2015 9:29 am

Answer :

IPSEC has highest priority than any other tunnels, ignoring main routing table
 
pe1chl
Forum Guru
Forum Guru
Posts: 10551
Joined: Mon Jun 08, 2015 12:09 pm

Re: An Ipsec reserve for an IPIP

Thu Nov 05, 2015 12:32 pm

Answer :

IPSEC has highest priority than any other tunnels, ignoring main routing table
That is what I wrote on October 21.
Maybe you should read more and post less!
 
andrace
newbie
Topic Author
Posts: 42
Joined: Sun Sep 21, 2014 8:41 am

Re: An Ipsec reserve for an IPIP

Fri Nov 06, 2015 8:49 am

Yes. I missed your post