示例:通过聚合以太网在 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; } } } }