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 ???
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
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.
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 )
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