FTP伺服器IP位址為10.0.1.2/24,R1路由器F0/0接口的IP位址為10.0.1.1/24.
PC1主機的IP位址為10.0.0.7/24,PC2的主機的IP位址為10.0.0.4/24,R1路由器F0/1接口IP位址為10.0.0.254/24。
方法一:使用CAR技術進行網絡限速
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 10.0.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastEthernet 1/0
R1(config-if)#ip address 10.0.0.254 255.255.255.0
R1(config)#access-list 100 permit tcp any any
R1(config-if)#rate-limit input access-group 100 100000 20000 4000 conform-action continue exceed-action drop
使用FlashFXP軟體連接配接FTP伺服器進行資料下載下傳,檢視網速是否受到限制
方法二:使用GTS技術進行網絡限速
R1(config)#class-map match-all ftp
R1(config-cmap)#match access-group 100
R1(config-cmap)#exit
R1(config)#policy-map ftp
R1(config-pmap)#class ftp
R1(config-pmap-c)#shape average 100000
R1(config-pmap-c)#shape max-buffers 100
R1(config-pmap-c)#exit
R1(config-pmap)#exit
R1(config-if)#service-policy output ftp