使用traffic policy
1.说明:
1)华为交换机的ACL规则没变,但下发需要通过流策略traffic policy下发;
2)流策略又包括相应的流分类traffic classifier,流行为traffic behavior;
3)流分类traffic classifier用于绑定相应的ACL规则,流行为traffic behavior决定匹配的流分类是否permit或deny;
4)ACL规则里只需配置匹配的流,使用permit标识,而deny基本没啥用;
5)如果有多个ACL number,在流策略traffic policy里需要按顺序绑定(根据业务是先允午后禁止或先禁止后允许);
6)在接口的inbound 方向下发。
2.配置举例,限制网段(10.1.111.0/24)访问网段(10.0.0.0/8)
1)根据需求创建流策略即ACL
acl name DMZ 3111 rule 21 permit ip source 10.1.111.0 0.0.0.255 destination 10.1.13.100 0 rule 50 deny ip source 10.1.111.0 0.0.0.255 destination 10.0.0.0 0.255.255.255
2)创建流分类即traffic classifier
traffic classifier test if-match acl 3111
3)创建流行为即traffic behavior
traffic behavior permit
permit
4)创建流策略traffic policy
traffic policy test match-order config
classifier test behavior permit
5)应用到vlanif下
interface Vlanif111
ip address 10.1.111.1 255.255.255.0
traffic-policy test inbound
使用traffic filter
1.配置举例
1)创建acl
acl name Guest 3001 rule 21 permit ip source 10.1.101.0 0.0.0.255 destination 10.1.32.250 0 rule 50 deny ip source 10.1.101.0 0.0.0.255 destination 10.0.0.0 0.255.255.255
2)应用到vlanif下
interface Vlanif101 description Guest ip address 10.1.101.1 255.255.255.0 traffic-filter inbound acl name Guest
看看天上,于是我去了满是风雪的地方