Page 1 of 1

Redirect P2P to another gateway?

Posted: Fri Jun 16, 2006 8:41 pm
by wavemich
I have a DSL line and a DS3 feeding my customers. All customers have public IPs from the 45 feed. I want to redirect only P2P traffic from the customers to the DSL feed. How would I go about this? Ive created a routing mark for P2P. Not sure how to redirect it to the DSL interface? Do I have to use proxy?

Thanks
-Jon

Posted: Sat Jun 17, 2006 9:09 am
by Mitak
Routing mark will be enovght.

Posted: Sun Jun 18, 2006 9:53 am
by sergejs
wavemich, amount of time required to recognize, that particular traffic is p2p (some packets flow over default gateway). That's why you have route p2p traffic over default gateway, and than redirect specific traffic over alternative gateway (HTTP, FTP, etc.).

Posted: Sun Jun 18, 2006 5:52 pm
by igorkeiti
Hi sergejs do u have a script? I try make this rule, but dont have a sucess..
do u have a msn?

Regards Igor

Posted: Mon Jun 19, 2006 12:30 am
by wavemich
sergejs, would it be able to get a decent amount of the P2P over to the other line? I would imagine we'd get a LOT of phone calls and creating rules if we did it your method...

Thanks
-Jon

Posted: Mon Jun 19, 2006 3:50 am
by igorkeiti
yap,, give us a example...

Posted: Mon Jun 19, 2006 9:29 am
by Equis
Perhaps set default gateway for p2p then add routing mark for "not p2p"
Then add route to match that mark

Maybe that would work

Posted: Mon Jun 19, 2006 6:18 pm
by wavemich
Good idea! Now I just need to figure out how to route 'routing marks'. Will my 'DSL' ISP accept outbound IP addresses that are not their own?

Posted: Mon Jun 19, 2006 11:55 pm
by Equis
Hi

You will need to srcnat your p2p for your isp if not useing there IP's, I use winbox, if you add route you can choose routing mark

I also like this method becuse if one isp goes down using check gateway ping it will fall over to the next

I am no expert, I just learnt from this forum & playing alot, sorry if I cannot give good answer :)

Posted: Mon Jun 26, 2006 12:46 am
by igorkeiti
Equis... Give us a exemple...

Posted: Mon Jun 26, 2006 1:20 am
by jager
I had the same problem as described, but never had 100% success redirecting only p2p traffic to secondary gateway.
Users always complained about "LowId" with Emule or other similar problems in other p2p softwares.
The best what I got is to leave p2p on default gw, and redirect everything else to second link.

Posted: Mon Jun 26, 2006 1:38 am
by Equis
Hello

I will give a sample but need to wait for the weekend when I can make it.

I will post back on weekend

Thanks

Posted: Mon Jun 26, 2006 12:21 pm
by Eugene
For example on how to set routing marks see the wiki: http://wiki.mikrotik.com/wiki/Load_Balancing

Posted: Wed Jul 26, 2006 1:55 pm
by patagonia
Hi, please, public an example of a marking and routing to two pppoe-outs, i canĀ“t do it. just mark the http traffics but don{t know how redirect to a pppoe-out2, and the pppoe-out1 is a default gateway.

[admin@MikroTik] > ip firewall nat print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat action=masquerade

[admin@MikroTik] > ip firewall mangle print
11 ;;; All P2P coneccion
chain=forward p2p=all-p2p action=mark-connection
new-connection-mark=p2p-coneccion passthrough=yes

12 chain=forward connection-mark=p2p-coneccion
action=mark-packet new-packet-mark=p2p
passthrough=yes

13 ;;; HTTP Marks !!
chain=prerouting src-address=10.0.0.0/24
protocol=tcp dst-port=80 action=mark-routing
new-routing-mark=HTTP passthrough=yes

the counter of mangle rules of http is runinng, have aprox. 50 Mb per day.

regards.-