在思科模拟器中搭建拓扑使PC机可以远程连接交换机

实验步骤:
1.给PC机配IP为“10.0.0.1”子网掩码为“255.0.0.0”网关为“10.0.0.254”如图:在思科模拟器中搭建拓扑使PC机可以远程连接交换机

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

扫描二维码关注公众号,回复: 6521537 查看本文章

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#
两台交换机都可以远程连接到,任务完成。

转载于:https://blog.51cto.com/14373424/2403785

猜你喜欢

转载自blog.csdn.net/weixin_34380781/article/details/91697179