實(shí)驗(yàn)一--Cisco-IOS操作
-
資源ID:153215284
資源大?。?span id="lcmw8iyvc" class="font-tahoma">153KB
全文頁數(shù):7頁
- 資源格式: DOC
下載積分:10積分
快捷下載

會(huì)員登錄下載
微信登錄下載
微信掃一掃登錄
友情提示
2、PDF文件下載后,可能會(huì)被瀏覽器默認(rèn)打開,此種情況可以點(diǎn)擊瀏覽器菜單,保存網(wǎng)頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請(qǐng)使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站資源下載后的文檔和圖紙-無水印,預(yù)覽文檔經(jīng)過壓縮,下載后原文更清晰。
5、試題試卷類文檔,如果標(biāo)題沒有明確說明有答案則都視為沒有答案,請(qǐng)知曉。
|
實(shí)驗(yàn)一--Cisco-IOS操作
實(shí)驗(yàn)一 Cisco IOS 操作
實(shí)驗(yàn)學(xué)時(shí):2
實(shí)驗(yàn)類型:驗(yàn)證
一、實(shí)驗(yàn)?zāi)康?
⑴ 掌握路由器基本配置命令;
⑵ 掌握TFTP的安裝與配置,掌握路由器IOS備份、升級(jí)方法;
⑶ 掌握路由器口令恢復(fù)的方法。
二、實(shí)驗(yàn)條件
Cisco2621 Router、PacketTrace仿真軟件、具備Windows操作系統(tǒng)的PC機(jī)
三、實(shí)驗(yàn)原理及相關(guān)知識(shí)
Packet Trace路由仿真軟件的使用,路由器組成及啟動(dòng)順序,配置寄存器和口令恢復(fù),備份及恢復(fù)IOS和配置文件,升級(jí)路由器IOS。
TFTP(trivial file transfer protocol)即簡(jiǎn)單文件傳輸協(xié)議,是允許文件在網(wǎng)絡(luò)中從一臺(tái)主機(jī)傳輸?shù)搅硪慌_(tái)主機(jī)的簡(jiǎn)化的FTP 版本,大多數(shù)網(wǎng)絡(luò)設(shè)備的軟件升級(jí)均采用TFTP 方式。
四、實(shí)驗(yàn)步驟
1. 路由器基本配置
⑴ 配置路由器A
Router>en //進(jìn)入特權(quán)模式
Router#config t //進(jìn)入全局模式
Router(config)#hostname LabA //設(shè)置主機(jī)名
Lab_A(config)#enable secret x203 //設(shè)置加密口令,由用戶模式進(jìn)入特權(quán)模式起作用。
Lab_A(config)#interface fa0/0 //進(jìn)入Fastethernet 0/0子接口模式
Lab_A(config-if)#ip address 192.168.0.1 255.255.255.0 //配置Fa0/0接口的IP地址
Lab_A(config-if)#description Lab_A LAN Connection //配置Fa0/0接口的描述字符
Lab_A(config-if)#no shutdown //激活Fa0/0接口
激活Fa0/0接口后,再查看路由器與交換機(jī)連接線兩端的狀態(tài)狀態(tài)變化。
Lab_A(config-if)#interface s1/0 //進(jìn)入serial 1/0子接口模式
Lab_A(config-if)#ip address 192.168.1.1 255.255.255.0 //配置serial 0/0接口IP地址
Lab_A(config-if)#description WAN Connection to Lab_B //配置serial 0/0接口的描述字符
Lab_A(config-if)#no shut //激活serial 0/0接口
Lab_A(config-if)#exit //退出子接口模式,返回全局模式
Lab_A(config)#line console 0 //進(jìn)入Console子接口模式
Lab_A(config-line)#password x203 //配置Console登陸密碼
Lab_A(config-line)#login
Lab_A(config-line)#line vty 0 4 //進(jìn)入Vty子接口模式
Lab_A(config-line)#password x203 //配置Vty登陸密碼,可以有五個(gè)Telnet
Lab_A(config-line)#login
Lab_A(config-line)#exit //退出子接口模式,返回全局模式
Lab_A(config)#banner motd #[Enter] //設(shè)置Banner信息,以字符“#”結(jié)束輸入
This is the Lab_A router!#
Lab_A(config)#^z //即Ctrl+Z的組合鍵,可直接返回特權(quán)模式
Lab_A#copy running-config startup-config //保存上面所做的所有配置
Destination filename [startup-config]? [Enter]
Lab_A# //特權(quán)模式
⑵ 配置路由器B
Router>en //進(jìn)入特權(quán)模式
Router#config t //進(jìn)入全局模式
Router(config)#hostname Lab_B //設(shè)置主機(jī)名
Lab_B(config-if)#interface s1/0 //進(jìn)入serial 1/0子接口模式
Lab_B(config-if)#ip address 192.168.1.2 255.255.255.0 //配置serial 0/0接口IP地址
Lab_B(config-if)#description WAN Connection to Lab_A //配置serial 0/0接口的描述字符
Lab_B(config-if)#clock rate 9600
Lab_B(config-if)#no shut //激活serial 0/0接口
⑶ 查看當(dāng)前路由器配置
Lab_A#show running-config //查看路由器當(dāng)前的配置信息。
Lab_A#show startup-config //查看nvram 中的路由器配置信息。
Lab_A#show version //查看IOS版本號(hào),已啟動(dòng)時(shí)間,flash中的IOS的文件名,router里面共有什么的端口,寄存器的值等等。
Lab_A#show flash //查看flash中的內(nèi)容,IOS的長(zhǎng)度,文件名,剩余空間,總空間。
2. TFTP軟件安裝
⑴ 配置環(huán)境
配置PC0的IP地址,并測(cè)試其與路由器的連通性。
⑵ TFTP軟件安裝與設(shè)置
在PC0上安裝TFTP軟件,并設(shè)置其文件目錄為D盤根目錄。具體設(shè)置為“查看”-“選項(xiàng)”-“TFTP 服務(wù)器根目錄”,選擇D盤即可。
本實(shí)驗(yàn)在Packet Tracer中模擬實(shí)現(xiàn),因?yàn)镻C0不能安裝TFTP軟件,所以選用默認(rèn)有TFTP功能的Server-TP終端進(jìn)行驗(yàn)證實(shí)驗(yàn)。
3. IOS備份與升級(jí)
⑴ 查看操作系統(tǒng)的名稱
LabA#sh flash
System flash directory:
File Length Name/status
3 50938004 c2800nm-advipservicesk9-mz.124-15.T1.bin //不同的路由器操作系統(tǒng)的名稱不同
2 28282 sigdef-category.xml
1 227537 sigdef-default.xml
[51193823 bytes used, 12822561 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)
⑵ 備份操作系統(tǒng)
LabA#copy flash: tftp
Source filename []? c2800nm-advipservicesk9-mz.124-15.T1.bin
//此處詢問你要求備份的flash的文件名,輸入Cisco IOS的名稱即可,然后press ENTER。
Address or name of remote host []? 192.168.0.2
//此處詢問你要求存放你的flash的服務(wù)器的地址是什么,這里我們輸入TFTP Server的地址,然后press ENTER。
Destination filename [c2800nm-advipservicesk9-mz.124-15.T1.bin]?
//此處詢問在目的地保存該flash的文件名?我們?cè)诖溯斎隒isco IOS的名稱即可。
Writing c2800nm-advipservicesk9-mz.124-15.T1.bin....!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 50938004 bytes]
50938004 bytes copied in 10.739 secs (4743000 bytes/sec)
LabA#
以上的信息說明你的保存已經(jīng)成功完成了,copy flash tftp已經(jīng)成功完成了,一旦這個(gè)復(fù)制命令完成了,路由器會(huì)告訴我們,復(fù)制過去的文件占用了TFTP Server多少空間,一共耗時(shí)多少。
備份完成后,查看PC0 D盤是否有操作系統(tǒng)。
⑶ 升級(jí)IOS
LabA#cop tftp: flash:
Address or name of remote host []? 192.168.0.2 //TFTP服務(wù)器地址
Source filename []? c2800nm-advipservicesk9-mz.124-15.T1 //需升級(jí)的新IOS映象文件名
Destination filename [c2800nm-advipservicesk9-mz.124-15.T1.bin]? c2800nm-advipservicesk9-mz.124-15.T1.bin
%Warning:There is a file already existing with this name
Do you want to over write? [confirm]
Erase flash: before copying? [confirm]
Erasing the flash filesystem will remove all files! Continue? [confirm]
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
Erase of flash: complete
Accessing tftp://192.168.0.3/c2800nm-advipservicesk9-mz.124-15.T1.bin...
Loading c2800nm-advipservicesk9-mz.124-15.T1.bin from 192.168.0.3: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 50938004 bytes]
50938004 bytes copied in 59.179 secs (62410 bytes/sec)
至此,新的IOS文件已傳至路由器,重啟后IOS升級(jí)成功。
4. 口令恢復(fù)
⑴ 連接設(shè)備
重新連接設(shè)備,將PC0通過Console線連接到路由器的Console口,如圖所示。
⑵ 查看寄存器值
當(dāng)路由器啟動(dòng)時(shí),在PC0超級(jí)終端界面HyperTerminal(超級(jí)終端)同時(shí)按下Ctrl和Break 組合鍵來執(zhí)行一個(gè)中斷。系統(tǒng)出現(xiàn)rommon提示,
rommon 1 >
在此模式下使用?,查看監(jiān)控模式下可用的哪些命令。也可使用查看Flash:中的內(nèi)容。
rommon 1 >dir flash:
program load complete, entry point: 0x8000f000, size: 0xcb80
Directory of flash:
2 20267528 -rw- c2800nm-advsecurityk9-mz.124-3i.bin
4951 1823 -rw- sdmconfig-2811.cfg
4952 6036480 -rw- sdm.tar
6426 861696 -rw- es.tar
6637 1164288 -rw- common.tar
6922 1038 -rw- home.shtml
6923 113152 -rw- home.tar
6951 527849 -rw- 128MB.sdf
7080 1697952 -rw- securedesktop-ios-3.1.1.45-k9.pkg
7495 416354 -rw- sslclient-win-1.1.3.173.pkg
7597 1189 -rw- pre_autosec.cfg
7598 1272 -rw- startupc_
⑶ 修改配置寄存器的值
不同的路由器修改的方法不同,
Cisco 2800系列方法如下:
rommon 2 > confreg 0x2142
You must reset or power cycle for new config to take effect
//下次引導(dǎo)時(shí)不要配置文件,考慮通常配置寄存器的值是什么,為什么現(xiàn)在是這樣的值。
⑷ 重啟設(shè)備
使用命令reset重新啟動(dòng)路由器:
rommon 2 >reset
由于進(jìn)行的是不帶配置文件的啟動(dòng),所以系統(tǒng)進(jìn)入“setup”模式,選擇“no”。
--- System Configuration Dialog ---
Continue with configuration dialog? [yes/no]: no
⑸ 導(dǎo)入配置
將NVRAM中的配置文件導(dǎo)入到running-config文件中
LabA#copy startup-config running-config
在這一步中,分別是用show run和show star命令查看配置文件,你會(huì)發(fā)現(xiàn)在Start中的F0/0以及F0/1端口是no shutdown的。而雖然已經(jīng)將Start 內(nèi)容復(fù)制到run中,并沒有改變r(jià)un中的F0/0以及F0/1的狀態(tài)。這就是這條命令的局限。
⑹ 修改并保存
修改各類口令:
LabA(config)#enable secret test
LabA(config)#line vty 0 4
LabA(config-line)#password test
LabA(config-line)#line console 0
LabA(config-line)#password test
修改回配置寄存器的值:
LabA(config)#config-register 0x2102
保存修改后的口令
LabA#copy running-config startup-config
五、思考題及其它
⑴ 理解路由器口令恢復(fù)的基本原理以及寄存器值的修改作用。
⑵ 交換機(jī)及其他廠家設(shè)備口令恢復(fù)的方法?
⑶ 理解startup-config和running-config的區(qū)別,以及copy startup-config running-config的局限性。