例:CoS ベースの転送の設定
ルーターAには、ルーターDの宛先 10.255.71.208 への2つのルートがあります。 図1に示すように、1つのルートはルーターBを経由し、もう1つのルートはルーターCを経由します。
CoSベース転送(CBF)を使用してルーターAを設定し、キュー0とキュー2にルーターBを選択し、キュー1とキュー3にルーターCを選択します。
図 1:CoS ベース転送
の例
の例
OSPFをIGPとしてCBFを設定する場合、IPv4またはIPv6アドレスとしてではなく、インターフェイス名としてネクストホップを指定する必要があります。この例のネクストホップは、 および so-0/3/0.0としてge-2/0/0.0指定されています。
[edit class-of-service]
forwarding-policy {
next-hop-map my_cbf {
forwarding-class be {
next-hop ge-2/0/0.0;
}
forwarding-class ef {
next-hop so-0/3/0.0;
}
forwarding-class af {
next-hop ge-2/0/0.0;
}
forwarding-class nc {
next-hop so-0/3/0.0;
}
}
}
classifiers {
inet-precedence inet {
forwarding-class be {
loss-priority low code-points [ 000 100 ];
}
forwarding-class ef {
loss-priority low code-points [ 001 101 ];
}
forwarding-class af {
loss-priority low code-points [ 010 110 ];
}
forwarding-class nc {
loss-priority low code-points [ 011 111 ];
}
}
}
forwarding-classes {
queue 0 be;
queue 1 ef;
queue 2 af;
queue 3 nc;
}
interfaces {
at-4/2/0 {
unit 0 {
classifiers {
inet-precedence inet;
}
}
}
}
[edit policy-options]
policy-statement cbf {
from {
route-filter 10.255.71.208/32 exact;
}
then cos-next-hop-map my_cbf;
}
[edit routing-options]
graceful-restart;
forwarding-table {
export cbf;
}
[edit interfaces]
traceoptions {
file trace-intf size 5m world-readable;
flag all;
}
so-0/3/0 {
unit 0 {
family inet {
address 10.40.13.1/30;
}
family iso;
family mpls;
}
}
ge-2/0/0 {
unit 0 {
family inet {
address 10.40.12.1/30;
}
family iso;
family mpls;
}
}
at-4/2/0 {
atm-options {
vpi 1 {
maximum-vcs 1200;
}
}
unit 0 {
vci 1.100;
family inet {
address 10.40.11.2/30;
}
family iso;
family mpls;
}
}