拓扑图
配置
配置ACL
配置流分类、流行为、流策略
在接口应用
sysname AR1
#
acl number 2000
rule 5 permit source 10.1.1.1 0
acl number 2001
rule 5 permit source 10.1.1.2 0
acl number 2002
rule 5 permit source 10.1.1.3 0
#
traffic classifier EF operator or
if-match acl 2000
traffic classifier CS4 operator or
if-match acl 2001
traffic classifier default operator or
if-match acl 2002
#
traffic behavior EF
remark dscp ef
traffic behavior CS4
remark dscp cs4
traffic behavior default
remark dscp default
#
traffic policy remark
classifier EF behavior EF
classifier CS4 behavior CS4
classifier default behavior default
#
interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.0
traffic-policy remark outbound
#
interface LoopBack0
ip address 10.1.1.1 255.255.255.255
#
interface LoopBack1
ip address 10.1.1.2 255.255.255.255
#
interface LoopBack2
ip address 10.1.1.3 255.255.255.255
#
ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
#
sysname AR2
#
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 23.1.1.2 255.255.255.0
#
ip route-static 3.3.3.3 255.255.255.255 23.1.1.3
ip route-static 10.1.1.0 255.255.255.0 12.1.1.1
#
AR3上配置信息统计
sysname AR3
#
traffic classifier EF operator or
if-match dscp ef
traffic classifier CS4 operator or
if-match dscp cs4
traffic classifier default operator or
if-match dscp default
#
traffic behavior EF
statistic enable
traffic behavior CS4
statistic enable
traffic behavior default
statistic enable
#
traffic policy stati
classifier EF behavior EF
classifier CS4 behavior CS4
classifier default behavior default
#
interface GigabitEthernet0/0/0
ip address 23.1.1.3 255.255.255.0
traffic-policy stati inbound
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
ip route-static 0.0.0.0 0.0.0.0 23.1.1.2
#
在AR1 10.1.1.1 ping 3.3.3.3,在AR3上查看统计信息
可以看到EF流量统计
在AR1 10.1.1.2 ping 3.3.3.3
可以看到CS4流量统计
在AR1 10.1.1.3 ping 3.3.3.3
可以看到default流量统计
查看抓包信息