华为配置教程

更新时间:2023-06-25 18:46:38 阅读: 评论:0

华为ACL配置教程
一、ACL基本配置丁香结原文
1、ACL规则生效时间段配置(需要先配置设备的时间,建议用ntp同步时间)
某些引用ACL的业务或功能需要限制在一定的时间范围内生效,比如,在流量高峰期时启动设备的QoS功能。用户可以为ACL创建生效时间段,通过在规则中引用时间段信息限制ACL生效的时间范围,从而达到该业务或功能在一定的时间范围内生效的目的。
[]time-range test
<hh:mm> Starting time
from The beginning point of the time range
[Huawei]time-range test 8:00
to The ending point of periodic time-range
[Huawei]time-range test 8:00 t
[Huawei]time-range test 8:00 to
<hh:mm> Ending Time
[Huawei]time-range test 8:00 to 18:05
<0-6> Day of the week(0 is Sunday)
Fri Friday #星期五
Mon Monday #星期一
Sat Saturday #星期六
Sun Sunday #星期天
Thu Thursday #星期四
Tue Tuesday #星期二
Wed Wednesday #星期三
daily Every day of the week #每天
off-day Saturday and Sunday #星期六和星期日
working-day Monday to Friday #工作日每一天
[Huawei]time-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: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配置
[Huawei]acl 2000 match-order
auto Auto order #自动顺序(默认)
config Config order
[Huawei]acl number 2000 match-order
auto Auto order
config Config order
2.2、命名型acl配置
[Huawei]acl name test
advance Specify an advanced named ACL #设置高级acl
basic Specify a basic named ACL
match-order Set ACL's match order一线医务人员
number Specify a number for the named ACL
国民革命 <cr>
[Huawei]acl name test ad
[Huawei]acl name test advance
match-order Set ACL's match order
number Specify a number for the named ACL
<cr>
[Huawei]acl name test number
INTEGER<2000-2999> Number of the basic named ACL
INTEGER<42768-75535> Number of the advanced named ACL
2.3、ACL类型配置
[Huawei]acl
INTEGER<1000-1999> Interface access-list(add to current using rules) #接口访问列表acl
INTEGER<10000-10999> Apply MPLS ACL #应用MPLS ACL
INTEGER<2000-2999> Basic access-list (add to current using rules) #基本acl
INTEGER<3000-3999> Advanced access-list(add to current using rules) #高级acl
INTEGER<4000-4999> 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描述设置(可选)
[Huawei-acl-basic-2600]description
TEXT
2.5、ACL步长设置(可选)
[Huawei-acl-basic-test]step
INTEGER<1-20> Specify value of step
二、ACL类型规则配置
1、基本ACL规则配置
基本ACL编号acl-number的范围是2000~2999。
基本ACL可以根据报文自身的源IP地址、分片标记和时间段信息对IPv4报文进行分类。
[Huawei-acl-basic-test]rule 1
deny Specify matched packet deny
permit Specify matched packet permit
[Huawei-acl-basic-test]rule 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
<cr>
[Huawei-acl-basic-test]rule 1 deny source
Address of source
any Any source
0
Wildcard of source
满不在乎 fragment-type Specify the fragment type of packet #对分组片段类型有效
time-range Specify a special time #引用生效时间
vpn-instance Specify a VPN-Instance #用于vpn
<cr>
[Huawei-acl-basic-2600]description  #配置规则描述
TEXT ACL description (no more than 127 characters)
在ACL中配置首条规则时,如果未指定参数rule-id,设备使用步长值作为规则的起始编号。后续配置规则如仍未指定参数rule-id,设备则使用最后一个规则的rule-id的下一个步长的整数倍数值作为规则编号。
例如ACL中包含规则rule 5和rule 7,ACL的步长为5,则系统分配给新配置的未指定rule-id的规则的编号为10。
怎样快速记单词
当用户指定参数time-range引入ACL规则生效时间段时,如果time-name不存在,该规则将无法绑定该生效时间段。
如果不指定参数vpn-instance vpn-instance-name,设备会对公网和私网的报文均进行匹配。
设备在收到报文时,会按照匹配顺序将报文与ACL规则进行逐条匹配,一旦匹配上规则组内的某条规则,则停止匹配动作。之后,设备将依据匹配的规则对报文执行相应的动作。
2、高级ACL规则配置
高级ACL编号acl-number的范围是3000~3999。
高级acl主要对源/目的IP地址、端口号、优先级、时间段等报文进行过滤。
[Huawei-acl-adv-3000]rule 1 permit
<1-255> 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 OSPF routing protocol(89)
tcp Transmission Control Protocol (6)
udp Ur Datagram Protocol (17)
剪纸动物[Huawei-acl-adv-3000]rule 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 precedence
source Specify source address
source-port Specify source port

本文发布于:2023-06-25 18:46:38,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1054661.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:规则   配置   时间段   生效   时间   报文   设备
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图