Host通过Device访问Server A。网络环境为:
· Host通过端口Twenty-FiveGigE1/0/1接入Device,其中访问Server A的报文源IP地址为192.168.0.1,DSCP优先级为5;
· Server A通过端口Twenty-FiveGigE1/0/2接入Device;
· Server B通过端口Twenty-FiveGigE1/0/3接入Device。
要求配置QoS策略,实现如下需求:
· 对Host访问Server A的流量进行统计;
· 将Host访问Server A的流量镜像到端口Twenty-FiveGigE1/0/3(设备会优先对报文进行镜像,再执行其他策略中流行为的动作);
· 重新标记Host访问Server的报文的DSCP优先级为50;
· 在端口Twenty-FiveGigE1/0/1入方向上限制流量速率为10M。
# 定义IPv4基本ACL 2000,对源IP地址为192.168.0.1的报文进行分类。
<Device> system-view
[Device] acl basic 2000
[Device-acl-ipv4-basic-2000] rule permit source 192.168.0.1 0
[Device-acl-ipv4-basic-2000] quit
# 定义类host,匹配IPv4基本ACL 2000。
[Device] traffic classifier host
[Device-classifier-host] if-match acl 2000
[Device-classifier-host] quit
# 定义类any,匹配所有报文。
[Device] traffic classifier any
[Device-classifier-any] if-match any
[Device-classifier-any] quit
# 定义流行为a,动作为基于包进行流量统计。
[Device] traffic behavior a
[Device-behavior-a] accounting packet
[Device-behavior-a] quit
# 定义流行为m,动作为镜像到端口Twenty-FiveGigE1/0/3。
[Device] traffic behavior m
[Device-behavior-m] mirror-to interface twenty-fivegige 1/0/3
[Device-behavior-m] quit
# 定义流行为r,动作为重标记报文的DSCP优先级为50。
[Device] traffic behavior r
[Device-behavior-r] remark dscp 50
[Device-behavior-r] quit
# 定义流行为c,动作为流量监管。报文正常流速为10240kbps,承诺突发尺寸为102400bytes。
[Device] traffic behavior c
[Device-behavior-c] car cir 10240 cbs 102400 green pass yellow pass red discard
[Device-behavior-c] quit
# 定义统计类型策略policy_a,为类host指定流行为a。
[Device] qos accounting policy policy_a
[Device-qospolicy-policy_a] classifier host behavior a
[Device-qospolicy-policy_a] quit
# 定义镜像类型策略policy_m,为类host指定流行为m。
[Device] qos mirroring policy policy_m
[Device-qospolicy-policy_m] classifier host behavior m
[Device-qospolicy-policy_m] quit
# 定义重标记类型策略policy_r,为类host指定流行为r。
[Device] qos remarking policy policy_r
[Device-qospolicy-policy_r] classifier host behavior r
[Device-qospolicy-policy_r] quit
# 定义通用类型策略policy_g,为类any指定流行为c。
[Device] qos policy policy_g
[Device-qospolicy-policy_g] classifier any behavior c
[Device-qospolicy-policy_g] quit
# 在端口Twenty-FiveGigE1/0/1入方向应用策略policy_a,policy_m,policy_r和policy_g。
[Device] interface twenty-fivegige 1/0/1
[Device-Twenty-FiveGigE1/0/1] qos apply accounting policy policy_a inbound
[Device-Twenty-FiveGigE1/0/1] qos apply mirroring policy policy_m inbound
[Device-Twenty-FiveGigE1/0/1] qos apply remarking policy policy_r inbound
[Device-Twenty-FiveGigE1/0/1] qos apply policy policy_g inbound
[Device-Twenty-FiveGigE1/0/1] quit
(1)
您好,以下是具体的配置命令,仅供参考,实际以现场为准,请悉知:
假设会议系统的网段为192.168.10.0/24
[H3C]acl basic 2000
[H3C-acl-ipv4-basic-2000]rule 0 permit source 192.168.10.0 0.0.0.255
[H3C-acl-ipv4-basic-2000]quit
[H3C]traffic classifier 1
[H3C-classifier-1]if-match acl 2000
[H3C-classifier-1]quit
[H3C]traffic behavior 1
[H3C-behavior-1]car cir 10240 green pass yellow pass red discard
[H3C-behavior-1]quit
[H3C]qos policy 1
[H3C-qospolicy-1]classifier 1 behavior 1
[H3C-qospolicy-1]quit
[H3C]int gi 1/0/1
[H3C-GigabitEthernet1/0/1]qos apply policy 1 inbound
[H3C-GigabitEthernet1/0/1]qos apply policy 1 outbound
[H3C-GigabitEthernet1/0/1]quit
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论