拓扑图:
配置文件:
SW1 配置文件
interface Vlanif1
ip address 192.168.1.10 255.255.255.0
[sw1]user-interface vty 0 4
[sw1-ui-vty0-4]authentication-mode password
[sw1-ui-vty0-4]set authentication password simple 111
[sw1-ui-vty0-4]user privilege level 3
SW2 配置文件
interface Vlanif1
ip address 192.168.1.20 255.255.255.0
[sw2]user-interface vty 0 4
[sw2-ui-vty0-4]authentication-mode password
[sw2-ui-vty0-4]set authentication password simple 111
[sw2-ui-vty0-4]user privilege level 3
<sw2 >
telnet 192.168.1.10
最后连接效果如下: