acl配置

拓扑

命令

lw2

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in e
Info: Information center is disabled.
[Huawei]vlan ba 10 20 30 40 50 60
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]p l a
[Huawei-Ethernet0/0/1]p d v 10
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]p l a
[Huawei-Ethernet0/0/2]p d v 20
[Huawei-Ethernet0/0/2]int g0/0/1
[Huawei-GigabitEthernet0/0/1]p l t
[Huawei-GigabitEthernet0/0/1]p l a
[Huawei-GigabitEthernet0/0/1]p d v 30
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int vlan 10
[Huawei-Vlanif10]ip add 192.168.1.254
                                      ^
Error:Incomplete command found at '^' position.
[Huawei-Vlanif10]ip add 192.168.1.254 24
[Huawei-Vlanif10]int vlan 20
[Huawei-Vlanif20]ip add 192.168.2.254 24
[Huawei-Vlanif20]int vlan 30
[Huawei-Vlanif30]ip add 192.168.3.1 24
[Huawei-Vlanif30]q
[Huawei]ospf 1 ro 1.1.1.1
[Huawei-ospf-1]ar 0
[Huawei-ospf-1-area-0.0.0.0]ne    
[Huawei-ospf-1-area-0.0.0.0]network 192.168.1.254 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.2.254 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.3.1 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]q
[Huawei-ospf-1]q
[Huawei]

AR4

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in e
Info: Information center is disabled.
[Huawei]vlan ba 10 20 30 40 50 60
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]
[Huawei]int vlan 30
[Huawei-Vlanif30]ip add 192.168.3.2 24
[Huawei-Vlanif30]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add    
[Huawei-GigabitEthernet0/0/1]ip address 192.168.4.1 24
[Huawei-GigabitEthernet0/0/1]
[Huawei-GigabitEthernet0/0/1]
[Huawei-GigabitEthernet0/0/1]q
[Huawei]ospf 1 ro 2.2.2.2
[Huawei-ospf-1]ar 0
[Huawei-ospf-1-area-0.0.0.0]ne    
[Huawei-ospf-1-area-0.0.0.0]network 192.168.3.2 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.4.1 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]q
[Huawei-ospf-1]q
[Huawei]
[Huawei]
[Huawei]
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.3.2 24
Error: The specified address conflicts with another address.
[Huawei-GigabitEthernet0/0/0]
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]
[Huawei]un in e
Info: Information center is disabled.
[Huawei]
[Huawei]vlan ba 10 20 30 40 50 60
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]
[Huawei-GigabitEthernet0/0/0]ip add 192.168.3.2 24
[Huawei-GigabitEthernet0/0/0]
[Huawei-GigabitEthernet0/0/0]q
[Huawei]
[Huawei]int g0/0/1    
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]
[Huawei-GigabitEthernet0/0/1]ip address 192.168.4.1 24
[Huawei-GigabitEthernet0/0/1]
[Huawei-GigabitEthernet0/0/1]q
[Huawei]
[Huawei]ospf 1 ro 2.2.2.2
[Huawei-ospf-1]
[Huawei-ospf-1]ar 0
[Huawei-ospf-1-area-0.0.0.0]
[Huawei-ospf-1-area-0.0.0.0]
[Huawei-ospf-1-area-0.0.0.0]
[Huawei-ospf-1-area-0.0.0.0]network 192.168.3.2 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]
[Huawei-ospf-1-area-0.0.0.0]network 192.168.4.1 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]
[Huawei-ospf-1-area-0.0.0.0]q
[Huawei-ospf-1]
[Huawei-ospf-1]q
[Huawei]
[Huawei]
[Huawei]

ar3:

sys

un in e


vlan ba 10 20 30 40 50 60

int g0/0/1
ip add 192.168.10.2 24
int g0/0/2
ip add 192.168.20.2 24
int g0/0/0
ip add 192.168.4.2 24
q

ospf 1 ro 3.3.3.3

ar 0

network 192.168.4.2 0.0.0.0

network 192.168.10.2 0.0.0.0

network 192.168.20.2 0.0.0.0
q
q
acl 3000    
rule 5 permit tcp source 192.168.1.1 0.0.0.255 destination 192.168.10.1 0 destination-port  eq www    
rule 10 deny tcp source 192.168.1.1 0.0.0.255 destination 192.168.20.1 0 destination-port eq ftp
rule 15 permit tcp source 192.168.2.1 0.0.0.255 destination 192.168.20.1 0 destination-port eq ftp
rule 20 deny tcp source 192.168.2.1 0.0.0.255 destination 192.168.10.1 0 destination-port  eq www  

 intg0/0/0

traffic-filter inbound acl 3000

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值