P2P is such a great tool for sharing files, but it can also be quite a pain to manage. I have found a method on Mikrotik that kinda works ok’sh.
First of I have 2 mangle rules to identify the traffic and place the IP’s in an address list.
Then there are two more rules that mark traffic to and from these hosts so it can be queued during peak time.
The first rule marks all p2p connections as a p2p connection in the prerouting chain, where it isn’t already marked as a p2p connection:
chain=prerouting action=mark-connection new-connection-mark=p2p-connection passthrough=no p2p=all-p2p connection-mark=!p2p-connection
The next rule matches these connections on the outside interface and places the source ip address in an address list called p2p-host. You can refine the outside interface with !my-internal-interface for example. Take caution with this rule so you don’t match your internal subnets or else their traffic will also be queued with the p2p-hosts:
chain=prerouting action=add-src-to-address-list address-list=p2p-host address-list-timeout=1d in-interface=ppp-to-mweb connection-mark=p2p-connection
Read the rest of this entry »