拓扑图:
实验需求:
1.完成所有路由器的静态路由配置,要求使用最简化路由表的方式
2.全网可达
3.AR5使用D1.HCP为PC分配地址
4.AR1、AR2、AR3、AR4均有两个环回来模拟用户网段
5.AR2、AR3、AR4、AR5开启Telnet功能;账号密码为admin/admin
实验过程及结果:
1.首先先为路由器的各接口配置IP,再在路由表上补充除路由器直连的网段的其他网段,此处仅以AR1为例
[Huawei]ip route-static 192.168.3.0 24 192.168.1.2
[Huawei]ip route-static 192.168.5.0 24 192.168.1.2
[Huawei]ip route-static 192.168.6.0 24 192.168.1.2
[Huawei]ip route-static 192.168.4.0 24 192.168.2.2
[Huawei]dis ip rou
2.通过查看路由表,可知AR1已可以通向各个网段。因为信号往来是一个相互的过程,要想信息全网可达,只需对每个路由器都补充完整路由表即可。
3.在PC2配置DHCP服务
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]ip pool zhangsan
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-zhangsan]network 192.168.6.0 mask 24
[Huawei-ip-pool-zhangsan]gateway-list 192.168.6.1
[Huawei-ip-pool-zhangsan]dns-list 8.8.8.8
[Huawei-ip-pool-zhangsan]int g0/0/1
[Huawei-GigabitEthernet0/0/1]dhcp select global
Error: Please enable DHCP in the global view first.
[Huawei-GigabitEthernet0/0/1]quit
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei-GigabitEthernet0/0/1]dhcp select global
[Huawei-GigabitEthernet0/0/1]quit
登录PC2查看IP地址是否成功分配
4.创建环回接口
此处以AR2为例:
5.建立Telnet服务
依旧以AR2为例,只需增加这些代码
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]telnet server enable
Error: TELNET server has been enabled
[Huawei]user-interface vty 0 4
[Huawei-ui-vty0-4]authentication-mode aaa
[Huawei-ui-vty0-4]aaa
[Huawei-aaa]local-user admin password cipher admin privilege level 2
[Huawei-aaa]local-user admin service-type telnet
[Huawei-aaa]
随便用一个路由器,这里使用AR5输入AR2任意一个接口IP :192.168.2.2
这样即证明Telnet服务启用成功