Сейчас сделано так:ip nbar pdlm flash:bittorrent.pdlm
ip nbar pdlm flash:eDonkey.pdlm
ip nbar pdlm flash:directconnect.pdlm
class-map match-any torrents
match protocol bittorrent
match protocol edonkey
match protocol directconnect
policy-map limit-torrents
class torrents
police 4096000 1536000 1536000 conform-action transmit exceed-action drop
interface FastEthernet0/0
...
service-policy input limit-torrents
service-policy output limit-torrents
Почти ничего не матчится:
C3725#sh policy-map int fa 0/0
FastEthernet0/0
Service-policy input: limit-torrents
Class-map: torrents (match-any)
23500 packets, 3778342 bytes
5 minute offered rate 5000 bps, drop rate 0 bps
Match: protocol bittorrent
23423 packets, 3716676 bytes
5 minute rate 5000 bps
Match: protocol edonkey
77 packets, 61666 bytes
5 minute rate 0 bps
Match: protocol directconnect
0 packets, 0 bytes
5 minute rate 0 bps
police:
cir 4096000 bps, bc 1536000 bytes
conformed 23500 packets, 3778342 bytes; actions:
transmit
exceeded 0 packets, 0 bytes; actions:
drop
conformed 5000 bps, exceed 0 bps
Class-map: class-default (match-any)
23248367 packets, 9121220314 bytes
5 minute offered rate 9670000 bps, drop rate 0 bps
Match: any
Service-policy output: limit-torrents
Class-map: torrents (match-any)
8580 packets, 1750711 bytes
5 minute offered rate 5000 bps, drop rate 0 bps
Match: protocol bittorrent
8552 packets, 1727678 bytes
5 minute rate 5000 bps
Match: protocol edonkey
28 packets, 23033 bytes
5 minute rate 0 bps
Match: protocol directconnect
0 packets, 0 bytes
5 minute rate 0 bps
police:
cir 4096000 bps, bc 1536000 bytes
conformed 8580 packets, 1750711 bytes; actions:
transmit
exceeded 0 packets, 0 bytes; actions:
drop
conformed 5000 bps, exceed 0 bps
Class-map: class-default (match-any)
7662414 packets, 3227689044 bytes
5 minute offered rate 9524000 bps, drop rate 0 bps
Match: any