First the iOS version of the router satisfies the condition (12.2 (5) t above)
There are several ways:
1, for BT full limit (see the following example Policy-map xx different parts) (using Nbar)
2, for the rate of BT restrictions (see the following example Policy-map xx different parts) (using Nbar)
3, through the priority queue to complete
First, the case of address conversion:
IP nbar pdlm bootflash:bittorrent.pdlm (must be started first)
Class-map Match-all BT
Match protocol BitTorrent
!
!
Policy-map bt1 (completely discarded)
Class BT
Drop
Policy-map BT2 (Rate limit)
Class BT
Police Cir 50000
Conform-action transmit
Exceed-action Drop
Policy-map BT3 (Rate limit)
Class BT
Police Cir 300000
Conform-action transmit
Exceed-action Drop
Interface fastethernet0/0
IP address 192.168.34.240 255.255.255.0
IP Nat Outside
IP virtual-reassembly
Service-policy input bt3 (download limit)
Service-policy output bt2 (upload limit)
Duplex full
!
Interface fastethernet1/0
IP address 192.168.101.1 255.255.255.0
IP nat Inside
IP virtual-reassembly
Duplex full
!
IP classless
IP Route 0.0.0.0 0.0.0.0 192.168.34.1
!
No IP HTTP Server
!
IP nat Pool pool1 192.168.34.240 192.168.34.240 netmask 255.255.255.0
IP nat inside source list 1 pool pool1 overload
!
Access-list 1 Permit any
Second, no address translation:
IP Nbar pdlm BOOTFLASH:/BITTORRENT.PDLM
Class-map Match-all BT
Match protocol BitTorrent
!
!
Policy-map BT2
Class BT
Police Cir 160000
Conform-action transmit
Exceed-action Drop
Policy-map BT3
Class BT
Police Cir 240000 BC 60000 PIR 350000
Conform-action transmit
Exceed-action Drop
Policy-map BT1
Class BT
Drop
!
!
!
!
Interface Loopback0
No IP address
No IP route-cache
!
Interface fastethernet0/0
IP address 192.168.101.1 255.255.255.0
Duplex full
!
Interface fastethernet1/0
IP address 192.168.102.254 255.255.255.0
Service-policy input BT3
Service-policy Output BT2
IP Route-cache Policy
Duplex full
!
IP classless
IP Route 0.0.0.0 0.0.0.0 192.168.102.1