示例:在通过聚合以太网的 VLAN 接口上配置静态订阅者接口
此示例说明如何使用双链路聚合以太网逻辑接口上的静态虚拟 LAN (VLAN) 来配置订阅者接口。在此示例中,底层聚合以太网逻辑接口配置为在 DPC 级别实现一对一主动/备份冗余,并通过在聚合以太网逻辑接口上应用 CoS 参数来配置每个订阅者的静态分层服务等级 (CoS)。
定义路由器上的聚合以太网接口数量。
在此示例中,路由器上仅配置了一个聚合以太网逻辑接口。
[edit] chassis { aggregated-devices { ethernet { device-count 1; } } }
配置
ae0
双链路聚合以太网逻辑接口,用作静态 VLAN 用户接口的底层接口。为了支持分层 CoS,物理端口必须在 MX 系列路由器的 EQ DPC 上。在此示例中,LAG 束配置为一对一主动/备份链路冗余。为了在 DPC 级别支持链路冗余,LAG 束会连接两个不同 EQ DPC 的端口。
[edit] interfaces { ge-5/0/3 { gigether-options { 802.3ad { ae0; primary; } } ge-5/1/2 { gigether-options { 802.3ad { ae0; backup; } } } } }
配置为
ae0
用作静态 VLAN 接口的底层接口。[edit] interfaces { ae0 { hierarchical-scheduler; aggregated-ether-options { link-protection; minimum-links 1; link-speed 1g; lacp { active; } } } }
配置静态流量整形和调度参数。
[edit] class-of-service { forwarding-classes { # Associate queue numbers with class names queue 0 be; queue 1 e; queue 2 af; queue 3 nc; } schedulers { # Define output queue properties scheduler_be { transmit-rate percent 30; buffer-size percent 30; } scheduler_ef { transmit-rate percent 40; buffer-size percent 40; } scheduler_af { transmit-rate percent 25; buffer-size percent 25; } scheduler_nc { transmit-rate percent 5; buffer-size percent 5; } } scheduler-maps { # Associate queues with schedulers smap_2 { forwarding-class be scheduler_be; forwarding-class ef scheduler_ef; forwarding-class-af scheduler_af; forwarding-class-nc scheduler_nc; } } }
将静态 CoS 连接到聚合以太网接口的物理和逻辑接口。
此示例定义了三个流量控制配置文件,但只有两个配置文件通过聚合以太网应用于静态 VLAN 用户接口:
该
tcp_for_ae_device_pir_500m
配置文件定义了整形速率,并应用于两个底层物理接口(ge-5/0/3
和ge-5/1/2
)。此
tcp-for-ae_smap_video_pir_20m_delay_30m
配置文件定义了调度器图、整形速率和延迟缓冲区速率,并应用于聚合以太网捆绑包 (ae0.0
) 上的一个逻辑接口。
[edit] class-of-service { traffic-control-profiles { # Configure traffic shaping and scheduling profiles tcp_for_ae_device_pir_500m { shaping-rate 20m; } tcp_for_ae_smap_video_pir_20m_delay_30m { scheduler-map smap_video; shaping-rate 20m; delay-buffer-rate 30m; } tcp_for_ae_smap_video_cir_50m_delay_75m { scheduler-map smap_video; guaranteed-rate 50m; delay-buffer-rate 75m; } } interfaces { # Apply two traffic-control profiles to the LAG ae0 { # Two underlying physical interfaces on separate EQ DPCs output-traffic-control-profile tcp-for-ae_device_pir_500m; unit 0 { # One of the two logical interfaces on ’ae0’ output-traffic-control-profile tcp-for-ae_smap_video_pir_20m_delay_30m; } } } }