码迷,mamicode.com
首页 > 其他好文 > 详细

Qos-6-初级小实验

时间:2020-12-14 13:06:09      阅读:3      评论:0      收藏:0      [点我收藏+]

标签:tput   dsc   form   scp   这一   ini   RKE   put   efault   

初级小实验

技术图片

 

1、PC-SERVER的TELNET流量,标记为precedence 4

要求拥塞时保留带宽的10%,(100%)

执行WRED,当到达25个包时进行丢弃,概率为8分之1

带宽限速,为100KB,正常的转发,超出的丢弃

 

2、PC-SERVER的http流量,标记为DSCP 40

要求拥塞时带宽为10%

执行WRED,达到30包时开始丢弃,概率为5分之1

带宽限速,最大带宽为2M,最小带宽为1M, 正常的转发,超出的remark pre 2 ,惩罚的丢弃

 

3、PC-SERVER的icmp ping 流量,标记为predecence 6

要求拥塞时带宽为2%

执行WRED,达到20包时开始丢弃,概率为2分之1   //故意设置成这样,看效果

带宽限速 ,最小带宽为8000kbps, 正常转发发,超出丢弃   .//发送ping包,可以测试size= 1000,就会看到具体的表现,2分之一丢包

 

4、针对于其它去往SERVER的流量,全部限速为1M,超出drop ,正常流量转发

使用公平队列

并且使用RED进行拥塞避免

 

1、先做分类标记,,我选择在R2的入接口上做,

policy-map wfy
 class telnet
  set ip precedence 4
 class http
  set ip dscp cs5
 class ping
  set ip precedence 6
Extended IP access list 120
    10 permit ip any host 23.0.0.3
Extended IP access list http
    10 permit tcp host 192.168.1.10 host 23.0.0.3 eq www
Extended IP access list ping
    10 permit icmp host 192.168.1.10 host 23.0.0.3
Extended IP access list telnet
    10 permit tcp host 192.168.1.10 host 23.0.0.3 eq telnet
R2#

 

二、做队列,拥塞避免以及拥塞监管

policy-map out
 class telnet
  bandwidth percent 10
  random-detect
  random-detect precedence 4 25 40 8  
   police cir 100000
     conform-action transmit
     exceed-action drop
 class http
  bandwidth percent 10   //10%
  random-detect dscp-based
  random-detect dscp 40 30 40 5   
   police cir 1000000 pir 2000000 be 1000
     conform-action transmit
     exceed-action set-prec-transmit 2
     violate-action drop
 class ping
  bandwidth percent 2
  random-detect
  random-detect precedence 6 20 40 2   
   police cir 8000        //这一部份可以验证直接看到结果
     conform-action transmit
     exceed-action drop
 class class-default
  fair-queue
  random-detect
   police cir 8000000
     conform-action transmit
     exceed-action drop

查看配置

数据包入接口中,配置了分类和标记

R2#show policy-map inter f0/0
 FastEthernet0/0
  Service-policy input: wfy
 
    Class-map: telnet (match-all)
      47 packets, 2826 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: access-group name telnet
      QoS Set
        precedence 4
          Packets marked 47
 
    Class-map: http (match-all)
      25 packets, 1500 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: access-group name http
      QoS Set
        dscp af11
          Packets marked 0
 
    Class-map: ping (match-all)
      1179 packets, 1523946 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: access-group name ping
      QoS Set
        precedence 6
          Packets marked 1179
 
    Class-map: class-default (match-any)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
R2#

 

数据出接口

R2#show policy-map inter f0/1
 FastEthernet0/1
 
  Service-policy output: out
    Class-map: telnet (match-all)
      47 packets, 2606 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: access-group name telnet
      Queueing
        Output Queue: Conversation 265
        Bandwidth 10 (%)
        Bandwidth 1000 (kbps)
        (pkts matched/bytes matched) 0/0
        (depth/total drops/no-buffer drops) 0/0/0
         exponential weight: 9
         mean queue depth: 0

  class    Transmitted      Random drop      Tail drop    Minimum Maximum  Mark
           pkts/bytes       pkts/bytes       pkts/bytes    thresh  thresh  prob
      0       0/0               0/0              0/0           20      40  1/10
      1       0/0               0/0              0/0           22      40  1/10
      2       0/0               0/0              0/0           24      40  1/10
      3       0/0               0/0              0/0           26      40  1/10
      4       0/0               0/0              0/0           25      40  1/8
      5       0/0               0/0              0/0           30      40  1/10
      6       0/0               0/0              0/0           32      40  1/10
      7       0/0               0/0              0/0           34      40  1/10
   rsvp       0/0               0/0              0/0           36      40  1/10

police:
          cir 100000 bps, bc 3125 bytes
        conformed 0 packets, 0 bytes; actions:
          transmit
        exceeded 0 packets, 0 bytes; actions:
          drop
        conformed 0 bps, exceed 0 bps
 
    Class-map: http (match-all)
      25 packets, 1383 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: access-group name http
      Queueing
        Output Queue: Conversation 266
        Bandwidth 10 (%)
        Bandwidth 1000 (kbps)
        (pkts matched/bytes matched) 0/0
        (depth/total drops/no-buffer drops) 0/0/0
         exponential weight: 9
         mean queue depth: 0
 
   dscp    Transmitted      Random drop      Tail drop    Minimum Maximum  Mark
           pkts/bytes       pkts/bytes       pkts/bytes    thresh  thresh  prob
   af11       0/0               0/0              0/0           32      40  1/10
   af12       0/0               0/0              0/0           28      40  1/10
   af13       0/0               0/0              0/0           24      40  1/10
   af21       0/0               0/0              0/0           32      40  1/10
   af22       0/0               0/0              0/0           28      40  1/10
   af23       0/0               0/0              0/0           24      40  1/10
   af31       0/0               0/0              0/0           32      40  1/10
   af32       0/0               0/0              0/0           28      40  1/10
   af33       0/0               0/0              0/0           30      40  1/5
   af41       0/0               0/0              0/0           32      40  1/10
   af42       0/0               0/0              0/0           28      40  1/10
   af43       0/0               0/0              0/0           24      40  1/10
    cs1       0/0               0/0              0/0           22      40  1/10
    cs2       0/0               0/0              0/0           24      40  1/10
    cs3       0/0               0/0              0/0           26      40  1/10
    cs4       0/0               0/0              0/0           28      40  1/10
    cs5       0/0               0/0              0/0           30      40  1/10
    cs6       0/0               0/0              0/0           32      40  1/10
    cs7       0/0               0/0              0/0           34      40  1/10
     ef       0/0               0/0              0/0           36      40  1/10
   rsvp       0/0               0/0              0/0           36      40  1/10
default       0/0               0/0              0/0           20      40  1/10

      police:
          cir 1000000 bps, bc 31250 bytes
          pir 2000000 bps, be 1000 bytes
        conformed 0 packets, 0 bytes; actions:
          transmit
        exceeded 0 packets, 0 bytes; actions:
          set-prec-transmit 2
        violated 0 packets, 0 bytes; actions:
          drop
        conformed 0 bps, exceed 0 bps, violate 0 bps

    Class-map: ping (match-all)
      1179 packets, 1523946 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: access-group name ping
      Queueing
        Output Queue: Conversation 267
        Bandwidth 2 (%)
        Bandwidth 200 (kbps)
        (pkts matched/bytes matched) 0/0
        (depth/total drops/no-buffer drops) 0/0/0
         exponential weight: 9
         mean queue depth: 0
 
  class    Transmitted      Random drop      Tail drop    Minimum Maximum  Mark
           pkts/bytes       pkts/bytes       pkts/bytes    thresh  thresh  prob
      0       0/0               0/0              0/0           20      40  1/10
      1       0/0               0/0              0/0           22      40  1/10
      2       0/0               0/0              0/0           24      40  1/10
      3       0/0               0/0              0/0           26      40  1/10
      4       0/0               0/0              0/0           28      40  1/10
      5       0/0               0/0              0/0           30      40  1/10
      6     953/1183782         0/0              0/0           20      40  1/2
      7       0/0               0/0              0/0           34      40  1/10
   rsvp       0/0               0/0              0/0           36      40  1/10

      police:
          cir 8000 bps, bc 1500 bytes
        conformed 48 packets, 48612 bytes; actions:
          transmit
        exceeded 226 packets, 340164 bytes; actions:
          drop
        conformed 0 bps, exceed 0 bps
 
    Class-map: class-default (match-any)
      382 packets, 39276 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
      Queueing
        Flow Based Fair Queueing
        Maximum Number of Hashed Queues 256
        (total queued/total drops/no-buffer drops) 0/0/0
         exponential weight: 9
 
  class    Transmitted      Random drop      Tail drop    Minimum Maximum  Mark
           pkts/bytes       pkts/bytes       pkts/bytes    thresh  thresh  prob
      0     192/19698           0/0              0/0           20      40  1/10
      1       0/0               0/0              0/0           22      40  1/10
      2       0/0               0/0              0/0           24      40  1/10
      3       0/0               0/0              0/0           26      40  1/10
      4       0/0               0/0              0/0           28      40  1/10
      5       0/0               0/0              0/0           30      40  1/10
      6       0/0               0/0              0/0           32      40  1/10
      7       0/0               0/0              0/0           34      40  1/10
   rsvp       0/0               0/0              0/0           36      40  1/10
 
      police:
          cir 8000000 bps, bc 250000 bytes
        conformed 0 packets, 0 bytes; actions:
          transmit
        exceeded 0 packets, 0 bytes; actions:
          drop
        conformed 0 bps, exceed 0 bps

R2#

 

验证实验结果

pc#ping 23.0.0.3 size 1000

 

Type escape sequence to abort.

Sending 5, 1000-byte ICMP Echos to 23.0.0.3, timeout is 2 seconds:

!.!.!  //这里可以看到二分之一的丢包概率出现了

 

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

CCIE 成长之路 --- 梅利

 

Qos-6-初级小实验

标签:tput   dsc   form   scp   这一   ini   RKE   put   efault   

原文地址:https://www.cnblogs.com/meili333/p/14101188.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!