思科路由器 (IOS) 透過 ACL、Rate-limit、NBAR (Network-Based Application Recognition) + PDLM (Packet Description Language Module) 實現精準應用層流控與封鎖。
! 封鎖 BT 預設埠 6881-6890
access-list 130 deny tcp any any range 6881 6890
access-list 130 deny tcp any range 6881 6890 any
interface FastEthernet 0/0
ip access-group 130 in
ip access-group 130 out

**缺點:** 現代 P2P (BT/電驢/迅雷) 動態隨機埠、甚至藏在 80/443/8080/2070,封死這些埠會導致正常服務中斷。
access-list 130 remark BT-THROTTLE
access-list 130 permit tcp any any range 6881 6890
access-list 130 permit tcp any range 6881 6890 any
! 輸入/輸出方向限速 712kbps,突發 8000 bytes
rate-limit input access-group 130 712000 8000 8000 conform-action transmit exceed-action drop
rate-limit output access-group 130 712000 8000 8000 conform-action transmit exceed-action drop
**缺點:** 同樣依賴固定埠,無法識別動態埠 P2P。
class-map match-all BITTORRENT
match protocol bittorrent
!
policy-map BT-POLICY
class BITTORRENT
drop
!
interface FastEthernet 0/0 ! 連接 Internet 的 WAN 介面
description WAN-Link
ip address 192.168.0.1 255.255.255.0
ip nat inside
service-policy input BT-POLICY
service-policy output BT-POLICY
同理可載入 `emule.pdlm`、`kazaa2.pdlm` 封鎖電驢、Kazaa。
**結論:** 思科高端路由器 + NBAR + PDLM = **動態、精準、可擴展** 的企業級流控方案,徹底解決 P2P 亂象。