例: 転送クラスの設定
デフォルトでは、すべてのプラットフォームで、転送クラスの概要 に示すように、4 つの出力キューが 4 つの FC にマッピングされます。複数ジュニパーネットワークスでは、最大 8 個の FCS と 8 個のキューを設定できます。
最大 8 個の FCSを設定するには、 [サービス クラス転送クラスの編集] 階層レベルに queue ステートメントを含める:
[edit class-of-service forwarding-classes] queue queue-number class-name;
出力キュー番号は 0~7 にできます。転送クラスは、出力キューと 1 対 1 でマップする必要があります。キュー 0~7 のデフォルトのスケジューラー伝送レートとバッファー サイズの割合は、それぞれ 95、0、0、5、0、0、0、0 です。
たとえば、8 個の FCS と 8 個のキューの間に 1 対 1 のマッピングを設定するには、次の設定を使用します。
[edit class-of-service] forwarding-classes { queue 0 be; queue 1 ef; queue 2 af; queue 3 nc; queue 4 ef1; queue 5 ef2; queue 6 af1; queue 7 nc1; }
8 つの分類子の定義
[edit class-of-service] classifiers { dscp dscp-table { forwarding-class ef { loss-priority low code-points [101000, 101001]; loss-priority high code-points [101010, 101011]; } forwarding-class af { loss-priority low code-points [010000, 010001]; loss-priority high code-points [010010, 010011]; } forwarding-class be { loss-priority low code-points [000000]; } forwarding-class nc { loss-priority low code-points [111000]; } forwarding-class ef1 { loss-priority low code-points [101100, 101101]; loss-priority high code-points [101110]; } forwarding-class af1 { loss-priority high code-points [101110]; } forwarding-class ef2 { loss-priority low code-points [101111]; } forwarding-class nc1 { loss-priority low code-points [111001]; } } }
スケジューラ マップへの 8 個のスケジューラの追加
4 つのキューに制限されているインターフェイスを除くすべてのインターフェイスにグローバルに適用するカスタム スケジューラ マップを設定します。
[edit class-of-service] scheduler-maps { sched { forwarding-class be scheduler Q0; forwarding-class ef scheduler Q1; forwarding-class af scheduler Q2; forwarding-class nc scheduler Q3; forwarding-class ef1 scheduler Q4; forwarding-class ef2 scheduler Q5; forwarding-class af1 scheduler Q6; forwarding-class nc1 scheduler Q7; } } schedulers { Q0 { transmit-rate percent 25; buffer-size percent 25; priority low; drop-profile-map loss-priority any protocol both drop-default; } Q1 { buffer-size temporal 2000; priority strict-high; drop-profile-map loss-priority any protocol both drop-ef; } Q2 { transmit-rate percent 35; buffer-size percent 35; priority low; drop-profile-map loss-priority any protocol both drop-default; } Q3 { transmit-rate percent 5; buffer-size percent 5; drop-profile-map loss-priority any protocol both drop-default; } Q4 { transmit-rate percent 5; priority high; drop-profile-map loss-priority any protocol both drop-ef; } Q5 { transmit-rate percent 10; priority high; drop-profile-map loss-priority any protocol both drop-ef; } Q6 { transmit-rate remainder; priority low; drop-profile-map loss-priority any protocol both drop-default; } Q7 { transmit-rate percent 5; priority high; drop-profile-map loss-priority any protocol both drop-default; } }
IP Precedence 分類子と書き換えテーブルの設定
[edit class-of-service] classifiers { inet-precedence inet-classifier { forwarding-class be { loss-priority low code-points 000; } forwarding-class af11 { loss-priority high code-points 001; } forwarding-class ef { loss-priority low code-points 010; } forwarding-class nc1 { loss-priority high code-points 011; } forwarding-class be1 { loss-priority low code-points 100; } forwarding-class af12 { loss-priority high code-points 101; } forwarding-class ef1 { loss-priority low code-points 110; } forwarding-class nc2 { loss-priority high code-points 111; } } } exp exp-rw-table { forwarding-class be { loss-priority low code-point 000; } forwarding-class af11 { loss-priority high code-point 001; } forwarding-class ef { loss-priority low code-point 010; } forwarding-class nc1 { loss-priority high code-point 111; } forwarding-class be1 { loss-priority low code-point 100; } forwarding-class af12 { loss-priority high code-point 101; } forwarding-class ef1 { loss-priority low code-point 110; } forwarding-class nc2 { loss-priority low code-point 111; } } inet-precedence inet-rw-table { forwarding-class be { loss-priority low code-point 000; } forwarding-class af11 { loss-priority high code-point 001; } forwarding-class ef { loss-priority low code-point 010; } forwarding-class nc1 { loss-priority low code-point 111; } forwarding-class be1 { loss-priority low code-point 100; } forwarding-class af12 { loss-priority high code-point 101; } forwarding-class ef1 { loss-priority low code-point 110; } forwarding-class nc2 { loss-priority low code-point 111; } }
転送クラスIDPを使用したルーティング ポリシーの設定
IP パケットの DSCP 値IDP書き換えるアクションとして、転送クラスを使用して IDP ポリシーを設定します。
[edit class-of-service] security idp idp-policy policy_name rulebase-ips rule rule_name { then { action { class-of-service { forwarding-class forwarding-class-name; dscp-code-point value; } } } }