思科交换机端口限速实战

2011-03-07 21:32出处:比特网作者:佚名我要评论

[导读]本文通过一个实例详细的介绍了配置思科交换机端口限速的全过程。

  四、查看配置信息

  3550#show run

  policy-map 5m

  class dkxs

  police 5000000 500000 exceed-action drop

  policy-map 1m

  class dkxs

  police 1000000 100000 exceed-action drop

  policy-map 80k

  class dkxs

  police 80000 8000 exceed-action drop

  policy-map 10m

  class dkxs

  police 10000000 1000000 exceed-action drop

  五、通过iperf软件进行验证

  即先在一台服务器上运行iperf的服务器端,命令如下:

  F:\tools>iperf -s

  ------------------------------------------------------------

  Server listening on TCP port 5001

  TCP window size: 8.00 KByte (default)

  ------------------------------------------------------------

  然后在交换机的22口上分别应用表示不同速率的policy-map,每应用一次,通过一台连接到22端口的笔记本电脑运行iperf的客户端,进行端口速率测试,结果分别如下:

  (交换机设置)

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

  (IPERF客户端测试结果)

  F:\tools>iperf -c 10.66.66.8

  ------------------------------------------------------------

  Client connecting to 10.66.66.8, TCP port 5001

  TCP window size: 8.00 KByte (default)

  ------------------------------------------------------------

  [1912] local 10.66.123.66 port 1147 connected with 10.66.66.8 port 5001

  [ ID] Interval Transfer Bandwidth

  [1912] 0.0-12.5 sec 104 KBytes 68.3 Kbits/sec

  F:\tools>iperf -c 10.66.66.8

  ------------------------------------------------------------

  Client connecting to 10.66.66.8, TCP port 5001

  TCP window size: 8.00 KByte (default)

  ------------------------------------------------------------

  [1912] local 10.66.123.66 port 1151 connected with 10.66.66.8 port 5001

  [ ID] Interval Transfer Bandwidth

  [1912] 0.0-12.0 sec 104 KBytes 70.8 Kbits/sec

  (交换机设置)

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

  (IPERF客户端测试结果)

  F:\tools>iperf -c 10.66.66.8

  ------------------------------------------------------------

  Client connecting to 10.66.66.8, TCP port 5001

  TCP window size: 8.00 KByte (default)

  ------------------------------------------------------------

  [1912] local 10.66.123.66 port 1155 connected with 10.66.66.8 port 5001

  [ ID] Interval Transfer Bandwidth

  [1912] 0.0-10.5 sec 1.08 MBytes 860 Kbits/sec

  F:\tools>iperf -c 10.66.66.8

  ------------------------------------------------------------

  Client connecting to 10.66.66.8, TCP port 5001

  TCP window size: 8.00 KByte (default)

  ------------------------------------------------------------

  [1912] local 10.66.123.66 port 1159 connected with 10.66.66.8 port 5001

  [ ID] Interval Transfer Bandwidth

  [1912] 0.0-10.0 sec 1.09 MBytes 910 Kbits/sec

  (交换机设置)

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

  (IPERF客户端测试结果)

  F:\tools>iperf -c 10.66.66.8

  ------------------------------------------------------------

  Client connecting to 10.66.66.8, TCP port 5001

  TCP window size: 8.00 KByte (default)

  ------------------------------------------------------------

  [1912] local 10.66.123.66 port 1163 connected with 10.66.66.8 port 5001

  [ ID] Interval Transfer Bandwidth

  [1912] 0.0-10.5 sec 5.84 MBytes 4.67 Mbits/sec

  F:\tools>iperf -c 10.66.66.8

  ------------------------------------------------------------

  Client connecting to 10.66.66.8, TCP port 5001

  TCP window size: 8.00 KByte (default)

  ------------------------------------------------------------

  [1912] local 10.66.123.66 port 1167 connected with 10.66.66.8 port 5001

  [ ID] Interval Transfer Bandwidth

  [1912] 0.0-10.7 sec 5.98 MBytes 4.68 Mbits/sec

  (交换机设置)

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

  (IPERF客户端测试结果)

  F:\tools>iperf -c 10.66.66.8

  ------------------------------------------------------------

  Client connecting to 10.66.66.8, TCP port 5001

  TCP window size: 8.00 KByte (default)

  ------------------------------------------------------------

  [1912] local 10.66.123.66 port 1171 connected with 10.66.66.8 port 5001

  [ ID] Interval Transfer Bandwidth

  [1912] 0.0-10.1 sec 11.8 MBytes 9.83 Mbits/sec

  F:\tools>iperf -c 10.66.66.8

  ------------------------------------------------------------

  Client connecting to 10.66.66.8, TCP port 5001

  TCP window size: 8.00 KByte (default)

  ------------------------------------------------------------

  [1912] local 10.66.123.66 port 1175 connected with 10.66.66.8 port 5001

  [ ID] Interval Transfer Bandwidth

  [1912] 0.0-10.2 sec 12.0 MBytes 9.87 Mbits/sec

  为了使测试的结果更准确,每种速率下都进行了两次测试,从测试的结果看,端口限速确实生效了。

比特邦圈子

  • “简”商务达人圈
    “简”商务达人圈——专为IT应用端人群建立,用于分享商务应用解决方案的个人端应用体验,畅谈办公室内商...
  • IT经理人
    也许您是刚刚进入职场的菜鸟,也许您是像杜拉拉一样奋斗的职场主流,也许您是像唐俊一样成功的职场精英,无...