Community discussions

MikroTik App
 
tawh
just joined
Topic Author
Posts: 17
Joined: Sun Jun 30, 2013 2:11 pm

Way to solve mark-routing issue with custom route.

Thu Apr 23, 2015 11:12 am

Under dual WAN (say ISP1, ISP2) situation, I followed the PCC approach to make use of "mark-routing" for connection load balancing.
http://wiki.mikrotik.com/wiki/Manual:PCC

I understand that "mark-routing" action should be done in "prerouting" mangle rule, which is a packet flow stage just before the "routing decision". http://wiki.mikrotik.com/wiki/Manual:Packet_Flow_v6

The problem is, I have an OSPF injected route, say
220.123.45.0/24 route to "IP address A"
But under PCC mechanism, I have no choice but mark the connection to either ISP1 or ISP2 according to the calculated PCC. Which turn out that the connection route to either ISP1 or ISP2 interface but not "IP Address A" as the routing table of both ISP1 and ISP2 only contain a default route (0.0.0.0/0).

I understand that I can use routing filter (http://wiki.mikrotik.com/wiki/Manual:Ro ... ng_filters) to explicitly put the injected OSPF route in either ISP1's or ISP2's routing table so that by luck one ISP has the knowledge to route the connection back to the "IP address A". However, the question is routing filter has no ability to duplicate routes in several routing tables.

I also understand that I can add an exemption firewall rule right before the PCC "prerouting" mangle rule, say:
add chain=prerouting dst-address=220.123.45.0/24  action=accept in-interface=LAN
But the lethal problem is these routes are dynamic in nature, I cannot hard-coded these exemption firewall rules by referencing the routing table in advance, I need a way to update these exemption rules dynamically with script invoked by route updates. And obviously, there is no such facility for triggering script execution upon route update.

Thus anyone also faces this problem and has any solution to deal with it? or can Mikrotik add a feature to call a defined script upon any route update (maybe grouped in routing filter category)?
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Way to solve mark-routing issue with custom route.

Thu Apr 23, 2015 4:32 pm

You should be able to create more OSPF instances, bind them to the ISP1 / ISP2 routing tables, and then redistribute into them from the primary OSPF process.
 
tawh
just joined
Topic Author
Posts: 17
Joined: Sun Jun 30, 2013 2:11 pm

Re: Way to solve mark-routing issue with custom route.

Fri Apr 24, 2015 10:26 am

You should be able to create more OSPF instances, bind them to the ISP1 / ISP2 routing tables, and then redistribute into them from the primary OSPF process.
Thanks for your suggestion. :D

I am evaluating the efficiency by creating two additional OSPF processes for "duplicating" the main routing table. Yet it is an alternative to solve this problem, but the "price" (resource consumption) is too much. :?

Furthermore, I need to carefully design the routing-filter to redistribute the routes from main route table to other routing table, and at the same time prohibits the routes to be broadcast by OSPF to other neighbour in the network.
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Way to solve mark-routing issue with custom route.

Fri Apr 24, 2015 2:35 pm

Furthermore, I need to carefully design the routing-filter to redistribute the routes from main route table to other routing table, and at the same time prohibits the routes to be broadcast by OSPF to other neighbour in the network.
If you don't define any networks for the "dummy" ospf processes, then they're not going to form any adjacencies.
They'll just be buckets for you to dump routes into. Use RIP if you prefer....

It's all I can think of that accomplishes your goal of taking a seemingly arbitrary dynamic source of routing information and automatically putting it into different routing tables....
 
tawh
just joined
Topic Author
Posts: 17
Joined: Sun Jun 30, 2013 2:11 pm

Re: Way to solve mark-routing issue with custom route.

Fri Apr 24, 2015 6:16 pm

Furthermore, I need to carefully design the routing-filter to redistribute the routes from main route table to other routing table, and at the same time prohibits the routes to be broadcast by OSPF to other neighbour in the network.
If you don't define any networks for the "dummy" ospf processes, then they're not going to form any adjacencies.
They'll just be buckets for you to dump routes into. Use RIP if you prefer....

It's all I can think of that accomplishes your goal of taking a seemingly arbitrary dynamic source of routing information and automatically putting it into different routing tables....
Yeah, it is a tough question, I played with all routerOS commands many time but still don't find effective and complete way to solve it. :evil:

Who is online

Users browsing this forum: gigabyte091, ianiovski, Jörg and 69 guests