示例:将调度器图和整形速率应用于 DLCI
此示例说明如何将调度器图和整形速率应用于各个逻辑接口。
要求
此示例使用以下硬件和软件组件:
在支持智能排队 (IQ) 的路由器线卡上运行的 Junos OS 7.4 或更高版本。
在包含 16x10GE MPC 或 MPC3E 线卡的 MX 系列路由器上运行的 Junos OS 13.2 或更高版本。
在包含 MPC4E 线卡的 MX 系列路由器上运行的 Junos OS 13.3 或更高版本。
在包含 MPC6E 线卡的 MX 系列路由器上运行的 Junos OS 15.1 或更高版本。
概述
默认情况下,不会在逻辑接口上启用输出计划。未整形配置的逻辑接口共享默认计划程序。 逻辑接口调度 (也称为 按单元调度)允许您在一个逻辑接口上启用多个输出队列,并为每个队列关联自定义调度和整形。
此示例说明如何通过直接使用调度器图和整形速率来为逻辑接口定义调度器。
在此示例中,我们将调度器 sched-map-logical-0
与物理接口 unit 0
上的逻辑接口 t3-1/0/0
相关联,并为逻辑接口分配 10 Mbps 的传输带宽。我们还将调度器 sched-map-logical-1
与同一物理接口 unit 1
上的逻辑接口相关联, t3-1/0/0
并为逻辑接口分配 20 Mbps 的传输带宽。
分配的带宽在调度器图中的各个转发类之间共享。尽管这些调度器是在单个物理接口上配置的,但它们彼此之间是独立的。一个逻辑接口单元上的流量不会影响另一个逻辑接口单元上的传输优先级、带宽分配或丢弃行为。
有关类似示例,请参阅 示例:对 VLAN 应用调度和整形。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层级的 [edit]
CLI 中。
set interfaces t3-1/0/0:1 per-unit-scheduler set interfaces t3-1/0/0:1 encapsulation frame-relay set interfaces t3-1/0/0:1 unit 0 dlci 100 set interfaces t3-1/0/0:1 unit 0 family inet address 10.1.1.0/24 set interfaces t3-1/0/0:1 unit 1 dlci 101 set interfaces t3-1/0/0:1 unit 1 family inet address 10.1.1.1/24 set class-of-service interfaces t3-1/0/0:1 unit 0 scheduler-map sched-map-logical-0 set class-of-service interfaces t3-1/0/0:1 unit 0 shaping-rate 10m set class-of-service interfaces t3-1/0/0:1 unit 1 scheduler-map sched-map-logical-1 set class-of-service interfaces t3-1/0/0:1 unit 1 shaping-rate 20m set class-of-service scheduler-maps sched-map-logical-0 forwarding-class best-effort scheduler sched-best-effort-0 set class-of-service scheduler-maps sched-map-logical-0 forwarding-class assured-forwarding scheduler sched-bronze-0 set class-of-service scheduler-maps sched-map-logical-0 forwarding-class expedited-forwarding scheduler sched-silver-0 set class-of-service scheduler-maps sched-map-logical-0 forwarding-class network-control scheduler sched-gold-0 set class-of-service scheduler-maps sched-map-logical-1 forwarding-class best-effort scheduler sched-best-effort-1 set class-of-service scheduler-maps sched-map-logical-1 forwarding-class assured-forwarding scheduler sched-bronze-1 set class-of-service scheduler-maps sched-map-logical-1 forwarding-class expedited-forwarding scheduler sched-silver-1 set class-of-service scheduler-maps sched-map-logical-1 forwarding-class network-control scheduler sched-gold-1 set class-of-service schedulers sched-best-effort-0 transmit-rate 4m set class-of-service schedulers sched-bronze-0 transmit-rate 3m set class-of-service schedulers sched-silver-0 transmit-rate 2m set class-of-service schedulers sched-gold-0 transmit-rate 1m set class-of-service schedulers sched-best-effort-1 transmit-rate 8m set class-of-service schedulers sched-bronze-1 transmit-rate 6m set class-of-service schedulers sched-silver-1 transmit-rate 4m set class-of-service schedulers sched-gold-1 transmit-rate 2m
程序
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关导航 CLI 的信息,请参阅 Junos OS CLI 用户指南。
配置设备接口。
[edit interfaces]
user@PE1# set t3-1/0/0:1 per-unit-scheduler user@PE1# set t3-1/0/0:1 encapsulation frame-relay user@PE1# set t3-1/0/0:1 unit 0 dlci 100 user@PE1# set t3-1/0/0:1 unit 0 family inet address 10.1.1.0/24 user@PE1# set t3-1/0/0:1 unit 1 dlci 101 user@PE1# set t3-1/0/0:1 unit 1 family inet address 10.1.1.1/24定义调度器。
[edit class-of-service]
user@PE1# set schedulers sched-best-effort-0 transmit-rate 4m user@PE1# set schedulers sched-bronze-0 transmit-rate 3m user@PE1# set schedulers sched-silver-0 transmit-rate 2m user@PE1# set schedulers sched-gold-0 transmit-rate 1m user@PE1# set schedulers sched-best-effort-1 transmit-rate 8m user@PE1# set schedulers sched-bronze-1 transmit-rate 6m user@PE1# set schedulers sched-silver-1 transmit-rate 4m user@PE1# set schedulers sched-gold-1 transmit-rate 2m定义调度器图。
[edit class-of-service]
user@PE1# set scheduler-maps sched-map-logical-0 forwarding-class best-effort scheduler sched-best-effort-0 user@PE1# set scheduler-maps sched-map-logical-0 forwarding-class assured-forwarding scheduler sched-bronze-0 user@PE1# set scheduler-maps sched-map-logical-0 forwarding-class expedited-forwarding scheduler sched-silver-0 user@PE1# set scheduler-maps sched-map-logical-0 forwarding-class network-control scheduler sched-gold-0 user@PE1# set scheduler-maps sched-map-logical-1 forwarding-class best-effort scheduler sched-best-effort-1 user@PE1# set scheduler-maps sched-map-logical-1 forwarding-class assured-forwarding scheduler sched-bronze-1 user@PE1# set scheduler-maps sched-map-logical-1 forwarding-class expedited-forwarding scheduler sched-silver-1 user@PE1# set scheduler-maps sched-map-logical-1 forwarding-class network-control scheduler sched-gold-1将调度器图和整形速率应用于逻辑接口。
[edit class-of-service]
user@PE1# set interfaces t3-1/0/0:1 unit 0 scheduler-map sched-map-logical-0 user@PE1# set interfaces t3-1/0/0:1 unit 0 shaping-rate 10m user@PE1# set interfaces t3-1/0/0:1 unit 1 scheduler-map sched-map-logical-1 user@PE1# set interfaces t3-1/0/0:1 unit 1 shaping-rate 20m
结果
在配置模式下,输入和 show class-of-service
命令以确认show interfaces
您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
[edit interfaces] user@PE1# show t3-1/0/0:1 { encapsulation frame-relay; per-unit-scheduler; } [edit class-of-service] user@PE1# show interfaces { t3-1/0/0:1 { unit 0 { scheduler-map sched-map-logical-0; shaping-rate 10m; } unit 1 { scheduler-map sched-map-logical-1; shaping-rate 20m; } } } scheduler-maps { sched-map-logical-0 { forwarding-class best-effort scheduler sched-best-effort-0; forwarding-class assured-forwarding scheduler sched-bronze-0; forwarding-class expedited-forwarding scheduler sched-silver-0; forwarding-class network-control scheduler sched-gold-0; } sched-map-logical-1 { forwarding-class best-effort scheduler sched-best-effort-1; forwarding-class assured-forwarding scheduler sched-bronze-1; forwarding-class expedited-forwarding scheduler sched-silver-1; forwarding-class network-control scheduler sched-gold-1; } } schedulers { sched-best-effort-0 { transmit-rate 4m; } sched-bronze-0 { transmit-rate 3m; } sched-silver-0 { transmit-rate 2m; } sched-gold-0 { transmit-rate 1m; } sched-best-effort-1 { transmit-rate 8m; } sched-bronze-1 { transmit-rate 6m; } sched-silver-1 { transmit-rate 4m; } sched-gold-1 { transmit-rate 2m; } }
完成设备配置后,请从配置模式进入 commit 。