控制剩余流量
您可以在一个接口下配置多个逻辑接口。但是,其中只有一部分可能附加了流量控制配置文件。例如,您可以通过同一服务 VLAN 配置三个逻辑接口(单元),但仅对其中一个逻辑接口单元应用指定尽力而为队列和语音队列的流量控制配置文件。来自其余两个逻辑接口的流量被视为剩余流量。要为剩余流量配置传输速率保证,请配置output-traffic-control-profile-remaining为剩余流量指定保证速率的语句。如果没有此语句,剩余流量将获得默认的最小带宽。同样,可以在与语句引用output-traffic-control-profile-remaining的流量控制配置文件中指定 and shaping-rate delay-buffer-rate 语句,以便为剩余流量进行整形并提供缓冲。
考虑 图 1 所示的接口。客户 VLAN 3 和 4 没有显式流量控制配置文件。但是,服务提供商可能希望为这些客户 VLAN 的总流量方向建立整形和保证传输速率。中的解决方案是为接口上的所有剩余流量配置和应用流量控制配置文件。
此示例考虑的客户 VLAN 3 和 4 没有显式流量控制配置文件,但需要为这些客户 VLAN 的流量流向建立整形和保证的传输速率。解决方案是将 svlan1 流量控制配置文件添加到接口集。此示例基于前面的示例构建,因此不会重复所有配置详细信息,只会重复服务 VLAN 级别的配置详细信息。
[edit class-of-service interfaces]
interface-set svlan0 {
output-traffic-control-profile tcp-svlan0;
}
interface-set svlan1 {
output-traffic-control-profile tcp-svlan1; # For explicitly shaped traffic.
output-traffic-control-profile-remaining tcp-svlan1-remaining; # For all remaining traffic.
}
[edit class-of-service traffic-control-profiles]
tcp-svlan1 {
shaping-rate 400m;
guaranteed-rate 300m;
}
tcp-svlan1-remaining {
shaping-rate 300m;
guaranteed-rate 200m;
scheduler-map smap-remainder; # this smap is not shown in detail
}
接下来,考虑 图 2 中所示的示例。
的另一个示例
在此示例中,具有 ge-1/0/0 三个逻辑接口(单元 1、单元 2 和单元 3)和接口集涵盖的 SVLAN 2000:
接口集的调度是通过引用指定接口集
svlan0的 、shaping-rate和delay-buffer-rate语句值的output-traffic-control-profile语句guaranteed-rate来指定的。在此示例中,名为“保证 100 Mbps”的tcp-svlan0输出流量控制配置文件将接口svlan0调整为 200 Mbps。剩余流量的调度和排队是通过引用
output-traffic-control-profile-remainingscheduler-map引用为剩余svlan0流量建立队列的语句来指定的。指定的流量控制配置文件还可以为剩余流量配置保证、整形和延迟缓冲速率。在此示例中,引用scheduler-map smap-svlan0-rem,它要求为剩余流量(即单元 3 和单元 4 上的流量,output-traffic-control-profile-remaining tcp-svlan0-rem未按接口集分类svlan0)提供尽力而为队列。该示例还为所有剩余流量指定guaranteed-rate200 Mbps 和shaping-rate300 Mbps。逻辑接口
ge-1/0/0 unit 1的调度和排队是“传统”配置的,并使用output-traffic-control-profile为该单元指定的。在此示例中,output-traffic-control-profile tcp-ifl1指定 的ge-1/0/0 unit 1调度和排队。
此示例不包括配置 [edit interfaces] 。
[edit class-of-service interfaces]
interface-set {
svlan0 {
output-traffic-control-profile tcp-svlan0; # Guarantee & shaper for svlan0.
}
}
ge-1/0/0 {
output-traffic-control-profile-remaining tcp-svlan0-rem;
# Unit 3 and 4 are not explicitly configured, but captured by “remaining”
unit 1 {
output-traffic-control-profile tcp-ifl1; # Unit 1 be & ef queues.
}
}
以下是此示例的流量控制配置文件的配置方式:
[edit class-of-service traffic-control-profiles]
tcp-svlan0 {
shaping-rate 200m;
guaranteed-rate 100m;
}
tcp-svlan0-rem {
shaping-rate 300m;
guaranteed-rate 200m;
scheduler-map smap-svlan0-rem; # This specifies queues for remaining traffic
}
tcp-ifl1 {
scheduler-map smap-ifl1;
}
最后,下面是示例的调度器映射和队列:
[edit class-of-service scheduler-maps]
smap-svlan0-rem {
forwarding-class best-effort scheduler sched-foo;
}
smap-ifl1 {
forwarding-class best-effort scheduler sched-bar;
forwarding-class assured-forwarding scheduler sched-baz;
}
此示例未给出引用调度程序的配置。