Hierarchical Queuing他

iosv-0にて設定

設定

Hub(config)#policy-map child
Hub(config-pmap)#class iosv-1
Hub(config-pmap-c)#priority
Hub(config-pmap-c)#police cir 8000
Hub(config-pmap-c-police)#class iosv-2
Hub(config-pmap-c)#bandwidth remaining percent 4 
! ccoは"ratio"だったけど"percent"しか入らんかった
Hub(config-pmap-c)#exit
Hub(config-pmap)#exit
Hub(config)#policy-map parent
Hub(config-pmap)#class class-default <<match-anyって意味
Hub(config-pmap-c)#shape average 10000
Hub(config-pmap-c)#service-policy child
Hub(config-pmap-c)#end
Hub#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Hub(config)#int gi0/0
Hub(config-if)#service-policy output parent
Hub(config-if)#end
Hub#sh policy-map int
GigabitEthernet0/0 
  Service-policy output: parent
Class-map: class-default (match-any)  
  5 packets, 382 bytes
  5 minute offered rate 0000 bps, drop rate 0000 bps
  Match: any 
  Queueing
  queue limit 64 packets
  (queue depth/total drops/no-buffer drops) 0/0/0
  (pkts output/bytes output) 5/382
  shape (average) cir 10000, bc 40, be 40
  target shape rate 10000

  Service-policy : child

    queue stats for all priority classes:
      Queueing
      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 0/0/0
      (pkts output/bytes output) 0/0

    Class-map: iosv-1 (match-all)  
      0 packets, 0 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: access-group 1
      Priority: Strict, b/w exceed drops: 0
      
      police:
          cir 8000 bps, bc 1500 bytes
        conformed 0 packets, 0 bytes; actions:
          transmit 
        exceeded 0 packets, 0 bytes; actions:
          drop 
        conformed 0000 bps, exceeded 0000 bps

    Class-map: iosv-2 (match-all)  
      0 packets, 0 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: access-group 2
      Queueing
      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 0/0/0
      (pkts output/bytes output) 0/0
      bandwidth remaining 4%
      
    Class-map: class-default (match-any)  
      5 packets, 382 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: any 
      
      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 0/0/0
      (pkts output/bytes output) 5/382

要点

・policy-mapの中で別のpolicy-mapを指定することで階層構造にできる
・親ポリシーは子ポリシーからQoSの情報を受け取ってなんやかんやするので、class-default(match-any)を指定
・priority, remaining percent, shape averageはなんにもわかっていない
・bandwidthは帯域を予約するもの(たぶん)

ping爆撃(police vs shape)

[2023-07-18 22:04:51.742] iosv-1#ping 192.168.0.10 repeat 100
[2023-07-18 22:04:59.219] Type escape sequence to abort.
[2023-07-18 22:04:59.313] Sending 100, 100-byte ICMP Echos to 192.168.0.10, timeout is 2 seconds:
[2023-07-18 22:04:59.412] !!!!!!!!!!!!!!.!!!!!!!!!!!!!.!!!!!!!!!!!!!.!!!!!!!!!!!!!.!!!!!!!!!!!!!
[2023-07-18 22:05:09.797] .!!!!!!!!!!!!!.!!!!!!!!!!!!!.!
[2023-07-18 22:05:14.036] Success rate is 93 percent (93/100), round-trip min/avg/max = 3/5/14 ms

[2023-07-18 22:04:49.757] iosv-2#ping 192.168.0.10 repeat 100
[2023-07-18 22:04:59.735] Type escape sequence to abort.
[2023-07-18 22:04:59.735] Sending 100, 100-byte ICMP Echos to 192.168.0.10, timeout is 2 seconds:
[2023-07-18 22:04:59.839] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2023-07-18 22:05:13.564] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2023-07-18 22:05:16.484] Success rate is 100 percent (100/100), round-trip min/avg/max = 5/164/1291 ms

・iosv-1ではポリシングを行っているためロスが発生している
・iosv-2ではシェーピングが行われているため、ロスはないもののiosv-1に比べてpingがすべて通るまでかなり時間がかかっている

この記事が気に入ったらサポートをしてみませんか?