示例:通过聚合以太网在 VLAN 接口上配置静态订阅者接口
此示例演示如何使用堆叠在两链路聚合以太网逻辑接口上的静态虚拟 LAN (VLAN) 来配置订阅者接口。此示例将底层聚合以太网逻辑接口配置为 DPC 级别的一对一主动/备份冗余,而按订阅者静态层次化服务等级 (CoS) 配置时,在聚合以太网逻辑接口上应用 CoS 参数。
定义路由器上的聚合以太网接口数量。
此示例中,路由器上仅配置了一个聚合以太网逻辑接口。
[edit] chassis { aggregated-devices { ethernet { device-count 1; } } }
配置
ae0
:两链路聚合以太网逻辑接口,用作静态 VLAN 用户接口的底层接口。为了支持分层结构CoS,物理端口必须位于 MX 系列路由器中的一个)。在此例中,LAG 束配置为一对一主动/备份链路冗余。为了在网络级别支持链路DPC,LAG 捆绑包会连接两个不同的一些不同或不同 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; } } } }