背景:远程管理华为交换机运维
要求:登录密码为密文,模式为AAA
实验拓扑:
1,[pc]interface Vlanif 1 配置互联VLAN,目的使两个设备网络可达
[pc-Vlanif1]ip add
[pc-Vlanif1]ip address 1.1.1.1 30 互联VLAN 配置地址2
[sw]interface Vlanif 1
[sw-Vlanif1]ip add
[sw-Vlanif1]ip address 1.1.1.2 30
测试:
[pc]ping 1.1.1.2 可相互通信
PING 1.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 1.1.1.2: bytes=56 Sequence=1 ttl=255 time=90 ms
Reply from 1.1.1.2: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 1.1.1.2: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 1.1.1.2: bytes=56 Sequence=4 ttl=255 time=70 ms
Reply from 1.1.1.2: bytes=56 Sequence=5 ttl=255 time=50 ms
--- 1.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 50/62/90 ms
注:因为接口默认放行VLAN 1所以接口配置不用配置(如同集线器),如果配置是其他VLAN需要进行接口配置,此处略
2,配置管理交换机的Telnet服务
[sw]telnet server enable 开启Telnet服务(华为默认开启)
Info: The Telnet server has been enabled.
[sw]user-interface vty 0 4 进入VTY配置
[sw-ui-vty0-4]
[sw-ui-vty0-4]authentication-mode aaa 配置认证模式为AAA
[sw-ui-vty0-4]protocol inbound telnet 协议选Telnet,也可选ALL
[sw-ui-vty0-4]idle-timeout 5 配置超时时间(可根具需要调整,不配不影响远程)
[sw-ui-vty0-4]quit 退出VTY配置
[sw]aaa 进给AAA配置
[sw-aaa]
[sw-aaa]local-user test password cipher 12345678 配置用户为test 密码为密文(cipher)12345678
[sw-aaa]local-user test privilege level 3 配置所登录用户登录的等级,不同等级权限不一样所操作的内容就不一样
[sw-aaa]local-user test service-type telnet 配置服务类型为Telnet
到此为止Telnet的必须配置完成,其他辅助配置可根据实际情况添加
telnet测试:
<pc>telnet 1.1.1.2
Trying 1.1.1.2 ...
Press CTRL+K to abort
Connected to 1.1.1.2 ...
Login authentication
Username:test
Password:
Info: The max number of VTY users is 5, and the number
of current VTY users on line is 1.
The current login time is 2022-03-08 11:06:48.
<sw>
从客户端测试成功Telnet登录管理交换机
总结:Telnet的配置相对简单,但要保证前提管理交换机的IP地址网络可达,配置的密码记录清楚,避免远程时密码不正确。希望对需要的人有帮助,谢谢!