基本的ACL: 禁止R2访问R1
[SW1]acl 2000
[SW1-acl-basic-2000]rule deny source 192.168.1.1 0
[SW1-GigabitEthernet0/0/3]traffic-filter outbound acl 2000
高级ACL: 禁止R2 ping R1,但可以telnet
[SW1]acl 3000
[SW1-acl-adv-3000]rule deny icmp source 192.168.1.1 0 destination 192.168.1.3 0
[SW1-acl-adv-3000]rule permit tcp source 192.168.1.1 0 destination 192.168.1.3 0 destination-port eq 23
[SW1-GigabitEthernet0/0/3]traffic-filter outbound acl 3000
通用Router(AR系统不需要使用set)的telnet配置与AR不同,如下:
[R1]user-interface vty 0 4
[R1-ui-vty0-4]set authentication password simple huawei