2022年2022年华为ACL配置教程 .pdf





《2022年2022年华为ACL配置教程 .pdf》由会员分享,可在线阅读,更多相关《2022年2022年华为ACL配置教程 .pdf(26页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、华为 ACL配置教程一、ACL基本配置1、ACL规则生效时间段配置 (需要先配置设备的时间,建议用ntp 同步时间)某些引用 ACL的业务或功能需要限制在一定的时间范围内生效,比如,在流量高峰期时启动设备的QoS功能。用户可以为 ACL创建生效时间段, 通过在规则中引用时间段信息限制ACL生效的时间范围,从而达到该业务或功能在一定的时间范围内生效的目的。 Huaweitime-range test ? Starting time from The beginning point of the time range Huaweitime-range test 8:00 ? to The endi
2、ng point of periodic time-range Huaweitime-range test 8:00 t Huaweitime-range test 8:00 to ? Ending Time Huaweitime-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 #星期三 dai
3、ly Every day 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 起到 201
4、6年 12 月 31日 23:59 生效,这是一个绝对时间段。在周一到周五每天8:00 到 18:00 生效,这是一个周期时间段。名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 26 页 - - - - - - - - - 在周六、周日下午14:00 到 18:00 生效,这是一个周期时间段。则时间段“ test ”最终描述的时间范围为:2016 年的周一到周五每天8:00到 18:00 以及周六和周日下午14:00 到 18:00。由于网络延迟等原因,可能造成网络上设备
5、时间不同步,建议配置NTP(Network Time Protocol),以保证网络上时间的一致。2、ACL类型配置2.1 、数字型 acl 配置Huaweiacl 2000 match-order ? auto Auto order #自动顺序(默认) config Config order 或Huaweiacl number 2000 match-order ? auto Auto order config Config order 2.2 、命名型 acl 配置Huaweiacl name test ? advance Specify an advanced named ACL # 设置
6、高级 acl basic Specify a basic named ACL match-order Set ACLs match order number Specify a number for the named ACL Huaweiacl name test ad Huaweiacl name test advance ? match-order Set ACLs match order number Specify a number for the named ACL Huaweiacl name test number ? INTEGER Number of the basic n
7、amed ACL INTEGER Number of the advanced named ACL 2.3 、ACL类型配置Huaweiacl ? INTEGER Interface access-list(add to current using rules) # 接口访问列表 acl INTEGER Apply MPLS ACL # 应用 MPLS ACL INTEGER Basic access-list (add to current using rules) # 基本 acl INTEGER Advanced access-list(add to current using rule
8、s) # 高级 acl 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 26 页 - - - - - - - - - INTEGER MAC address access-list(add to current using rules) # 二层 acl ipv6 ACL IPv6 # 基本 acl6 和高级 acl6 配置 name Specify a named ACL number Specify a numbered ACL 2.4 、ACL描述设置(可选)Hua
9、wei-acl-basic-2600description ? TEXT 2.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 matched packet deny permit Specify match
10、ed packet permit Huawei-acl-basic-testrule 1 deny ? fragment-type Specify the fragment type of packet # 分组片段类型 source Specify source address time-range Specify a special time vpn-instance Specify a VPN-Instance Huawei-acl-basic-testrule 1 deny source ? X.X.X.X Address of source any Any source Huawei
11、-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 source Huawei-acl-basic-testrule 1 deny source 192.168.1.1 0 ? 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 26 页 - - - - - - - - - fragment-type Specify t
12、he fragment type of packet # 对分组片段类型有效 time-range Specify a special time # 引用生效时间 vpn-instance Specify a VPN-Instance # 用于 vpn Huawei-acl-basic-2600description ? #配置规则描述 TEXT ACL description (no more than 127 characters) 在 ACL中配置首条规则时,如果未指定参数rule-id,设备使用步长值作为规则的起始编号。后续配置规则如仍未指定参数rule-id,设备则使用最后一个规则的
13、 rule-id的下一个步长的整数倍数值作为规则编号。例如 ACL中包含规则 rule 5 和 rule 7,ACL的步长为 5,则系统分配给新配置的未指定 rule-id的规则的编号为 10。当用户指定参数 time-range引入 ACL规则生效时间段时,如果time-name不存在,该规则将无法绑定该生效时间段。如果不指定参数 vpn-instance vpn-instance-name ,设备会对公网和私网的报文均进行匹配。设备在收到报文时,会按照匹配顺序将报文与ACL规则进行逐条匹配,一旦匹配上规则组内的某条规则, 则停止匹配动作。 之后,设备将依据匹配的规则对报文执行相应的动作。2
14、、高级 ACL规则配置高级 ACL编号 acl-number 的范围是 30003999。高级 acl 主要对源/ 目的 IP 地址、端口号、优先级、时间段等报文进行过滤。Huawei-acl-adv-3000rule 1 permit ? Protocol number gre GRE tunneling(47) icmp Internet Control Message Protocol(1) igmp Internet Group Management Protocol(2) ip Any IP protocol ipinip IP in IP tunneling(4) ospf OSP
15、F routing protocol(89) tcp Transmission Control Protocol (6) udp User Datagram Protocol (17) Huawei-acl-adv-3000rule 1 permit udp ? destination Specify destination address destination-port Specify destination port dscp Specify dscp fragment-type Specify the fragment type of packet precedence Specify
16、 precedence source Specify source address 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 26 页 - - - - - - - - - source-port Specify source port time-range Specify a special time tos Specify tos vpn-instance Specify a VPN-Instance Huawei-acl-adv-3000rule 1 permi
17、t udp source ? X.X.X.X Address of source any Any source Huawei-acl-adv-3000rule 1 permit udp source any ? destination Specify destination address destination-port Specify destination port dscp Specify dscp fragment-type Specify the fragment type of packet precedence Specify precedence source-port Sp
18、ecify source port time-range Specify a special time tos Specify tos vpn-instance Specify a VPN-Instance Huawei-acl-adv-3000rule 1 permit udp source any des Huawei-acl-adv-3000rule 1 permit udp source any destination ? X.X.X.X Specify destination address any Any destination IP address Huawei-acl-adv-
19、3000rule 1 permit udp source any destination 192.168.1.1 ? 0 Wildcard bits : 0.0.0.0 ( a host ) X.X.X.X Wildcard of destination Huawei-acl-adv-3000rule 1 permit udp source any destination 192.168.1.1 0 ? destination-port Specify destination port dscp Specify dscp fragment-type Specify the fragment t
20、ype of packet precedence Specify precedence source-port Specify source port time-range Specify a special time tos Specify tos vpn-instance Specify a VPN-Instance 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 26 页 - - - - - - - - - Huawei-acl-adv-3000rule 1 per
21、mit udp source any destination 192.168.1.1 0 destination-port ? eq Equal to given port number gt Greater than given port number lt Less than given port number neq Not equal to given port number # 不等于指定端口 range Between two port numbers Huawei-acl-adv-3000rule 1 permit udp source any destination 192.1
22、68.1.1 0 destination-port eq ? Protocol number biff Mail notify (512) bootpc Bootstrap Protocol Client (68) bootps Bootstrap Protocol Server (67) discard Discard (9) dns Domain Name Service (53) dnsix DNSIX Security Attribute Token Map (90) echo Echo (7) mobilip-ag MobileIP-Agent (434) mobilip-mn Mo
23、bilIP-MN (435) nameserver Host Name Server (42) netbios-dgm NETBIOS Datagram Service (138) netbios-ns NETBIOS Name Service (137) netbios-ssn NETBIOS Session Service (139) ntp Network Time Protocol (123) rip Routing Information Protocol (520) snmp SNMP (161) snmptrap SNMPTRAP (162) sunrpc SUN Remote
24、Procedure Call (111) syslog Syslog (514) tacacs-ds TACACS-Database Service (65) talk Talk (517) tftp Trivial File Transfer (69) time Time (37) who Who(513) xdmcp X Display Manager Control Protocol (177) Huawei-acl-adv-3000rule 1 permit udp source any destination 192.168.1.1 0 destination-port eq 21
25、? dscp Specify dscp fragment-type Specify the fragment type of packet precedence Specify precedence source-port Specify source port time-range Specify a special time 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 6 页,共 26 页 - - - - - - - - - tos Specify tos vpn-insta
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022年2022年华为ACL配置教程 2022 年华 ACL 配置 教程

限制150内