实验拓扑图:
实验要求:
- R1,R2模拟PC,R1可以telnetR3,不能pingR3;
- R1可以pingR4,不能telnetR4;
- R2的配置与R1相反;
实验过程;
1.IP地址规划
由于未作要求,随意给两个网段即可,地址划分如下:
用户:192.168.1.0/24
骨干:192.168.2.0/24
2.基础配置(仅给出模拟PC的路由器R1的配置,R2与R1相似,R3,R4为简单基础配置,不再赘述)
Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]q
[Huawei]ip route-static 0.0.0.0 0.0.0.0 192.168.1.1
3.开启远程登陆
Huawei]aaa
[Huawei-aaa]local-user liong privilege level 15 password cipher 123456
[Huawei-aaa]local-user liong service-type telnet
[Huawei-aaa]q
[Huawei]user-interface vty 0 4
[Huawei-ui-vty0-4]authentication-mode aaa
R3,R4的配置命令相同,方便起见创建的远程登陆的用户名和密钥相同
4.用ACL实现流量控制(仅在R3上做配置)
Huawei]acl 3000
[Huawei-acl-adv-3000]rule deny icmp source 192.168.1.2 0.0.0.0 destination 192.168.1.1 0.0.0.0
[Huawei-acl-adv-3000]rule deny icmp source 192.168.1.3 0.0.0.0 destination 192.168.2.2 0.0.0.0
[Huawei-acl-adv-3000]rule deny tcp source 192.168.1.2 0.0.0.0 destination 192.168.2.2 0.0.0.0 destination-port eq 23
[Huawei-acl-adv-3000]rule deny tcp source 192.168.1.3 0.0.0.0 destination 192.168.1.1 0.0.0.0 destination-port eq 23
[Huawei-acl-adv-3000]q
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]traffic-filter inbound acl 3000
[Huawei-GigabitEthernet0/0/1]q
5.实验结果图:
R1可以telnetR3,不能pingR3
R1可以pingR4,不能telnetR4
R2可以pingR3,不能telnetR3
R2可以telnetR4,不能pingR4
标签:ENSP,R1,0.0,192.168,ACL,Huawei,3000,模拟实验,acl From: https://blog.csdn.net/2301_81411842/article/details/140163673