标签:user 密码 continue packet mes water 远程连接 技术 seconds
实验条件如图:2.给switch0配置管理IP为10.0.0.2,配置远程密码为“haha”,配置特权模式下的密码为“hehe”如下:
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface vlan 1
Switch(config-if)#ip address 10.0.0.2 255.0.0.0
Switch(config-if)#no shutdown
Switch#conf t
Switch(config)#line vty 0 4
Switch(config-line)#password haha
Switch#conf t
Switch(config)#enable password hehe
Switch(config)#end
Switch#w
3.给路由器配置IP下:
Continue with configuration dialog? [yes/no]: no
Router>en
Router#conf t
Router(config)#interface f0/0
Router(config-if)#ip address 10.0.0.254 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#interface f0/1
Router(config-if)#ip address 20.0.0.254 255.0.0.0
Router(config-if)#no shutdown
4.给switch1配置管理IP为“20.0.0.1”配置网关为“20.0.0.254”配置远程密码为:456.配置特权模式下的密码为:123如下
Switch>en
Switch#conf t
Switch(config)#interface vlan 1
Switch(config-if)#ip address 20.0.0.1 255.0.0.0
Switch(config-if)#no shutdown
Switch(config)#ip default-gateway 20.0.0.254
Switch(config)#end
Switch#conf t
Switch(config)#line vty 0 4
Switch(config-line)#password 456
Switch(config-line)#end
Switch#conf t
Switch(config)#enable password 123
Switch(config)#end
Switch#w
打开PC机先ping通switch1和switch0如下:
PC>ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Reply from 10.0.0.2: bytes=32 time=1ms TTL=255
Reply from 10.0.0.2: bytes=32 time=0ms TTL=255
Reply from 10.0.0.2: bytes=32 time=0ms TTL=255
Reply from 10.0.0.2: bytes=32 time=0ms TTL=255
Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
PC>ping 20.0.0.1
Pinging 20.0.0.1 with 32 bytes of data:
Request timed out.
Request timed out.
Reply from 20.0.0.1: bytes=32 time=0ms TTL=254
Reply from 20.0.0.1: bytes=32 time=0ms TTL=254
Ping statistics for 20.0.0.1:
Packets: Sent = 4, Received = 2, Lost = 2 (50% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Ping通后远程分别连接switch0和switch1如下:
PC>telnet 10.0.0.2
Trying 10.0.0.2 ...Open
User Access Verification
Password:
Switch>en
Password:
Switch#
PC>telnet 20.0.0.1
Trying 20.0.0.1 ...Open
User Access Verification
Password:
Switch>en
Password:
Switch#
两台交换机都可以远程连接到,任务完成。
标签:user 密码 continue packet mes water 远程连接 技术 seconds
原文地址:http://blog.51cto.com/13568842/2059276