例:IPv6 の DiffServ の設定
構成
この例では、優先フォワーディングを第 1 四半期に割り当て、保証された転送クラス(af1x)のサブセットを第 2 四半期に割り当て、4 つの転送クラスすべてにリソースを分散します。
図 1 は、この章の導入事例として使用される 3 つのルーターとリンクのトポロジーを示しています。
この導入事例では、サービス プロバイダは、2 つのサイトにある顧客のサーバー間で 2 つのアプリケーションに対して、パケットの優先度の高い配信を提供することに同意しました。1 つ目のアプリケーションは、高解像度オーディオビジュアル(テレビ)パケット フローのストリームを生成し、2 つ目のアプリケーションは時間の影響を受けやすい大量の財務情報を生成します。いずれの場合も、パケット フローはサーバー間です。サービス プロバイダは、どちらのサイトからネットワークに入ったパケットも適切にマークし、3 つのルーターでこのトラフィック用に特別なキューと転送クラスを設定し、そのために IPv6 に DiffServ を使用します。
ルーター1および3は、顧客対応インターフェイスでマルチフィールド(MF)分類子を使用して、優先度の高いパケットを検出し、DSCP(差別化サービスコードポイント)を適切に書き換えます。ベストエフォート型データとネットワーク制御パケットは影響を受けません。3 つのルーターはすべて、優先度の高いパケットを適切に処理するための一貫したスケジューラとリソースで構成されています。
図 2 は、インターフェイスと IPv6 アドレスを備えた IPv6 DiffServ の完全なトポロジーを示しています。RFC 5952 で説明されている IPv4 にマッピングされた IPv6 アドレス形式が使用されます。
コアルーターのルーター2で設定を開始します。これにより、エッジルーターでDiffServが有効になっている場合、CoS(サービスクラス)がネットワークを介してエンドツーエンドで有効になります。コアルーターの設定は、コアでMF分類が設定されないため、少しシンプルです。
ルーター2
[edit] class-of-service { classifiers { # Router 2 classifiers. dscp-ipv6 IPv6-classifier { import default; # Uses the DSCP default map. forwarding-class be-DATA-class { loss-priority high code-points 000001; } forwarding-class ef-FIN-class { loss-priority high code-points 101111; } forwarding-class af-AV-class { loss-priority high code-points 001100; } forwarding-class nc-CONTROL-class { loss-priority high code-points 110001; } } } drop-profiles { # Router 2 drop profiles. af-AV-normal { interpolate { fill-level [95 100]; drop-probability [0 100]; } } af-AV-with-PLP { interpolate { fill-level [60 70 80 90 95]; drop-probability [80 90 95 97 100]; } } } forwarding-classes { # Router 2 forwarding classes. queue 0 be-DATA-class; queue 1 ef-FIN-class; queue 2 af-AV-class; queue 3 nc-CONTROL-class; } interfaces { # Router 2 class-of-service interfaces. so-1/0/1 { # Connected to R1. scheduler-map diffserv-cos-map; unit 0 { classifiers { dscp-ipv6 IPv6-classifier; } rewrite-rules { dscp-ipv6 rewrite-IPv6-dscp; } } } so-1/0/2 { # Connected to R3. scheduler-map diffserv-cos-map; unit 0 { classifiers { dscp-ipv6 IPv6-classifier; } rewrite-rules { dscp-ipv6 rewrite-IPv6-dscp; } } } } rewrite-rules rewrite-IPv6-dscps { # Router 2 rewrite rules. forwarding-class be-DATA-class { loss-priority low code points 000000; loss-priority high code points 000001; } forwarding-class ef-FIN-class { loss-priority low code points 101110; loss-priority high code points 101111; } forwarding-class af-AV-class { loss-priority low code points 001010; loss-priority high code points 001100; } forwarding-class nc-CONTROL-class { loss-priority low code points 110000; loss-priority high code points 110001; } } scheduler-maps { # Router 2 scheduler maps. diffserv-cos-map { forwarding-class be-DATA-class scheduler be-DATA-scheduler; forwarding-class ef-FIN-class scheduler ef-FIN-scheduler; forwarding-class af-AV-class scheduler af-AV-scheduler; forwarding-class nc-CONTROL-class scheduler nc-CONTROL-scheduler; } } schedulers { # Router 2 schedulers. be-DATA-scheduler { transmit-rate percent 40; buffer-size percent 40; priority low; } ef-FIN-scheduler { transmit-rate percent 10; buffer-size percent 10; priority high; } af-AV-scheduler { transmit-rate percent 45; buffer-size percent 45; priority high; drop-profile-map loss-priority low protocol any drop-profile af-AV-normal; drop-profile-map loss-priority high protocol any drop-profile af-AV-with-PLP; } nc-CONTROL-scheduler { transmit-rate percent 5; buffer-size percent 5; priority low; } } } interfaces { # R2 interfaces. so-1/0/1 { # Connected to R1. unit 0 { family inet { address 10.0.0.1/24; } family inet6 { address 0:0:FFFF:10.0.0.1/120; } } } so-1/0/2 { # Connected to R3. unit 0 { family inet { address 10.0.1.1/24; } family inet6 { address 0:0:FFFF:10.0.1.1/120; } } } }
エッジ ルーターのルーター 1 とルーター 3 で設定を続行します。これらのルーターは、ファイアウォールフィルターベースのMF分類子を取得し、マーカーのルールを書き換え、コアに面するインターフェイスのスケジューラとドロッププロファイルを取得します。
ルーター1
[edit] class-of-service { classifiers { # Router 1 classifiers. dscp-ipv6 IPv6-classifier { import default; # Uses the DSCP default map. forwarding-class be-DATA-class { loss-priority high code-points 000001; } forwarding-class ef-FIN-class { loss-priority high code-points 101111; } forwarding-class af-AV-class { loss-priority high code-points 001100; } forwarding-class nc-CONTROL-class { loss-priority high code-points 110001; } } } drop-profiles { # Router 1 drop profiles. af-AV-normal { interpolate { fill-level [95 100]; drop-probability [0 100]; } } af-AV-with-PLP { interpolate { fill-level [60 70 80 90 95]; drop-probability [80 90 95 97 100]; } } } forwarding-classes { # Router 1 forwarding classes. queue 0 be-DATA-class; queue 1 ef-FIN-class; queue 2 af-AV-class; queue 3 nc-CONTROL-class; } interfaces { # Router 1 class-of-service interfaces. so-0/1/1 { # To servers. scheduler-map diffserv-cos-map; unit 0 { classifiers { dscp-ipv6 IPv6-classifier; } rewrite-rules { dscp-ipv6 rewrite-IPv6-dscp; } } } rewrite-rules rewrite-IPv6-dscps { # Router 1 rewrite rules. forwarding-class be-DATA-class { loss-priority low code points 000000; loss-priority high code points 000001; } forwarding-class ef-FIN-class { loss-priority low code points 101110; loss-priority high code points 101111; } forwarding-class af-AV-class { loss-priority low code points 001010; loss-priority high code points 001100; } forwarding-class nc-CONTROL-class { loss-priority low code points 110000; loss-priority high code points 110001; } } scheduler-maps { # Router 1 scheduler map. diffserv-cos-map { forwarding-class be-DATA-class scheduler be-DATA-scheduler; forwarding-class ef-FIN-class scheduler ef-FIN-scheduler; forwarding-class af-AV-class scheduler af-AV-scheduler; forwarding-class nc-CONTROL-class scheduler nc-CONTROL-scheduler; } } schedulers { # Router 1 schedulers. be-DATA-scheduler { transmit-rate percent 40; buffer-size percent 40; priority low; } ef-FIN-scheduler { transmit-rate percent 10; buffer-size percent 10; priority high; } af-AV-scheduler { transmit-rate percent 45; buffer-size percent 45; priority high; drop-profile-map loss-priority low protocol any drop-profile af-AV-normal; drop-profile-map loss-priority high protocol any drop-profile af-AV-with-PLP; } nc-CONTROL-scheduler { transmit-rate percent 5; buffer-size percent 5; priority low; } } } firewall { # Router 1 firewall policer and filter. policer ef-FIN-Policer-Profile { if-exceeding { bandwidth-percent 10; burst-size-limit 2k; } then loss-priority high; } family inet6 { filter mf-classifier { filter-specific; term AV { from { destination-address { 0:0:FFFF:172.16.79.11; } } then { loss-priority low; forwarding-class af-AV-class; } } term Finance { from { destination-address { O:0:FFFF:172.16.79.63; } } then { policer ef-FIN-Policer-Profile; forwarding-class ef-FIN-class; } } term Network-Control { from { traffic-class 192; # 192 is the 110000 traffic class. } then { forwarding-class nc-CONTROL-class; # This is network control traffic. } } term Data { then forwarding-class be-DATA-class; # The rest is data. } } } } interfaces { # Router 1 interfaces. so-0/0/1 { # To servers. unit 0 { family inet { address 192.168.54.1/24; } family inet6 { filter { input mf-classifier; } address 0:0:FFFF:192.168.54.1/120; } } } so-0/1/1 { # Connected to R2. unit 0 { family inet { address 10.0.0.2/24; } family inet6 { address 0:0:FFFF:10.0.0.2/120; } } } } }
ルーター3
[edit] class-of-service { classifiers { # Router 3 classifiers. dscp-ipv6 IPv6-classifier { import default; # Uses the DSCP default map. forwarding-class be-DATA-class { loss-priority high code-points 000001; } forwarding-class ef-FIN-class { loss-priority high code-points 101111; } forwarding-class af-AV-class { loss-priority high code-points 001100; } forwarding-class nc-CONTROL-class { loss-priority high code-points 110001; } } } drop-profiles { # Router 3 drop profiles. af-AV-normal { interpolate { fill-level [95 100]; drop-probability [0 100]; } } af-AV-with-PLP { interpolate { fill-level [60 70 80 90 95]; drop-probability [80 90 95 97 100]; } } } forwarding-classes { # Router 3 forwarding classes. queue 0 be-DATA-class; queue 1 ef-FIN-class; queue 2 af-AV-class; queue 3 nc-CONTROL-class; } interfaces { # Router 3 class-of-service interfaces. so-2/0/1 { # To servers. scheduler-map diffserv-cos-map; unit 0 { classifiers { dscp-ipv6 IPv6-classifier; } rewrite-rules { dscp-ipv6 rewrite-IPv6-dscp; } } } rewrite-rules rewrite-IPv6-dscps { # Router 3 rewrite rules. forwarding-class be-DATA-class { loss-priority low code points 000000; loss-priority high code points 000001; } forwarding-class ef-FIN-class { loss-priority low code points 101110; loss-priority high code points 101111; } forwarding-class af-AV-class { loss-priority low code points 001010; loss-priority high code points 001100; } forwarding-class nc-CONTROL-class { loss-priority low code points 110000; loss-priority high code points 110001; } } scheduler-maps { # Router 3 scheduler map. diffserv-cos-map { forwarding-class be-DATA-class scheduler be-DATA-scheduler; forwarding-class ef-FIN-class scheduler ef-FIN-scheduler; forwarding-class af-AV-class scheduler af-AV-scheduler; forwarding-class nc-CONTROL-class scheduler nc-CONTROL-scheduler; } } schedulers { # Router 3 schedulers. be-DATA-scheduler { transmit-rate percent 40; buffer-size percent 40; priority low; } ef-FIN-scheduler { transmit-rate percent 10; buffer-size percent 10; priority high; } af-AV-scheduler { transmit-rate percent 45; buffer-size percent 45; priority high; drop-profile-map loss-priority low protocol any drop-profile af-AV-normal; drop-profile-map loss-priority high protocol any drop-profile af-AV-with-PLP; } nc-CONTROL-scheduler { transmit-rate percent 5; buffer-size percent 5; priority low; } } firewall { # Router 3 firewall policer and filter. policer ef-FIN-Policer-Profile { if-exceeding { bandwidth-percent 10; burst-size-limit 2k; } then loss-priority high; } family inet6 { filter mf-classifier { filter-specific; term AV { from { destination-address { 0:0:FFFF:172.16.79.11; } } then { loss-priority low; forwarding-class af-AV-class; } } term Finance { from { destination-address { O:0:FFFF:172.16.79.63; } } then { policer ef-FIN-Policer-Profile; forwarding-class ef-FIN-class; } } term Network-Control { from { traffic-class 192; # 192 is the 110000 traffic class. } then { forwarding-class nc-CONTROL-class; # This is network control traffic. } } term Data { then forwarding-class be-DATA-class; # The rest is data. } } } } interfaces { # Router 3 interfaces. so-2/0/0 { # To servers. unit 0 { family inet { address 1172.16.79.1/24; } family inet6 { filter { input mf-classifier; } address 0:0:FFFF:172.16.79.1/120; } } } so-2/0/1 { # to R2 unit 0 { family inet { address 10.0.1.2/24; } family inet6 { address 0:0:FFFF:10.0.1.2/120; } } } } } }
検証
IPv6 DiffServ 設定を使用した CoS が正しいことを確認するには、以下のコマンドを使用します。
show class-of-service classifier type dscp-ipv6
show class-of-service rewrite-rule type dscp-ipv6
show class-of-service interface
show class-of-service forwarding-table classifier mapping
show class-of-service forwarding-table rewrite-rule mapping
show class-of-service scheduler-map
scheduler-map-nameshow class-of-service forwarding-table scheduler-map
以下のセクションでは、設定例で使用されるこれらのコマンドの出力を示します。
DiffServ 分類子
user@R1> show class-of-service classifier type dscp-ipv6 Classifier: dscp-ipv6-default, Code point type: dscp-ipv6, Index: 4 Code point Forwarding class Loss priority 000000 be-DATA-class low 000001 be-DATA-class low 000010 be-DATA-class low 000011 be-DATA-class low 000100 be-DATA-class low 000101 be-DATA-class low 000110 be-DATA-class low 000111 be-DATA-class low 001000 be-DATA-class low 001001 be-DATA-class low 001010 af-AV-class low 001011 be-DATA-class low 001100 af-AV-class high 001101 be-DATA-class low 001110 af-AV-class high 001111 be-DATA-class low 010000 be-DATA-class low 010001 be-DATA-class low 010010 be-DATA-class low 010011 be-DATA-class low 010100 be-DATA-class low 010101 be-DATA-class low 010110 be-DATA-class low 010111 be-DATA-class low 011000 be-DATA-class low 011001 be-DATA-class low 011010 be-DATA-class low 011011 be-DATA-class low 011100 be-DATA-class low 011101 be-DATA-class low 011110 be-DATA-class low 011111 be-DATA-class low 100000 be-DATA-class low 100001 be-DATA-class low 100010 be-DATA-class low 100011 be-DATA-class low 100100 be-DATA-class low 100101 be-DATA-class low 100110 be-DATA-class low 100111 be-DATA-class low 101000 be-DATA-class low 101001 be-DATA-class low 101010 be-DATA-class low 101011 be-DATA-class low 101100 be-DATA-class low 101101 be-DATA-class low 101110 ef-FIN-class low 101111 be-DATA-class low 110000 nc-CONTROL-class low 110001 be-DATA-class low 110010 be-DATA-class low 110011 be-DATA-class low 110100 be-DATA-class low 110101 be-DATA-class low 110110 be-DATA-class low 110111 be-DATA-class low 111000 nc-CONTROL-class low 111001 be-DATA-class low 111010 be-DATA-class low 111011 be-DATA-class low 111100 be-DATA-class low 111101 be-DATA-class low 111110 be-DATA-class low 111111 be-DATA-class low Classifier: IPv6-classifier, Code point type: dscp-ipv6, Index: 18301 Code point Forwarding class Loss priority 000000 be-DATA-class low 000001 be-DATA-class high 000010 be-DATA-class low 000011 be-DATA-class low 000100 be-DATA-class low 000101 be-DATA-class low 000110 be-DATA-class low 000111 be-DATA-class low 001000 be-DATA-class low 001001 be-DATA-class low 001010 af-AV-class low 001011 be-DATA-class low 001100 af-AV-class high 001101 be-DATA-class low 001110 af-AV-class high 001111 be-DATA-class low 010000 be-DATA-class low 010001 be-DATA-class low 010010 be-DATA-class low 010011 be-DATA-class low 010100 be-DATA-class low 010101 be-DATA-class low 010110 be-DATA-class low 010111 be-DATA-class low 011000 be-DATA-class low 011001 be-DATA-class low 011010 be-DATA-class low 011011 be-DATA-class low 011100 be-DATA-class low 011101 be-DATA-class low 011110 be-DATA-class low 011111 be-DATA-class low 100000 be-DATA-class low 100001 be-DATA-class low 100010 be-DATA-class low 100011 be-DATA-class low 100100 be-DATA-class low 100101 be-DATA-class low 100110 be-DATA-class low 100111 be-DATA-class low 101000 be-DATA-class low 101001 be-DATA-class low 101010 be-DATA-class low 101011 be-DATA-class low 101100 be-DATA-class low 101101 be-DATA-class low 101110 ef-FIN-class low 101111 ef-FIN-class high 110000 nc-CONTROL-class low 110001 nc-CONTROL-class high 110010 be-DATA-class low 110011 be-DATA-class low 110100 be-DATA-class low 110101 be-DATA-class low 110110 be-DATA-class low 110111 be-DATA-class low 111000 nc-CONTROL-class low 111001 be-DATA-class low 111010 be-DATA-class low 111011 be-DATA-class low 111100 be-DATA-class low 111101 be-DATA-class low 111110 be-DATA-class low 111111 be-DATA-class low
ルールの書き換え
user@R1> show class-of-service rewrite-rule type dscp-ipv6 Rewrite rule: dscp-ipv6-default, Code point type: dscp-ipv6, Index: 20 Forwarding class Loss priority Code point be-DATA-class low 000000 be-DATA-class high 000000 ef-FIN-class low 101110 ef-FIN-class high 101110 af-AV-class low 001010 af-AV-class high 001100 nc-CONTROL-class low 110000 nc-CONTROL-class high 111000 Rewrite rule: rewrite-IPv6-dscp, Code point type: dscp-ipv6, Index: 58077 Forwarding class Loss priority Code point be-DATA-class low 000000 be-DATA-class high 000001 ef-FIN-class low 101110 ef-FIN-class high 101111 af-AV-class low 001010 af-AV-class high 001100 nc-CONTROL-class low 110000 nc-CONTROL-class high 110001
サービス クラス インターフェイス
user@R1> show class-of-service interface ... Physical interface: so-0/0/1, Index: 141 Queues supported: 4, Queues in use: 4 Scheduler map: diffserv-cos-map, Index: -543019056 Logical interface: so-0/0/1.0, Index: 68 Object Name Type Index Rewrite rewrite-IPv6-dscp dscp-ipv6 58077 Rewrite exp-default exp 21 Classifier IPv6-classifier dscp-ipv6 18301 Classifier exp-default exp 5 ... Physical interface: so-0/1/1, Index: 144 Queues supported: 4, Queues in use: 4 Scheduler map: <default>, Index: -113795564 Logical interface: so-0/1/1.0, Index: 69 Object Name Type Index Rewrite exp-default exp 21 Classifier exp-default exp 5 Classifier ipprec-compatibility ip 8
分類子マッピング
user@R1> show class-of-service forwarding-table classifier mapping Table Index/ Interface Index Q num Table type so-0/0/1.0 68 18301 IPv6 DSCP so-0/1/1.0 69 8 IPv4 precedence
ルールの書き換えマッピング
user@R1> show class-of-service forwarding-table rewrite-rule mapping Interface Index Table index Type so-0/1/1.0 68 58077 IPv6 DSCP
スケジューラ マップ
user@R1> show class-of-service scheduler-map diffserv-cos-map Scheduler map: diffserv-cos-map, Index: 1094596010 Scheduler: be-DATA-scheduler, Forwarding class: be-DATA-class, Index: 14343 Transmit rate: 40 percent, Rate Limit: none, Buffer size: 40 percent, Priority: low Drop profiles: Loss priority Protocol Index Name Low non-TCP 1 <default-drop-profile> Low TCP 1 <default-drop-profile> High non-TCP 1 <default-drop-profile> High TCP 1 <default-drop-profile> Scheduler: ef-FIN-scheduler, Forwarding class: ef-FIN-class, Index: 21707 Transmit rate: 10 percent, Rate Limit: none, Buffer size: 10 percent, Priority: high Drop profiles: Loss priority Protocol Index Name Low non-TCP 1 <default-drop-profile> Low TCP 1 <default-drop-profile> High non-TCP 1 <default-drop-profile> High TCP 1 <default-drop-profile> Scheduler: af-AV-scheduler, Forwarding class: af-AV-class, Index: 51704 Transmit rate: 45 percent, Rate Limit: none, Buffer size: 45 percent, Priority: high Drop profiles: Loss priority Protocol Index Name Low non-TCP 61474 af-AV-normal Low TCP 61474 af-AV-normal High non-TCP 65199 af-AV-with-PLP High TCP 65199 af-AV-with-PLP Scheduler: nc-CONTROL-scheduler, Forwarding class: nc-CONTROL-class, Index: 50404 Transmit rate: 5 percent, Rate Limit: none, Buffer size: 5 percent, Priority: low Drop profiles: Loss priority Protocol Index Name Low non-TCP 1 <default-drop-profile> Low TCP 1 <default-drop-profile> High non-TCP 1 <default-drop-profile> High TCP 1 <default-drop-profile> user@R1> show class-of-service forwarding-table scheduler-map ... Interface: so-0/0/1 (Index: 141, Map index: -543019056, Map type: FINAL, Num of queues: 4): Entry 0 (Scheduler index: 14343, Queue #: 0): Tx rate: 0 Kb (40%), Buffer size: 40 percent Priority low PLP high: 1, PLP low: 1, TCP PLP high: 1, TCP PLP low: 1 Entry 1 (Scheduler index: 21707, Queue #: 1): Tx rate: 0 Kb (10%), Buffer size: 10 percent Priority high PLP high: 1, PLP low: 1, TCP PLP high: 1, TCP PLP low: 1 Entry 2 (Scheduler index: 51704, Queue #: 2): Tx rate: 0 Kb (45%), Buffer size: 45 percent Priority high PLP high: 65199, PLP low: 61474, TCP PLP high: 65199, TCP PLP low: 61474 Entry 3 (Scheduler index: 50404, Queue #: 3): Tx rate: 0 Kb (5%), Buffer size: 5 percent Priority low PLP high: 1, PLP low: 1, TCP PLP high: 1, TCP PLP low: 1 ...