配置基于队列的 WRED
设备支持基于 DSCP 优先级的 WRED 和基于 IP 优先级的 WRED,配置思路如下:
配置丢弃模板
配置 WRED 参数
在队列模板中调用丢弃模板
在接口出方向调用队列模板
配置命令:
System-view drop-profile [drop-profile-name] // 创建丢弃模板 wred [dscp | ip-precedence] // 配置当前 WRED 丢弃模板基于 DSCP 优先级或 IP 优先级进行丢弃 dscp [dscp-value] low-limit [low-limit-percentage] high-limit [high-limit-percentage] discard-percentage [discard-percentage] // 配置基于 DSCP 优先级的 WRED 参数 ip-precedence [ip-precedence-value] low-limit [low-limit-percentage] high-limit [high-limit-percentage] discard-percentage [discard-percentage] //(可选)配置基于 IP 优先级的 WRED 参数 qos queue-profile [queue-profile-name] // 进入队列模板视图 queue [queue-index] drop-profile [drop-profile-name] // 在队列模板中为指定队列绑定丢弃模板 interface [interface-type interface-num] // 进入接口视图 qos queue-profile [queue-profile-name] // 在接口下应用队列模板 // 检查基于队列的拥塞避免配置结果 System-view interface [interface-type interface-num] display this //查看接口下绑定的队列模板。 qos queue-profile [queue-profile-name] display this //查看队列模板绑定的丢弃模板。 display drop-profile [ drop-profile-name ] //查看丢弃模板的配置信息。
配置 MQC 实现拥塞避免
丢弃模板在流行为中绑定后,将流行为和对应的流分类在流策略下进行关联,并将此流策略应用到接口上,可以实现对匹配流分类规则的流量的拥塞避免
配置思路如下:
1)配置丢弃模板
2)配置 Traffic classifier 与 Traffic behavior
3)使用 Traffic policy 工具将 Traffic classifier 与 Traffic behavior 进行绑定
4)将 Traffic policy 应用到设备接口出方向上
System-view drop-profile [drop-profile-name] // 创建丢弃模板; wred [dscp | ip-precedence] // 配置当前 WRED 丢弃模板基于 DSCP 优先级或 IP 优先级进行丢弃; dscp [dscp-value] low-limit [low-limit-percentage] high-limit [high-limit-percentage] discard-percentage [discard-percentage] // 配置基于 DSCP 优先级的 WRED 参数; ip-precedence [ip-precedence-value] low-limit [low-limit-percentage] high-limit [high-limit-percentage] discard-percentage [discard-percentage] //(可选)配置基于 IP 优先级的 WRED 参数; System-view traffic classifier [classifier-name] // 创建流分类; if-match [acl | vlan-id | …. ] // 基于流量特征匹配流量; System-view traffic behavior [behavior-name] // 创建流行为; drop-profile [drop-profile-name] // 在流行为中绑定已创建的丢弃模板; System-view traffic policy [policy-name] // 创建流策略; classifier [classifier-name] behavior [behavior-name] // 绑定流分类与流行为; System-view interface [interface-type interface-num] // 进入接口视图; traffic-policy [policy-name] outbound // 在接口出方向上应用流策略; // 检查基于MQC的拥塞避免配置结果 System-view display traffic classifier user-defined [ classifier-name ] //查看已配置的流分类信息。 display traffic behavior [ system-defined | user-defined ] [ behavior-name ] //查看已配置的流行为信息。 display traffic policy user-defined [ policy-name ] classifier [classifier-name ] //查看流策略的配置信息。 display traffic-policy applied-record [ policy-name ] //查看指定流策略的应用记录。