Alternative Managing BitTorrent Traffic
It’s interesting when ISPs are talking about how to decrease the influence and slowdown the speed of Bit Torrent, maybe other peer to peer downloading technologies such as Gnutella, eDonkey are involved, from their network. Denying any traffic generated by all P2P soft gonna be the best choice for them, but it’s not the trend or sensible solution, right? Yet Alberto-Escarlate wrote an article which talking about How to configure routers to allow fast BitTorrent downloads on thep2pweblog.
I wanna to blog this page long time before. Since I’m a BT user but at the same time provide performance optimization solutions for ISPs, it seems a bit awkward for me at this position. It’s lucky for me to obtain inspiration from Opinmind, a site at where you can search positive and negative opinion for a same thing. So I make it in an “Opinmind Style” and post both positive and negative alternative ways to manage the BT traffics.
Now here comes how to decrease the BT traffics, I’d like you to know this as “manage” to be more appropriate. We usually use a NBAR to manage network traffics.
Procedure: CEF should be enabled and download PDLM for Bit Torrent from Cisco to your TFTP server, this example I illustrate here has been connected to a TFTP server with an IP address with 192.168.1.1
1.) Copy the PDLM into the router's flash:
router#copy tftp flash
Address or name of remote host ? 192.168.1.1
Source filename ? bittorrent.pdlm
Destination filename [bittorrent.pdlm]?
Erase flash: before copying? [confirm]n
Loading bittorrent.pdlm from 192.168.1.1 (via FastEthernet0.1): !
[OK - 4125 bytes]
Verifying checksum... OK (0xA1BF)
4125 bytes copied in 0.192 secs (21484 bytes/sec)
System flash directory:
File Length Name/status
1 9773168 c1700-mz.123-10.bin
2 4125 bittorrent.pdlm
[9777424 bytes used, 6737644 available, 16515068 total]
16384K bytes of processor board System flash (Read/Write)
2.) Reference the PDLM in the config:
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#ip nbar pdlm bittorrent.pdlm
3.) Create a class-map and policy map and apply it to the interface concerned:
class-map match-all bittorrent
match protocol bittorrent
no ip address
ip address 192.168.1.1 255.255.255.0
ip access-group to-internet in
ip nat inside
service-policy input bittorrent-policy
Basically, within the policy-map bittorrent-policy, the action for any packets matching that protocol arriving on the fa0/1 interface was to DROP them. Packet manipulation is possible by setting the precedence bits, etc for further processing down the line. But in this instance, the packets are set to be dropped as soon as they arrive on the fa0/1 interface.