Is it possible to route p2p traffic to a seperate interface
Ex: ethernet_1 normal traffic and ethernet_2 all-p2p traffic
copy this script under new terminal
/ip firewall mangle
add action=mark-connection chain=prerouting comment=“Peer 2 Peer” disabled=no new-connection-mark=“Peer 2 Peer” p2p=all-p2p passthrough=yes
add action=mark-packet chain=prerouting comment=“Peer 2 Peer” connection-mark=“Peer 2 Peer” disabled=no new-packet-mark=“Peer 2 Peer” p2p=
all-p2p passthrough=yes
add action=mark-routing chain=prerouting comment=“Peer 2 Peer” connection-mark=“Peer 2 Peer” disabled=no new-routing-mark=“Peer 2 Peer”
packet-mark=“Peer 2 Peer” passthrough=yes
that will mark peer 2 peer,then go to /ip routes
add a new route and select the routing mark and specify the ip address of the interface or select a gateway interface,either way will work
As far as I know it’s not possible to use policy routing for p2p matcher.
You need to leave P2P traffic for default gateway, and route important services to secondary gateway with policy routing.
For someone did turn out to send р2р in such method on other interface?
For me it is not. For example 80 port is thrown. р2р only partly and to outgoing traffic
Really in any way is it impossible Р2Р to throw on other interet connection?
policy based routing is not possible with P2P,believe me i’ve tried and im sure many others too.only way is to set the primary gateway through the interface which you want P2P to go through and then add a second gateway and route the rest of important traffic such as HTTP,VOIP etc through that gateway with the use of mangle rules.
Hope it helps.
For me now works so. I do not want ports of ONLINE of games by hand to inscribe. I want, that all on straight (primary gateway), and only Р2Р on additional (second gateway). For me a channel with Р2Р will be loaded on 100% and ping on him will be greater.
I understood that this problem does not decide.
Thank you for a help.
problem is that mikrotik can’t catch all the P2P,only parts of it.Thats why you need to add 1 gateway which everything
routes through,then add a second gateway and use exceptions of http,voip etc to go through that second gateway.So basically everything will go out the primary gateway with the exceptions of certain types of traffic you tell to go through
the secondry gateway.By doing that you will notice a drastic improvement of ping times and overall throughput.
The MT P2P rules work on the Layer 7 protocol. Layer 7 protocols are established connections, and due to the connections being established already, you can’t route it as you’d be breaking the connection.
The only solution I know works, is as follow:
Route ALL traffic to one gateway(1).
On that gateway, route everything which is NOT P2P to another gateway(2).
On gateway 2 you can now route your non-P2P traffic the way you’d normally do.
It is possible to creat mangle/packet mark rules based on Layer 7 protocols, but it’s intended for filter rules. It is still, however, possible to use those packet marks to route everything except traffic marked using Layer 7 filtering.
I hope the above makes sense!