Page 1 of 1

Policy Based Routing

Posted: Thu Aug 28, 2014 5:05 pm
by netboyzin
Hello

I would like to serve P2P traffic coming from Internet to a Mikrotik Box through a separate high-speed link connecting the customers.

Objective is to bifurcate downstream traffic into 2 parts ( WWW traffic and P2P Traffic ) and serve to the customers by 2 separate links connecting to a downstream L3 switch. Customers are connected to the L3 switch placed below Mikrotik.

Is this possible ? All the Mikrotik documentation for policy based routing solely concentrates on Dual WAN scenario.

Looking forward for some feedback.

Abhishek

Re: Policy Based Routing

Posted: Thu Aug 28, 2014 7:56 pm
by StubArea51
As long as you have something to match on like a port, protocol or IP host/subnet, then yes, it is possible to policy route in a number of ways beyond the dual wan scenario:

Here is a brief example matching a source of 10.10.10.0/24 and setting a next hop of 10.1.1.2:

ros code

/ip firewall mangle 
add action=mark-packet chain=prerouting new-packet-mark=Policy-Route-1 src-address=10.10.10.0/24
add action=mark-routing chain=prerouting new-routing-mark=Policy-Route-1-RM packet-mark=Policy-Route-1

/ip route
add distance=1 gateway=10.1.1.2 pref-src=10.10.10.0/24 routing-mark=Policy-Route-1-RM

Re: Policy Based Routing

Posted: Fri Aug 29, 2014 6:28 pm
by netboyzin
Thanks Mate.

I missed to include the packet-mark in the mangle rule.

Abhishek