Topology:
Configuration file:
SW1 configuration file
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 configuration file
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 The
final connection effect is as follows: