一、建立遠程管理路由:
1. 準備PC*1、交換機*2、路由器*1; 2. 進行連接 3. PC設置ip:192.168.1.1 、子網掩碼:255.255.255.0 、網關:192.168.1.254 ; 4. 給路由器 命名:R1 、兩端配置ip地址 、登陸用戶模式密碼、特權模式密碼 5. Route>enable 6. Route# configure terminal 7. R1(config)#hostname R1 8. R1(config)#interface gigabitethernet0/0 9. R1(config-if)#ip address 192.168.1.254 255.255.255.0 10. R1(config-if)#no shutdown 11. R1(config-if)#exit 12. R1(config)#interface gigabitethernet0/0 13. R1(config-if)#no shutdown 14. R1(config-if)#ip address 192.168.2.254 255.255.255.0 15. R1(config-if)#end 16. R1#conf t 17. R1(config)#enable password 000 18. R1(config)#line console 0 19. R1(config-line)#password 111 20. R1(config-line)#login 21. R1(config-line)#end 22. R1#write 保存 23. 給交換機SW1設置 vty 線路 24. SW1(config)#line vty 0 4 25. SW1(config-line)#password 222 26. SW1(config-line)#login 27. 配置特權密碼 28. SW1(config)#enable secret huihui 29. SW1(config)#end 30. SW1#write 保存 31. 給交換機設置默認管理ip地址: 32. SW1(config)#interface fastEthernet0/2 33. SW1(config-if)#ip address 192.168.1.2 255.255.255.0 34. % Invalid input detected at '^' marker. 錯誤 35. SW1(config-if)#exit 36. SW1(config)#interface vlan 1 37. SW1(config-if)#ip address 192.168.1.2 255.255.255.0 38. SW1(config-if)#no shutdown 39. 配置交換機的默認網關; 40. SW1(config)#ip default-gateway 192.168.1.254 41. SW2同SW1設置一樣 42. 給路由器設置遠程訪問所需參數 43. R1(config)#line vty 0 4 44. R1(config-line)#password 123 45. R1(config-line)#login 46. R1(config-line)#end |
二、 進行路由密碼破解
1. 準備一個路由器 2. 設置用戶訪問密碼和特權密碼 3. Router#show version 4. Configuration register is 0x2102 5. Router(config)#config-register 0x2142 6. Router(config)#end 7. Router#write 8. Router#reload 9. Router> 此時不需要密碼 10. Router# 也不需要密碼 11. Router#show running-config 沒有信息 12. Router#copy startup-config running-config 13. Router#show running-config
15. 清除特權密碼和用戶登錄密碼 16. Router(config)#no enable secret 清除特權密碼 17. Router(config)#line console 0 18. Router(config-line)#no password 清除用戶登錄密碼 19. Router(config-line)#end 20. Router#write 21. Router(config)#config-register 0x2102 22. Router#reload 23. Router>不需要密碼 24. Router#不需要密碼 25. Router#show version |
實驗結果:
一. 用PC機可以進行配置兩個交換機和路由器; |
二. 進行路由密碼破解: 1. 清除了用戶登錄密碼和特權密碼 2. 還原寄存器值爲0x2102 |
文以及分析:
一 . 建立遠程路由管理 1) 給交換機配置默認管理ip地址時出現ip地址錯誤 分析:不能直接給交換機接口設置ip地址;只能給虛擬接口VLAN配置IP地址 2) 遠程配置SW2時,出現拒絕訪問; 分析: 3) 先ping,沒有ping通; 4) 查看路由ip配置,發現地址爲192.168.2.254的接口沒有激活 5) 進入路由器進行激活; 6) 進行測試,能ping通 7) 進行遠程管理,可以進行設置 |
二 . 進行路由密碼破解: 1) 沒有出現相關密碼信息 2)在特權模式下,沒有將啓動配置文件 copy 到內存中 |