实验要求:
一.给各个设备配上IP地址,并用ospf协议和静态路由协议将网络联通:
AR1:
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 10.0.0.1 24
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[Huawei]ospf 1
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]network 0.0.0.0 255.255.255.255
AR2:
[Huawei-GigabitEthernet0/0/0]ip address 10.0.0.2 24
[Huawei]ospf 1 router-id 2.2.2.2
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]network 0.0.0.0 255.255.255.255
AR3:
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.2 24
[Huawei]ip route-static 0.0.0.0 0 192.168.1.1
AR4:
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.3 24
[Huawei]ip route-static 0.0.0.0 0 192.168.1.1
二.接下来把R2开启telnet协议,并用R1进行测试
R2:
[Huawei]user-interface vty 0 4
[Huawei-ui-vty0-4]authentication-mode aaa
[Huawei-ui-vty0-4]q
[Huawei]aaa
[Huawei-aaa]local-user huawei password cipher 123456 privilege level 15
[Huawei-aaa]local-user huawei service-type telnet
R1:
<Huawei>telnet 10.0.0.2
Press CTRL_] to quit telnet mode
Trying 10.0.0.2 ...
Connected to 10.0.0.2 ...
Login authentication
Username:huawei
Password:
这样就成功了
三.用高级acl在R1上进行需求2和3 的操作
然后进入0/0/0接口进行调用
[Huawei-GigabitEthernet0/0/0]traffic-filter inbound acl 3000
这样整个配置就结束了
然后来进行测试
AR3:
AR4:
这样实验就算成功了。