步骤:
1.开通telnet
[Huawei]telnet server enable
2.给交换机设置IP 并且给接口划分到vlan中
[Huawei]vlan 10
[Huawei-vlan10]quit
[Huawei]interface Vlanif 10
[Huawei-Vlanif10]ip address 192.168.1.1 255.255.255.0
[Huawei-Vlanif10]quit
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 10
[Huawei-GigabitEthernet0/0/1]quit
#
3.配置vty
[Huawei]user-interface vty 0 4
[Huawei-ui-vty0-4]authentication-mode aaa
[Huawei-ui-vty0-4]user privilege level 15
[Huawei-ui-vty0-4]protocol inbound all
[Huawei-ui-vty0-4]quit
4.配置账户密码
设置密码,将用户级别设为最高15 ,添加连接方式 telnet 其他方式根据需求添加
[Huawei]aaa
[Huawei-aaa]local-user admin password cipher Huawei@123
[Huawei-aaa]local-user admin privilege level 15
[Huawei-aaa]local-user admin service-type telnet terminal ssh
[Huawei-aaa]quit
[Huawei]
增加外一台交换机或者电脑终端。作为远程连接工具
将终端IP设为192.168.1.21 与被控端连通。
[Huawei]vlan 10
[Huawei-vlan10]quit
[Huawei]interface Vlanif 10
[Huawei-Vlanif10]ip address 192.168.1.21 255.255.255.0
[Huawei-Vlanif10]quit
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 10
测试一下:
[Huawei]quit
<Huawei>telnet 192.168.1.1
Trying 192.168.1.1 ...
Press CTRL+K to abort
Connected to 192.168.1.1 ...Login authenticationUsername:admin
Password:
Info: The max number of VTY users is 5, and the numberof current VTY users on line is 1.The current login time is 2023-04-09 10:11:13.
<Huawei>