自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

思科交換機(jī)端口限速實(shí)戰(zhàn)

網(wǎng)絡(luò) 路由交換
本文通過一個(gè)實(shí)例詳細(xì)的介紹了配置思科交換機(jī)端口限速的全過程。

簡(jiǎn)介

CISCO3550交換機(jī)作為我們單位的核心網(wǎng)絡(luò)交換機(jī),已經(jīng)穩(wěn)定運(yùn)行了多年,功能上也能滿足我們的需求,但是其端口限速功能卻不像其它的一些交換機(jī)那樣容易實(shí)現(xiàn),好在最近找到了實(shí)現(xiàn)的辦法,配置完成后,配合iperf這款測(cè)速軟件進(jìn)行驗(yàn)證,結(jié)果證明這個(gè)方法是行之有效的,下面是具體實(shí)現(xiàn)步驟。

一、創(chuàng)建ACL

由于這是一臺(tái)三層交換機(jī),所以雖然是對(duì)端口進(jìn)行限速,但是還要考慮這個(gè)端口上通過的網(wǎng)絡(luò)地址,本例中,我們選擇對(duì)CISCO3550交換機(jī)的第22口進(jìn)行限速,該端口屬于VLAN66,IP地址段為10.66/16,所以首先要?jiǎng)?chuàng)建一個(gè)ACL,如下所示:

  1. 3550#conf t  
  2.  
  3. Enter configuration commands, one per line. End with CNTL/Z.  
  4.  
  5. 3550(config)#access-list 15 permit 10.66.0.0 0.0.255.255 

二、創(chuàng)建class-map

  1. 3550#conf t  
  2.  
  3. Enter configuration commands, one per line. End with CNTL/Z.  
  4.  
  5. 3550(config)#class-map dkxs  
  6.  
  7. 3550(config-cmap)#match access-group 15 

這一步操作的主要目的就是創(chuàng)建了一個(gè)class-map,在這里面引用了我們事先創(chuàng)建好的ACL 15,方便我們以后對(duì)22端口進(jìn)行操作。

三、創(chuàng)建policy-map

出于測(cè)試的需要,我們創(chuàng)建了多個(gè)policy-map,分別設(shè)置不同的限制帶寬,如80k,1m,5m,10m,分別如下:

  1. 3550#conf t  
  2.  
  3. Enter configuration commands, one per line. End with CNTL/Z.  
  4.  
  5. 3550(config)#policy-map 80k  
  6.  
  7. 3550(config-pmap)#class dkxs  
  8.  
  9. 3550(config-pmap-c)# police 80000 8000 exceed-action drop  
  10.  
  11. 3550#conf t  
  12.  
  13. Enter configuration commands, one per line. End with CNTL/Z.  
  14.  
  15. 3550(config)#policy-map 1m  
  16.  
  17. 3550(config-pmap)#class dkxs  
  18.  
  19. 3550(config-pmap-c)# police 1000000 100000 exceed-action drop  
  20.  
  21. 3550#conf t  
  22.  
  23. Enter configuration commands, one per line. End with CNTL/Z.  
  24.  
  25. 3550(config)#policy-map 5m  
  26.  
  27. 3550(config-pmap)#class dkxs  
  28.  
  29. 3550(config-pmap-c)# police 5000000 500000 exceed-action drop  
  30.  
  31. 3550#conf t  
  32.  
  33. Enter configuration commands, one per line. End with CNTL/Z.  
  34.  
  35. 3550(config)#policy-map 10m  
  36.  
  37. 3550(config-pmap)#class dkxs  
  38.  
  39. 3550(config-pmap-c)# police 10000000 1000000 exceed-action drop 

四、查看配置信息

  1. 3550#show run  
  2.  
  3. policy-map 5m  
  4.  
  5. class dkxs  
  6.  
  7. police 5000000 500000 exceed-action drop  
  8.  
  9. policy-map 1m  
  10.  
  11. class dkxs  
  12.  
  13. police 1000000 100000 exceed-action drop  
  14.  
  15. policy-map 80k  
  16.  
  17. class dkxs  
  18.  
  19. police 80000 8000 exceed-action drop  
  20.  
  21. policy-map 10m  
  22.  
  23. class dkxs  
  24.  
  25. police 10000000 1000000 exceed-action drop 

#p#

五、通過iperf軟件進(jìn)行驗(yàn)證

即先在一臺(tái)服務(wù)器上運(yùn)行iperf的服務(wù)器端,命令如下:

  1. F:\tools>iperf -s  
  2.  
  3. ------------------------------------------------------------  
  4.  
  5. Server listening on TCP port 5001  
  6.  
  7. TCP window size: 8.00 KByte (default)  
  8.  
  9. ------------------------------------------------------------ 

然后在交換機(jī)的22口上分別應(yīng)用表示不同速率的policy-map,每應(yīng)用一次,通過一臺(tái)連接到22端口的筆記本電腦運(yùn)行iperf的客戶端,進(jìn)行端口速率測(cè)試,結(jié)果分別如下:

(交換機(jī)設(shè)置)

  1. 3550(config-if)#service-policy input 80k 

(IPERF客戶端測(cè)試結(jié)果)

  1. F:\tools>iperf -c 10.66.66.8  
  2.  
  3. ------------------------------------------------------------  
  4.  
  5. Client connecting to 10.66.66.8, TCP port 5001  
  6.  
  7. TCP window size: 8.00 KByte (default)  
  8.  
  9. ------------------------------------------------------------  
  10.  
  11. [1912] local 10.66.123.66 port 1147 connected with 10.66.66.8 port 5001  
  12.  
  13. [ ID] Interval Transfer Bandwidth  
  14.  
  15. [1912] 0.0-12.5 sec 104 KBytes 68.3 Kbits/sec  
  16.  
  17. F:\tools>iperf -c 10.66.66.8  
  18.  
  19. ------------------------------------------------------------  
  20.  
  21. Client connecting to 10.66.66.8, TCP port 5001  
  22.  
  23. TCP window size: 8.00 KByte (default)  
  24.  
  25. ------------------------------------------------------------  
  26.  
  27. [1912] local 10.66.123.66 port 1151 connected with 10.66.66.8 port 5001  
  28.  
  29. [ ID] Interval Transfer Bandwidth  
  30.  
  31. [1912] 0.0-12.0 sec 104 KBytes 70.8 Kbits/sec 

(交換機(jī)設(shè)置)

  1. 3550(config-if)#service-policy input 1m 

(IPERF客戶端測(cè)試結(jié)果)

  1. F:\tools>iperf -c 10.66.66.8  
  2.  
  3. ------------------------------------------------------------  
  4.  
  5. Client connecting to 10.66.66.8, TCP port 5001  
  6.  
  7. TCP window size: 8.00 KByte (default)  
  8.  
  9. ------------------------------------------------------------  
  10.  
  11. [1912] local 10.66.123.66 port 1155 connected with 10.66.66.8 port 5001  
  12.  
  13. [ ID] Interval Transfer Bandwidth  
  14.  
  15. [1912] 0.0-10.5 sec 1.08 MBytes 860 Kbits/sec  
  16.  
  17. F:\tools>iperf -c 10.66.66.8  
  18.  
  19. ------------------------------------------------------------  
  20.  
  21. Client connecting to 10.66.66.8, TCP port 5001  
  22.  
  23. TCP window size: 8.00 KByte (default)  
  24.  
  25. ------------------------------------------------------------  
  26.  
  27. [1912] local 10.66.123.66 port 1159 connected with 10.66.66.8 port 5001  
  28.  
  29. [ ID] Interval Transfer Bandwidth  
  30.  
  31. [1912] 0.0-10.0 sec 1.09 MBytes 910 Kbits/sec 

(交換機(jī)設(shè)置)

  1. 3550(config-if)#service-policy input 5m 

(IPERF客戶端測(cè)試結(jié)果)

  1. F:\tools>iperf -c 10.66.66.8  
  2.  
  3. ------------------------------------------------------------  
  4.  
  5. Client connecting to 10.66.66.8, TCP port 5001  
  6.  
  7. TCP window size: 8.00 KByte (default)  
  8.  
  9. ------------------------------------------------------------  
  10.  
  11. [1912] local 10.66.123.66 port 1163 connected with 10.66.66.8 port 5001  
  12.  
  13. [ ID] Interval Transfer Bandwidth  
  14.  
  15. [1912] 0.0-10.5 sec 5.84 MBytes 4.67 Mbits/sec  
  16.  
  17. F:\tools>iperf -c 10.66.66.8  
  18.  
  19. ------------------------------------------------------------  
  20.  
  21. Client connecting to 10.66.66.8, TCP port 5001  
  22.  
  23. TCP window size: 8.00 KByte (default)  
  24.  
  25. ------------------------------------------------------------  
  26.  
  27. [1912] local 10.66.123.66 port 1167 connected with 10.66.66.8 port 5001  
  28.  
  29. [ ID] Interval Transfer Bandwidth  
  30.  
  31. [1912] 0.0-10.7 sec 5.98 MBytes 4.68 Mbits/sec 

(交換機(jī)設(shè)置)

  1. 3550(config-if)#service-policy input 10m 

(IPERF客戶端測(cè)試結(jié)果)

  1. F:\tools>iperf -c 10.66.66.8  
  2.  
  3. ------------------------------------------------------------  
  4.  
  5. Client connecting to 10.66.66.8, TCP port 5001  
  6.  
  7. TCP window size: 8.00 KByte (default)  
  8.  
  9. ------------------------------------------------------------  
  10.  
  11. [1912] local 10.66.123.66 port 1171 connected with 10.66.66.8 port 5001  
  12.  
  13. [ ID] Interval Transfer Bandwidth  
  14.  
  15. [1912] 0.0-10.1 sec 11.8 MBytes 9.83 Mbits/sec  
  16.  
  17. F:\tools>iperf -c 10.66.66.8  
  18.  
  19. ------------------------------------------------------------  
  20.  
  21. Client connecting to 10.66.66.8, TCP port 5001  
  22.  
  23. TCP window size: 8.00 KByte (default)  
  24.  
  25. ------------------------------------------------------------  
  26.  
  27. [1912] local 10.66.123.66 port 1175 connected with 10.66.66.8 port 5001  
  28.  
  29. [ ID] Interval Transfer Bandwidth  
  30.  
  31. [1912] 0.0-10.2 sec 12.0 MBytes 9.87 Mbits/sec 

為了使測(cè)試的結(jié)果更準(zhǔn)確,每種速率下都進(jìn)行了兩次測(cè)試,從測(cè)試的結(jié)果看,端口限速確實(shí)生效了?!揪庉嬐扑]】

  1.  Secpath典型配置之訪問控制列表(ACL)
  2. 更改公用文件夾ACL(訪問控制列表)
  3. 訪問控制列表ACL技術(shù)
責(zé)任編輯:佚名 來源: 比特網(wǎng)
相關(guān)推薦

2009-07-20 09:59:35

華為交換機(jī)端口限速華為認(rèn)證

2010-01-19 10:31:20

思科交換機(jī)模塊

2010-01-08 16:36:12

華為交換機(jī)端口限速

2010-01-11 16:22:59

交換機(jī)端口限速

2013-08-27 09:47:09

QOS限速思科交換機(jī)

2010-03-16 14:35:53

思科交換機(jī)模塊

2010-01-13 16:47:02

思科交換機(jī)模塊

2010-01-18 15:22:47

交換機(jī)MAC地址

2010-01-04 16:52:51

2011-03-09 14:00:21

trunkVLAN

2010-01-25 14:49:18

思科刀片交換機(jī)

2010-01-08 10:54:25

2013-04-09 15:36:19

交換機(jī)交換機(jī)端口設(shè)備端口模式

2010-03-17 13:42:58

交換機(jī)端口

2010-03-22 17:08:00

交換機(jī)端口

2010-01-06 09:37:11

交換機(jī)故障排除

2011-09-02 14:59:15

2011-12-06 10:06:12

交換機(jī)端口

2009-11-01 16:17:16

2009-07-16 09:37:37

CCNA思科交換機(jī)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)