高级ACL配置

 高级ACL

AR1配置

<Huawei>sys
Enter system view, return user view with Ctrl+Z.   
[Huawei]sysname R1
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip ad 192.168.1.254 24
[R1-GigabitEthernet0/0/2]int g0/0/0
[R1-GigabitEthernet0/0/0]ip ad 192.168.12.1 24
[R1-GigabitEthernet0/0/0]q  
[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.12.2
[R1]acl 3000  
[R1-acl-adv-3000]rule 10 permit tcp source 192.168.1.0 0.0.0.255 destination 192.168.3.10 0.0.0.0 destination-port eq 80
[R1]acl 3000
[R1-acl-adv-3000]rule 20 permit ip source 192.168.1.0 0.0.0.255 destination 192.
168.2.0 0.0.0.255
[R1-acl-adv-3000]rule 30 deny ip source 192.168.1.0 0.0.0.255 destination any
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]traffic-filter inbound acl 3000
 

AR2配置

<Huawei> sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip ad 192.168.12.2 24
[R2-GigabitEthernet0/0/0]int g0/0/2
[R2-GigabitEthernet0/0/2]ip ad 192.168.2.254 24
[R2-GigabitEthernet0/0/2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip ad 192.168.23.2 24
[R2-GigabitEthernet0/0/1]Q
[R2]ip route-static 192.168.1.0 24 192.168.12.1
[R2]ip route-static 192.168.3.0 24 192.168.23.3

AR3配置·

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip ad 192.168.23.3 24
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip ad 192.168.3.254 24
[R3]ip route-static 0.0.0.0 0.0.0.0 192.168.23.2

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
华为高级ACL(Access Control List)的配置命令如下: 1. 创建一个ACL对象: acl number ACL_NUMBER [match-order {config | auto | auto-compact}] - ACL_NUMBER:ACL的编号,范围是2000-2999。 - match-order:ACL匹配顺序,可以选择配置顺序(config)、自动顺序(auto)或自动紧凑顺序(auto-compact)。 2. 定义ACL规则: rule [rule-id] {permit | deny} [ip | icmp | tcp | udp] source {source-address source-wildcard | any} [destination {destination-address destination-wildcard | any}] [precedence precedence-value] [tos tos-value] [time-range time-name] [fragments] - rule-id:规则编号,可选参数。 - permit / deny:允许或拒绝匹配的流量。 - ip / icmp / tcp / udp:指定所匹配的IP层、ICMP、TCP或UDP协议。 - source:源地址。 - source-address:源地址的具体值。 - source-wildcard:源地址的通配符。 - destination:目的地址。 - destination-address:目的地址的具体值。 - destination-wildcard:目的地址的通配符。 - precedence:IP优先级,取值范围是0-7。 - tos:服务类型字段(Type of Service),取值范围是0-255。 - time-range:时间范围名称。 - fragments:是否匹配片段。 3. 将ACL应用到接口: interface interface-type interface-number traffic-filter acl { inbound | outbound } - interface-type:接口类型,如Ethernet、GigabitEthernet等。 - interface-number:接口编号。 - acl:应用的ACL名称。 - inbound / outbound:入向或出向流量。 以上是华为高级ACL配置的基本命令,根据具体需求可以对ACL规则进行进一步的配置和调整。请根据实际情况进行配置
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值