思科路由器限速主要有「NBAR/PDLM 應用層識別」與「ACL 埠號限速」兩大流派,針對現代 P2P 動態換埠特性,NBAR/PDLM 為根本解法。以下詳細對比與配置範例。
flash:。ip nbar pdlm flash:bittorrent.pdlm 載入啟用。class-map match-all BITTORRENT / match protocol bittorrentpolicy-map BT_POLICY / class BITTORRENT / drop (或 police 限速)。interface FastEthernet0/0
service-policy input BT_POLICY
service-policy output BT_POLICYaccess-list 130 deny tcp any any range 6881 6890
access-list 130 deny tcp any range 6881 6890 any
ip access-group 130 in / out
access-list 130 remark bt
access-list 130 permit tcp any any range 6881 6890
access-list 130 permit tcp any range 6881 6890 any
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
| 維度 | NBAR/PDLM | ACL 埠號 |
|---|---|---|
| 識別準確度 | 高 (應用層特徵) | 低 (僅埠號,易繞過) |
| 維護成本 | 需下載/更新 PDLM | 需持續追蹤新埠號 |
| 效能影響 | 增加 CPU (深度檢測) | 極低 (簡單匹配) |
| 支援協議 | 可擴展 (HTTP URL、VoIP、P2P 等) | 僅靜態 TCP/UDP 埠 |