示例:在聚合接口上配置 CoS
此示例说明了如何配置 CoS 调度器参数并将其应用于聚合接口。
将扩展公式应用于绝对速率
当成员链路接口的总速度为 100 Mbps(可用带宽为 100 Mbps)时,按如下配置队列:
[edit class-of-service] schedulers { be { transmit-rate 10m; } af { transmit-rate 20m; } ef { transmit-rate 80m; } nc { transmit-rate 30m; } }
聚合接口配置的总传输速率为 10m
+ 20m
+ 80m
+ 30m
= 140 Mbps,这意味着传输速率被过度配置了 40%。因此,软件会缩减配置,以匹配 100 Mbps 的可用带宽,如下所示:
be = (10/140) * 100 = 7 percent of 100 Mbps = 7 Mbps af = (20/140) * 100 = 14 percent of 100 Mbps = 14 Mbps ef = (80/140) * 100 = 57 percent of 100 Mbps = 57 Mbps nc = (30/140) * 100 = 21 percent of 100 Mbps = 21 Mbps
将扩展公式应用于百分比和绝对速率的混合
配置以下百分比和绝对速率:
[edit class-of-service] schedulers { be { transmit-rate 20 percent; } af { transmit-rate 40 percent; } ef { transmit-rate 150m; } nc { transmit-rate 10 percent; } }
假设 300 Mbps 的可用带宽,配置的百分比与以下绝对速率相关联:
schedulers { be { transmit-rate 60m; } af { transmit-rate 120m; } ef { transmit-rate 150m; } nc { transmit-rate 30m; } }
软件按以下方式扩展带宽分配:
be = (60/360) * 100 = 17 percent of 300 Mbps = 51 Mbps af = (120/360) * 100 = 33 percent of 300 Mbps = 99 Mbps ef = (150/360) * 100 = 42 percent of 300 Mbps = 126 Mbps nc = (30/360) * 100 = 8 percent of 300 Mbps = 24 Mbps
配置聚合以太网接口
使用以下时间表配置聚合以太网接口:
[edit class-of-service] scheduler-maps { aggregated-sched { forwarding-class be scheduler be; forwarding-class af scheduler af; forwarding-class ef scheduler ef; forwarding-class nc scheduler nc; } } schedulers { be { transmit-rate percent 10; buffer-size percent 25; } af { transmit-rate percent 20; buffer-size percent 25; } ef { transmit-rate 80m; buffer-size percent 25; } nc { transmit-rate percent 30; buffer-size percent 25; } }
在这种情况下,成员链路调度器图的传输速率如下所示:
be
— 7%af
—14%ef
—57%nc
— 21%
如果将快速以太网接口添加到聚合,则聚合带宽为 200 Mbps,并且成员链路调度器图的传输速率如下所示:
be
—10%af
—20%ef
—40%nc
—30%