2011年11月23日水曜日

QOS 5.QOS設定 CBWFQ


■MQCによるQoSの設定(CBWFQ)



CBWFQ(Class-based Weighted Fair queue)

WFQに定義されたクラスというグループ(最大64個)を使用して優先制御する方式。又、CBWFQは各キューに最低保証帯域幅を指定する事が出来、それ以上の帯域幅を利用可能であれば、利用することも可能。
問題点 : WFQと同様に帯域などの保証がない。(上限に達した場合、VoIPなどの優先度が高いアプリケーションをテールドロップする可能性がある。)



1.class-mapを使用して、トラフィッククラスを定義する。


Router(config)# class-map { クラス名 }
Router(config-cmap)# match access-group { アクセスリスト番号 } //上記のポリシーに分類するアクセスリスト


2.policy-mapを使用して、1で定義したトラフィッククラスに対してトラフィックポリシーを定義する。


Router(config)# policy-map { ポリシー名 }
Router(config-pmap)# class { クラス名 }
Router(config-pmap-c)# bandwidth { 帯域幅(kbps) }
又は、
Router(config-pmap-c)# bandwidth percent{ 割り当てる帯域幅の割合(%) }
Router(config-pmap-c)# queue-limit { キューの上限 }
Router(config-pmap-c)#fair-queue [ ダイナミックキュー]


3.service-policyを使用して、トラフィックポリシーを定義するインターフェースを定義する。


Router(config)# interface { インターフェース名 }
Router(config-if)# service-policy { output | input } {ポリシー名}




例>

1.class-mapを使用して、トラフィッククラスを定義する。



Router(config)# class-map rtp
Router(config-cmap)# match access-group 100
Router(config-cmap)# exit
Router(config)# class-map http
Router(config-cmap)# match access-group 110
Router(config-cmap)# exit
Router(config)# class-map com-traffic
Router(config-cmap)# match access-group 120
Router(config-cmap)# exit




2.policy-mapを使用して、1で定義したトラフィッククラスに対してトラフィックポリシーを定義する。

Router(config)# policy-map inter_net
Router(config-pmap)# class rtp
Router(config-pmap-c)# bandwidth 40
Router(config-pmap-c)# queue-limit 40
Router(config-pmap-c)#exit
Router(config-pmap)# class http
Router(config-pmap-c)# bandwidth 30
Router(config-pmap-c)# queue-limit 50
Router(config-pmap-c)#exit
Router(config-pmap)# class com-traffic
Router(config-pmap-c)# bandwidth 20
Router(config-pmap-c)#exit
Router(config-pmap)# class class-default
Router(config-pmap-c)#fair-queue 
Router(config-pmap-c)#exit



3.service-policyを使用して、トラフィックポリシーを定義するインターフェースを定義する。

Router(config)# interface serial0/0/0
Router(config-if)# service-policy input inter_net



・show run で一部内容確認

1.確認
class-map rtp
  match access-group 100
!
class-map http
  match access-group 110
!
class-map com-traffic
  match access-group 120
!

2.確認

policy-map inter_net
  class rtp
   bandwidth  40
 queue-limit 40
  class http
   bandwidth  30
 queue-limit 50
  class com-traffic
   bandwidth  20
  class class-default
   fair-queue
!

3.確認

interface serial 0/0/1
  service-policy input inter_net


■確認コマンド
・show policy-map interface コマンド