A-A+

路由器和交换机远程登录配置的实验

2016年01月06日 路由器高级应用 暂无评论 阅读 3 views 次

一实验目的

学习如何配置路由器的gatway、Console、vty、enable password

学习如何配置交换机的vlan1 gatway、Console、vty、enable password

学习如何安装telnet

学习如何远程登录交换机路由器

二实验步骤

路由配置

R1路由器配置IP、子网掩码、

  1. R1(config)#int f0/0                                //进入F0/0接口  
  2. R1(config-if)#ip add 192.168.100.1 255.255.255.0       //配置IP和默认网关  
  3. R1(config-if)#no shutdown                         // 激活接口  
  4. R1(config-if)#exit                                 //退出  

Console密码

  1. R1(config)#line console 0      //进入console o 口  
  2. R1(config-line)#password 123    //设置密码123  
  3. R1(config-line)#exit     //退出  

虚拟终端开启数和密码

  1. R1(config)#line vty 0 4      //进入虚拟类型终端设置连接数(0是1个、0_ 2 是2个、 0_ 3是3个、0_4是4个)  
  2. R1(config-line)#password 123   //设置VTY的密码123  
  3. R1(config-line)#login    //开启激活  
  4. R1(config-line)#exit      //退出  
  5. R1(config)#enable password 123    //给特权模式设置进入密码123  
  6. R1(config)#  

交换机配置

  1. S1#conf t                                  //进入特权模式  
  2. S1(config)#int vlan 1                         //进入vlan 1口  
  3. S1(config-if)#ip add 192.168.100.2 255.255.255.0  //配置IP  
  4. S1(config-if)#no shutdown                    //激活接口  
  5. S1(config-if)#exit  
  6.    
  7. S1(config)#line console 0                     //进入console 0口  
  8. S1(config-line)#password 123                 //设置密码123  
  9. S1(config-line)#exit                          //退出  
  10. S1(config)#  
  11.    
  12. S1(config)#  
  13. S1(config)#line vty 0 4                      //进入虚拟类型终端设置连接数(0是1个、0_ 2是2个、 0_ 3是3个、0_4是4个)  
  14. S1(config-line)#password 123                 //配置IP  
  15. S1(config-line)#login                        //激活  
  16. S1(config-line)#exit                         //退出           
  17. S1(config)#  
  18.    
  19. S1(config-if)#ip default-gateway 192.168.100.1    //配置交换机的网关(不在同一网段的时候要用)  
  20.    
  21. S1(config)#enable password 123              //特权模式设置密码123  

安装telnet

远程登陆交换机路由器

这里192.168.100.1是路由器的 192.168.100.2是交换机的

三注意事项

此处当出现远程连接出现(connect refuse或者在端口 23: 连接失败)一般有2种情况。

1 GNS3的兼容性个出现了问题只能重新打开GNS3程序重新配置

2 telnet的服务默认没有打开

标签:

给我留言