一、拓扑图
1)在路由器中拖出两台AR2220,然后选择设备连线,点击Auto进行设备接线,完成后开启设备。之后,将AR1的IP地址配置为192.168.1.1/24,将AR2的IP地址配置为192.168.1.2/24。
2)两台路由器的配置命令如下所示:
AR1:
<Huawei>system-view [Huawei]sysname AR1 [AR1]interface g0/0/0 [AR1-GigabitEthernet0/0/0]ip add 192.168.1.1 255.255.255.0 [AR1-GigabitEthernet0/0/0]quit
AR2:
<Huawei>system-view [Huawei]sysname AR2 [AR2]interface g0/0/0 [AR2-GigabitEthernet0/0/0]ip add 192.168.1.2 255.255.255.0 [AR2-GigabitEthernet0/0/0]quit [AR2]ping 192.168.1.1
二、Telnet
Telnet有两种验证方式进行远程登录,分别是PASSWORD及AAA:
2.1、PASSWORD验证方式
1)在AR1上启用Telnet,配置如下:
[AR1]user-interface vty 0 4
[AR1-ui-vty0-4]authentication-mode password
Please configure the login password (maximum length 16):6
[AR1-ui-vty0-4]set authentication password cipher huawei
[AR1-ui-vty0-4]user privilege level 3
2)在AR2上远程AR1,命令如下:
<AR2>telnet 192.168.1.1 Password:
2.2、AAA验证方式
1)在AR1上启用Telnet,配置如下:
[AR1]user-interface vty 0 4
[AR1-ui-vty0-4]authentication-mode aaa //配置验证方式
[AR1-ui-vty0-4]quit
[AR1]aaa //进入AAA视图
[AR1-aaa]local-user tom password cipher huawei //配置用户名密码
[AR1-aaa]local-user tom privilege level 3 //用户tom的权限为3级
[AR1-aaa]local-user tom service-type telnet //配置接入类型为 Telnet
2)在AR2上远程AR1,命令如下:
<AR2>telnet 192.168.1.1 Username:tom Password: