AR1路由器配置
< Huawei> system-view
Enter system view, return user view with Ctrl+Z.
[ Huawei] undo info-center enable
Info: Information center is disabled.
[ Huawei] interface gigabitethernet 0 /0/0
[ Huawei-GigabitEthernet0/0/0] ip address 192.168 .2.254 24
[ Huawei-GigabitEthernet0/0/0] quit
[ Huawei] interface gigabitethernet 0 /0/1
[ Huawei-GigabitEthernet0/0/1] ip address 192.168 .1.254 24
[ Huawei-GigabitEthernet0/0/1] quit
ACL
分类 端口 参数
1 .基本ACL 2000 -2999 源IP地址
2 .高级ACL 3000 -3999 源IP地址、目的IP地址、端口、协议
基本ACL
[ Huawei] acl 2000
[ Huawei-acl-basic-2000] rule deny source 192.168 .2.1 0.0 .0.0
[ Huawei-acl-basic-2000] display this
[ V200R003C00]
acl number 2000
rule 5 deny source 192.168 .2.1 0
return
[ Huawei] interface gigabitethernet 0 /0/0
[ Huawei-GigabitEthernet0/0/0] traffic-filter inbound acl 2000
[ Huawei] acl 2000
[ Huawei-acl-basic-2000] rule permit source 192.168 .2.1 0
[ Huawei-acl-basic-2000] rule deny source any
[ Huawei-acl-basic-2000] display this
[ V200R003C00]
acl number 2000
rule 5 permit source 192.168 .2.1 0
rule 10 deny
return
[ Huawei-acl-basic-2000] quit
[ Huawei] interface gigabitethernet 0 /0/1
[ Huawei-GigabitEthernet0/0/1] undo traffic-filter inbound
[ Huawei-GigabitEthernet0/0/0] traffic-filter inbound acl 2000
[ Huawei] undo acl all
Info: Now deleting all ACL configurations, please wait.. .. ..
Deleting operation has finished!
高级ACL
[ Huawei] acl 3000
[ Huawei-acl-adv-3000] rule deny tcp source 192.168 .2.2 0 destination 192.168 .1.1
0 destination-port eq 80
[ Huawei-acl-adv-3000] quit
[ Huawei] interface gigabitethernet 0 /0/0
[ Huawei-GigabitEthernet0/0/0] display this
[ V200R003C00]
interface GigabitEthernet0/0/0
ip address 192.168 .2.254 255.255 .255.0
traffic-filter inbound acl 2000
return
[ Huawei-GigabitEthernet0/0/0] undo traffic-filter inbound
[ Huawei-GigabitEthernet0/0/0] traffic-filter inbound acl 3000