Telnet远程连接交换机
命令与步骤
说明
[]
表示可选参数
<>
表示必填参数
()
表示提示信息
进入系统视图
进入系统视图才可以对机器内进行配置
#主机:sw1
system-view #进入系统视图

system-view命令
设置主机名
#主机:sw1
sysname <设置交换机主机名(sw1)> #非必要

设置交换机主机名(sw1)
进入Vlan 1
接口视图
#主机:sw1
interface Vlanif <值(1)> #进入`Vlanif 1`视图

`interface Vlanif 1`命令
设置IP
#主机:sw1
ip address <设置IP地址(192.168.1.1)> <子网掩码(24)>

`ip address 192.168.1.1 24`命令
返回
#主机:sw1
quit #从`Vlanif 1`视图返回到`[sw1]`的系统视图

`quit`命令
与sw1同样配置
# 主机:sw2
system-view #(到系统视图)
sysname <设置交换机主机名(sw2)>
interface Vlanif <值(1)> #进入`Vlanif 1`视图
ip address <设置IP地址(192.168.1.2)> <子网掩码(24)> #设置一个与sw1不同的IP
#主机:sw2
quit #从`Vlanif 1`视图返回到`[sw2]`的系统视图
在sw2上启动Telnet服务
# 主机sw2
telnet server enable #(启动Telnet服务)

`telnet server enable`命令
进入VTY用户视图
#主机:sw2
user-interface vty 0 4

`user-interface vty 0 4`命令
修改认证方式并设置密码
#主机:sw2
set authentication password cipher <密码(123456)>

`set authentication password cipher 123456`命令
设置远程登录的权限等级
#主机:sw2
user privilege level 15 #(修改远程连接权限为15_最高等级)

`user privilege level 15`命令
在sw1使用Telnet进行连接
#主机:sw1
telnet 192.168.1.2 #(连接到sw2)

`telnet 192.168.1.2`命令