国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 網(wǎng)絡(luò)通信 > 正文

IOS軟件中路由器的口令設(shè)置和口令恢復(fù)

2019-11-05 00:34:41
字體:
供稿:網(wǎng)友

  2.5 實(shí)驗(yàn)4:路由器的口令設(shè)置和口令恢復(fù)
  
  口令設(shè)置是網(wǎng)絡(luò)設(shè)備經(jīng)常使用的安全措施之一,當(dāng)忘記原來配置在網(wǎng)絡(luò)設(shè)備上的口令而試圖獲得對(duì)該設(shè)備的控制權(quán)時(shí),則需要相應(yīng)的口令恢復(fù)操作。
  
  本節(jié)以路由器為例進(jìn)行口令設(shè)置和口令恢復(fù)方面的實(shí)驗(yàn)。
  
  實(shí)驗(yàn)?zāi)康?br />  
  通過本實(shí)驗(yàn),讀者可以把握以下技能:
  路由器Console端口、vty線路、enable等口令的設(shè)置;
  路由器口令恢復(fù)的技巧。
  
  2.設(shè)備需求與線纜連攘要求
  
  本實(shí)驗(yàn)的設(shè)備與線纜連接要求和實(shí)驗(yàn)1完全相同,請(qǐng)參見實(shí)驗(yàn)1的有關(guān)圖示和說明。在此不再重復(fù)說明。
  
  3.實(shí)驗(yàn)配置及監(jiān)測(cè)結(jié)果
  
  連接好線纜并給pc和路由器加電后,開始本節(jié)的實(shí)驗(yàn)。
  
  第1部分:配置各種口令
  
  首先進(jìn)行控制臺(tái)(Console)端口、輔助口(AUX)、虛擬終端(vty)線路、,特權(quán)模式口令及密碼的設(shè)置。
  
  其中Console端口口令控制通過Console端口到路由器的訪問;AUX端口口令用于控制通過AUX端口到路由器的訪問;vty線路口令控制Telnet到路由器的訪問;特權(quán)模式口令是為保護(hù)路由器特權(quán)模式而設(shè)置的口令,即enable passWord;而特權(quán)模式密碼是加密的口令,即enable secret,在路由器的配置清單中不顯示其內(nèi)容,當(dāng)同時(shí)配置了enable password和enablesecret時(shí),后者生效。
  
  配置清單2-2記錄了對(duì)各種口令的設(shè)置方法。
  
  配置清單2-2 設(shè)置路由器的各種口令
  
  Router>
  Router>en
  Router#conf t
  Enter configuration commands, one per line. End with CNTL/Z.
  Router(config)#enable password cisco1
  Router(config)#enabSe secret cisco2
  Router(config)#line con 0
  Router(config-line)#login
  Router(config-line)#passw cisco3
  Router(config-line)#exit
  Router(config)#line aux 0
  Router(config-line)#loglis
  Router(config"line)#passw cisco4
  Router(config-line)#exit
  Router(config)#line vty 0 4
  Router(config-line)#login
  Router(config-line)#passw ciscoS
  Router(config-line)#end
  Router#sh run
  Building configuration...
  Current configuration : 566 bytes
  version 12.1
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname Router
  !
  enable secret 5 $l$cQDs$6M3C79y9sWQgk.mYywxTt0
  enable password ciscol
  ... (此處省略多行)
  line con 0
  password cisco3
  login
  transport input none
  line aux 0
  password cisco4
  login
  line vty 0 4
  password cisco5
  login
  !
  end
  
  (1)以上配置清單具體記錄了各種口令的配置方法,同時(shí)列出運(yùn)行配置清單,清單中對(duì)cnable密碼進(jìn)行了加密顯示。
  
  (2)在上述配置下,從用戶執(zhí)行模式進(jìn)入特權(quán)執(zhí)行模式時(shí)應(yīng)輸入的口令是cisco2,而不是Cisco1,這一點(diǎn)要非凡注重。
  
  (3)路由器支持對(duì)所有口令進(jìn)行加密顯示,實(shí)現(xiàn)這個(gè)功能的命令是service命令的一個(gè)子命令,即sewice password-encryption,此命令應(yīng)在全局配置模式下發(fā)出。配置此命令后的showrunning-config結(jié)果中會(huì)出現(xiàn)類似以下內(nèi)容的顯示:
  line con 0
  password 7 02050D04808095C
  login
  
  我們?cè)谂渲们鍐伍_頭部分經(jīng)常看到的service timestamps debug uptime和servicce timestampslog uptime是路由器的缺省配置"分別指示系統(tǒng)在顯示Debug信息和log信息的同時(shí)提供開機(jī)后的時(shí)間信息,即所謂"時(shí)間戳"(Timestamp)。
  
  (4)注重以上所有口令都是對(duì)大小寫敏感的。
  
  第2部分:進(jìn)行口令恢復(fù)操作
  
  口令恢復(fù)的操作往往令初學(xué)Cisco設(shè)備操作的人生畏,認(rèn)為這種操作過于復(fù)雜、難以把握。產(chǎn)生這樣感覺的原因是初學(xué)者往往對(duì)Cisco路由器的另一種運(yùn)行模式ROM Monitor模式缺乏熟悉造成的。
  
  路由器的ROM中除固化了一種功能有限的IOS之外,還有一種非IOS的簡(jiǎn)單操作系統(tǒng),同IOS一樣,也可以被加載,加載之后進(jìn)入的模式被稱為ROM Monitor模式。ROM Mintor模式通常被用于對(duì)設(shè)備進(jìn)行低級(jí)調(diào)試和口令恢復(fù)。在網(wǎng)絡(luò)設(shè)備的一般性調(diào)試中很少用到ROMMonitor模式。這是許多人對(duì)它不熟悉的主要原因。
  
  以PC機(jī)的超級(jí)終端訪問路由器,在路由器加電后的60s內(nèi)按下Break鍵 (或Ctrl+Break鍵)就能進(jìn)入到ROM Monitor模式下,口令恢復(fù)的操作便可以進(jìn)行了。
  
  監(jiān)測(cè)清單2-5記錄了對(duì)Cisco2500系列路由器口令恢復(fù)操作的全過程,其中與口令恢復(fù)操作無關(guān)的內(nèi)容己被刪節(jié)。
  
  監(jiān)測(cè)清單2-5 Cisco 2500系列路由器的口令恢復(fù)操作
  
  第1段: ROM Monitor
  System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
  Copyright (c) 1986-1995 by cisco Systems
  2500 PRocessor with 16384 Kbytes of main memory
  (按下Break鍵, 進(jìn)入ROM Monitor模式)
  Abort at Ox1OEA81C (PC)
  >?
  $ Toggle cache state
  B [filename] [TFTP Server ip address I TFTP Server Name]
  Load and execute system image from ROM or from TFTP server
  C [address] Continue execution [optional address]
  D/S M LV Deposit value V of size S into location L with modifier M
  E/S M L Examine location L with size S with modifier M
  G [address] Begin execution
  H Help for commands
  I Initialize
  K Stack trace
  L [filename] [TFTP Server IP address ! TFTP Server Name]
  Load system image from ROM or from TFTP server, but do not
  begin execution
  O Show configuration register option settings
  P Set the break point
  S Single step next instrUCtion
  T function Test device (? for help)
  Deposit and Examine sizes may be B (byte), L (long) or S (short).
  Modifiers may be R (register) or S (byte swap).
  Register names are: DO-D7, AO-A6, SS, US, SR, and PC
  >0
  Configuration register=0xFFFF2102atlast boot
  Bit# Configuration register option settings:
  15 Diagnostic mode disabled
  14 IP broadcasts do not have network numbers
  13 Boot default ROM software if network boot fails
  12-11 Console speed is 9600 baud
  10 IP broadcasts with ones
  08 Break disabled
  07 OEM disabled
  06 Ignore configuration disabled
  03-OOBoot file is cisco2-2500 (or 'boot system' command)
  
  >o/r 0x2142
  >i
  
  第2段:路由器正常啟動(dòng)
  
  (以下為路由器的正常啟動(dòng)過程)
  
  System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
  Copyright (c) 1986-1995 by cisco Systems
  ...(路由器啟動(dòng)報(bào)告,省略)
  ---System Configuration Dialog ---
  Would you like to enter the initial configuration dialog? [yes/no]: n
  Press RETURN to get started!
  Router>en
  Router#sh version
  Cisco Internetwork Operating System Softwaree 0
  ... (此處為版本,接口等信息,省略)
  Router#sh startup-config
  Using 455 out of 32762 bytes
  version 12.1
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname Router
  enable password cisco
  ... (此處省略多行)
  !
  line con 0
  password ciscol
  login
  line aux 0
  line vty 0 4
  !
  end
  Router#copy start run
  Destination filename [running-config]?
  455 bytes copied in 4.708 sees (113 bytes/sec)
  Router#conf t
  Router(coiifig)#coiifig-register 0x2102
  Router(config)#end
  Router#sh version
  Cisco Internetwork Operating System Softwaree 0
  ...(此處為版本、接口等信息,省略)
  Configuration register is 0x2142(will be 0x2102 at next reload)
  
  (1)進(jìn)入路由器ROM Monitor模式后。用問號(hào)可以查看其所有命令。其中"o"命令的執(zhí)行結(jié)果顯示當(dāng)前配置寄存器值為0xFFFF2l02。
  
  (2)使用o/r命令把配置寄存器值更改為0x2142,目的是使路由器啟動(dòng)IOS軟件時(shí)不調(diào)用NVRAM中的配置文件,從而不進(jìn)行口令方面的認(rèn)證。
  
  (3)使用"i"命令啟動(dòng)路由器進(jìn)入IOS運(yùn)行模式。
  
  (4)第2段中的內(nèi)容是路由器進(jìn)入IOS模式后的記錄。show version命令顯示當(dāng)前配置寄存器的值為0x2142。
  
  (5)查看NVRAM中的配置發(fā)現(xiàn)原配置文件依然完整地保存著,可以看到原來設(shè)的口令。使用copy命令把starup-config復(fù)制到running-config中,可以使原配置立即生效。
  
  (6)在全局配置模式下,發(fā)出命令config-register0x2102,把配置寄存器值更改回0x2102,即要求路由器在下次啟動(dòng)時(shí)調(diào)用NVRAM中的配置文件。show version命令顯示了我們希望看到的結(jié)果,口令恢復(fù)的整個(gè)操作即時(shí)完成。
  
  Cisco2000、3000、4000和7000系列路由器的口令恢復(fù)操作與上述操作基本相同,其它系列路由器與這個(gè)操作的區(qū)別主要在ROM Monitor模式下更改配置寄存器值的命令是confreg(問答式)和啟動(dòng)路由器IOS軟件命令為reload。


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 西乌珠穆沁旗| 剑阁县| 贵定县| 曲沃县| 昌吉市| 吉林省| 丽江市| 汉沽区| 偏关县| 清原| 北宁市| 栾城县| 万全县| 和田市| 曲松县| 三明市| 边坝县| 大连市| 德惠市| 淮北市| 堆龙德庆县| 衡阳县| 汽车| 邵武市| 阳山县| 华坪县| 高唐县| 揭西县| 抚州市| 齐河县| 烟台市| 天等县| 枞阳县| 瓮安县| 嘉兴市| 昌宁县| 达孜县| 临泽县| 观塘区| 广宗县| 承德县|