实验拓扑
实验需求
作为一名网络管理员,为了简化网络设备的管理,通过配置Telnet服务实现远程管理路由器的功能,具体需求如下:
- 为了方便管理员管理设备,请按图示修改设备名称;sysname—全局视图
R1:
<Huawei>sy
[Huawei]sy R1
# 修改名称为R1
R2:
<Huawei>sy
[Huawei]sy R2
- 设置设备登陆标题,在用户登陆之前显示:“welcome to goktech!”,登陆之后会显示:“Please don’t reboot the device!”
R1:
[R1]header login information "welcome to goktech!"
# 登陆之前显示信息
[R1]header shell information "Please don't reboot the device!"
# 登陆之后显示信息
- 设置console登陆验证,要求用通过console连接需要密码验证才能配置;
R1:
[R1]user-interface console 0
[R1-ui-console0]authentication-mode password
# 认证模式为密码
Please configure the login password (maximum length 16):aa8j
测试:
- 如图所示,给对应的接口配置上IP地址,并测试两台路由器之间能否ping通,然后分别在两台设备上创建虚拟的回环接口:loopback 0 ,RX的地址为X.X.X.X;
R1:
[R1]in g0/0/0
[R1-GigabitEthernet0/0/0]ip ad 192.168.12.1 24
R2:
[R2]in g0/0/0
[R2-GigabitEthernet0/0/0]ip ad 192.168.12.2 24
ping测试:
R1:
[R1]ping 192.168.12.2
配置R1虚拟回环口及IP地址:
[R1]in l0
[R1-LoopBack0]ip ad 1.1.1.1 24
[R1-LoopBack0]
- 在路由器R1和R2上分别配置Telnet服务,并实现以下两个需求
a) 在路由器R1上可以远程管理路由器R2,并尝试修改设备名称为AR2。
R2:
[R2]user-interface vty 0 4
# 表示可以同时打开五(0-4)个窗口
[R2-ui-vty0-4]authentication-mode password
# 认证方式为密码
Please configure the login password (maximum length 16):aa8j
[R2-ui-vty0-4]user privilege level 15
# 设置用户级别
R1:
<R1>telnet 192.168.12.2
<R2>sy
[R2]sy AR2
b) 在路由器R2上可以远程管理路由器R1,并尝试修改设备名称为ar1。
R1:
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode password
Please configure the login password (maximum length 16):aa8j
[R1-ui-vty0-4]user privilege level 15
R2:
[AR2]q
<AR2>telnet 192.168.12.1
<R1>sy
[R1]sy ar1
- 保存当前配置信息,并重命名为HUAWEI.zip,并将其设置为下次开机启动的配置加载项,
用户视图 dir—查看设备文件
R1:
<ar1>save
Are you sure to continue? (y/n)[n]:y
<ar1>dir
# 列出当前目录下的文件
<ar1>rename vrpcfg.zip HUAWEI.zip
# 修改名称
<ar1>start saved-configuration flash:/HUAWEI.zip
# 修改下次重启的文件
<ar1>dis start