예: CoS 기반 포워딩 구성
라우터 A에는 라우터 D에서 목적지 10.255.71.208 에 대한 두 개의 경로가 있습니다. 그림 1과 같이 한 경로는 Router B를 통과하고 다른 경로는 라우터 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;
}
}