华为acl配置教程

上传人:第*** 文档编号:34598141 上传时间:2018-02-26 格式:DOC 页数:26 大小:521.26KB
返回 下载 相关 举报
华为acl配置教程_第1页
第1页 / 共26页
华为acl配置教程_第2页
第2页 / 共26页
华为acl配置教程_第3页
第3页 / 共26页
华为acl配置教程_第4页
第4页 / 共26页
华为acl配置教程_第5页
第5页 / 共26页
点击查看更多>>
资源描述

《华为acl配置教程》由会员分享,可在线阅读,更多相关《华为acl配置教程(26页珍藏版)》请在金锄头文库上搜索。

1、华为 ACL 配置教程一、ACL 基本配置1、ACL 规则生效时间段配置(需要先配置设备的时间,建议用 ntp 同步时间)某些引用 ACL 的业务或功能需要限制在一定的时间范围内生效,比如,在流量高峰期时启动设备的 QoS 功能。用户可以为 ACL 创建生效时间段,通过在规则中引用时间段信息限制 ACL 生效的时间范围,从而达到该业务或功能在一定的时间范围内生效的目的。Huaweitime-range test ?Starting timefrom The beginning point of the time rangeHuaweitime-range test 8:00 ?to The e

2、nding point of periodic time-rangeHuaweitime-range test 8:00 t Huaweitime-range test 8:00 to ?Ending TimeHuaweitime-range test 8:00 to 18:05 ?Day of the week(0 is Sunday)Fri Friday #星期五Mon Monday #星期一Sat Saturday #星期六Sun Sunday #星期天Thu Thursday # 星期四Tue Tuesday # 星期二Wed Wednesday #星期三daily Every day

3、 of the week # 每天off-day Saturday and Sunday # 星期六和星期日working-day Monday to Friday #工作日每一天Huaweitime-range test from 8:00 2016/1/17 to 18:00 2016/11/17使用同一 time-name 可以配置多条不同的时间段,以达到这样的效果:各周期时间段之间以及各绝对时间段之间分别取并集之后,再取二者的交集作为最终生效的时间范围。例如,时间段“test”配置了三个生效时段:从 2016 年 1 月 1 日 00:00 起到 2016 年 12 月 31 日 23

4、:59 生效,这是一个绝对时间段。在周一到周五每天 8:00 到 18:00 生效,这是一个周期时间段。在周六、周日下午 14:00 到 18:00 生效,这是一个周期时间段。则时间段“test”最终描述的时间范围为:2016 年的周一到周五每天 8:00到 18:00 以及周六和周日下午 14:00 到 18:00。由于网络延迟等原因,可能造成网络上设备时间不同步,建议配置NTP(Network Time Protocol),以保证网络上时间的一致。2、ACL 类型配置2.1、数字型 acl 配置Huaweiacl 2000 match-order ?auto Auto order #自动顺

5、序(默认)config Config order或Huaweiacl number 2000 match-order ?auto Auto orderconfig Config order2.2、命名型 acl 配置Huaweiacl name test ?advance Specify an advanced named ACL # 设置高级 aclbasic Specify a basic named ACLmatch-order Set ACLs match ordernumber Specify a number for the named ACLHuaweiacl name test

6、 ad Huaweiacl name test advance ?match-order Set ACLs match ordernumber Specify a number for the named ACLHuaweiacl name test number ?INTEGER Number of the basic named ACLINTEGER Number of the advanced named ACL2.3、ACL 类型配置Huaweiacl ?INTEGER Interface access-list(add to current using rules) # 接口访问列表

7、 aclINTEGER Apply MPLS ACL # 应用 MPLS ACLINTEGER Basic access-list (add to current using rules) # 基本 aclINTEGER Advanced access-list(add to current using rules) # 高级 acl INTEGER MAC address access-list(add to current using rules) # 二层 aclipv6 ACL IPv6 # 基本 acl6 和高级 acl6 配置name Specify a named ACLnumb

8、er Specify a numbered ACL2.4、ACL 描述设置(可选)Huawei-acl-basic-2600description ?TEXT2.5、ACL 步长设置(可选)Huawei-acl-basic-teststep ?INTEGER Specify value of step二、ACL 类型规则配置1、基本 ACL 规则配置基本 ACL 编号 acl-number 的范围是 20002999。基本 ACL 可以根据报文自身的源 IP 地址、分片标记和时间段信息对 IPv4报文进行分类。Huawei-acl-basic-testrule 1 ?deny Specify

9、matched packet denypermit Specify matched packet permitHuawei-acl-basic-testrule 1 deny ?fragment-type Specify the fragment type of packet # 分组片段类型source Specify source addresstime-range Specify a special timevpn-instance Specify a VPN-InstanceHuawei-acl-basic-testrule 1 deny source ?X.X.X.X Address

10、 of sourceany Any sourceHuawei-acl-basic-testrule 1 deny source 192.168.1.1 ?0 Wildcard bits : 0.0.0.0 ( a host )X.X.X.X Wildcard of sourceHuawei-acl-basic-testrule 1 deny source 192.168.1.1 0 ?fragment-type Specify the fragment type of packet # 对分组片段类型有效 time-range Specify a special time # 引用生效时间vp

11、n-instance Specify a VPN-Instance # 用于 vpnHuawei-acl-basic-2600description ? #配置规则描述TEXT ACL description (no more than 127 characters)在 ACL 中配置首条规则时,如果未指定参数 rule-id,设备使用步长值作为规则的起始编号。后续配置规则如仍未指定参数 rule-id,设备则使用最后一个规则的 rule-id 的下一个步长的整数倍数值作为规则编号。例如 ACL 中包含规则 rule 5 和 rule 7,ACL 的步长为 5,则系统分配给新配置的未指定 ru

12、le-id 的规则的编号为 10。当用户指定参数 time-range 引入 ACL 规则生效时间段时,如果 time-name不存在,该规则将无法绑定该生效时间段。如果不指定参数 vpn-instance vpn-instance-name,设备会对公网和私网的报文均进行匹配。设备在收到报文时,会按照匹配顺序将报文与 ACL 规则进行逐条匹配,一旦匹配上规则组内的某条规则,则停止匹配动作。之后,设备将依据匹配的规则对报文执行相应的动作。2、高级 ACL 规则配置高级 ACL 编号 acl-number 的范围是 30003999。高级 acl 主要对源/目的 IP 地址、端口号、优先级、时间

13、段等报文进行过滤。Huawei-acl-adv-3000rule 1 permit ?Protocol numbergre GRE tunneling(47)icmp Internet Control Message Protocol(1)igmp Internet Group Management Protocol(2)ip Any IP protocolipinip IP in IP tunneling(4)ospf OSPF routing protocol(89)tcp Transmission Control Protocol (6)udp User Datagram Protoco

14、l (17)Huawei-acl-adv-3000rule 1 permit udp ?destination Specify destination addressdestination-port Specify destination portdscp Specify dscpfragment-type Specify the fragment type of packetprecedence Specify precedencesource Specify source addresssource-port Specify source porttime-range Specify a

15、special time tos Specify tosvpn-instance Specify a VPN-InstanceHuawei-acl-adv-3000rule 1 permit udp source ?X.X.X.X Address of sourceany Any sourceHuawei-acl-adv-3000rule 1 permit udp source any ?destination Specify destination addressdestination-port Specify destination portdscp Specify dscpfragment-type Specify the fragment type of packetpre

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 解决方案

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号