#第一:配置时间段(由于不支持"23:0 to 6:30",所以写成下面这种形式) time-range jiaoshi-deny00:00 to6:30 daily time-range jiaoshi-deny23:00 to23:59 daily time-range xuesheng-deny00:00 to8:30 working-day time-range xuesheng-deny22:00 to0:0 working-day #第二:创建配置高级acl acl number3001 rule deny ip source192.168.21.00.0.0.255 time-range jiaoshi-deny acl number3002 rule deny ip source192.168.22.00.0.0.255 time-range xuesheng-deny #第三:配置流分类(对匹配ACL 3001和3002的报文进行分类) traffic classifier d_jiaoshiif-match acl3001 traffic classifier d_xueshengif-match acl3002#第四:配置流行为(动作为拒绝报文通过) traffic behavior d_jiaoshi deny traffic behavior d_xuesheng deny #第五:配置流策略(将流分类d_jiaoshi与流行为d_jiaoshi关联,组成流策略,这里为了方便直接将后面应用到一个接口上,将上面两个对应关系进行了合计) traffic policy all_deny classifier d_jiaoshi behavior d_jiaoshi classifier d_xuesheng behavior d_xuesheng #第六:在接口上应用流策略interface gigabitethernet0/0/2 ip address114.114.114.1255.255.255.0 traffic-policy all_deny outbound