第一篇:CISCO路由器IOS升級(jí)方法總結(jié)
CISCO路由器IOS升級(jí)方法總結(jié)
前不久,朋友在對(duì)一臺(tái)帶語音??斓腃ISCO2610進(jìn)行IOS升級(jí)時(shí),由于路由器的內(nèi)存(flash)為8M,IOS軟件為7M多,升級(jí)后路由器無法正常啟動(dòng)。啟動(dòng)后到rommon 1 >狀態(tài),請(qǐng)求幫助。由于本人長期從事計(jì)算機(jī)網(wǎng)絡(luò)管理工作,在對(duì)CISCO路由器的長期日常維護(hù)和管理實(shí)踐中積累了一定的經(jīng)驗(yàn)?,F(xiàn)總結(jié)歸納出CISCO路由器IOS映像升級(jí)的幾種方法,供廣大網(wǎng)絡(luò)愛好者或同仁參考。在介紹CISCO路由器IOS升級(jí)方法前,有必要對(duì)Cisco路由器的存儲(chǔ)器的相關(guān)知識(shí)作以簡單介紹。路由器與計(jì)算機(jī)相似,它也有內(nèi)存和操作系統(tǒng)。在Cisco路由器中,其操作系統(tǒng)叫做互連網(wǎng)操作系統(tǒng)(Internetwork Operating System),常簡稱為IOS.路由器的存儲(chǔ)器主要有:
ROM:只讀存儲(chǔ)器包含路由器正在使用的IOS的一份副本;
RAM:IOS將隨機(jī)訪問存儲(chǔ)器分成共享和主存。主要用來存儲(chǔ)運(yùn)行中的路由器配置和與路由協(xié)議有關(guān)的IOS數(shù)據(jù)結(jié)構(gòu);
FLASH(閃存):用來存儲(chǔ)IOS軟件映像文件,閃存是可以擦除內(nèi)存,它能夠用IOS的新版本覆寫,IOS升級(jí)主要是閃存中的IOS映像文件進(jìn)行更換。
NVRAM:非易失性隨機(jī)訪問存儲(chǔ)器,用來存儲(chǔ)系統(tǒng)的配置文件。
IOS升級(jí)方法一
在對(duì)能夠正常啟動(dòng)的CISCO路由器的IOS進(jìn)行升級(jí)時(shí),比較簡單。具體步驟如下:
1、尋找一種TFTP服務(wù)器軟件(有CISCO公司的TFTPServer或3COM公司的3Cserver等,在升級(jí)較大IOS映象文件時(shí),建議用3Cserver),安裝在一臺(tái)計(jì)算機(jī)上,將要升級(jí)的IOS映象文件拷貝到相關(guān)的目錄中(例:D:),并運(yùn)行TFTP服務(wù)器軟件,通過菜單設(shè)置Root目錄為拷貝IOS映象文件所在目錄(如D:)。假設(shè)該計(jì)算機(jī)的IP地址為10.32.10.1;
2、連接路由器的console口與PC機(jī)的COM1(有文檔說明),使用PC的超級(jí)終端軟件訪問路由器,將路由器的地址設(shè)為10.32.10.32(與計(jì)算機(jī)的IP地址同網(wǎng)段即可)。建議在進(jìn)行IOS升級(jí)前將原有IOS文件備份下來,防止待升級(jí)的IOS文件存在問題不可用; 也可用Router#Show version)QUOTE:Router# dir flash:(查看目前IOS映象文件名,Directory of flash:/ 1-rw-5998292 C2600-I-MZ.122-11.BIN 8388608 bytes total(2390252 bytes free)
Router#copy flash tftp(備份IOS文件)Source filename []?c2600-i-mz.122-11.bin Address or name of remote host []? 10.32.10.1(指定TFTP服務(wù)器地址)
Destination filename [c2600-i-mz.122-11.bin]?
?。。。。。。。。。。。。。。。。。。。?!
…
?。。。。。。。。。。。。。。。。。。。?!
5998292 bytes copied in 324.071 secs(18509 bytes/sec)Router#
3、對(duì)路由器進(jìn)行IOS升級(jí);
QUOTE:Router#copy tftp flash Address or name of remote host []? 10.32.10.1(指定TFTP服務(wù)器地址)
Source filename []? c2600-i-mz.122-11.bin(需升級(jí)的新IOS映象文件名)
Destination filename [c2600-i-mz.122-11.bin]?
Do you want to over write? [confirm]
(確認(rèn))
Accessing tftp://10.32.10.1/c2600-i-mz.122-11.bin……
Erase flash: before copying? [confirm] Erasing the flash filesystem will remove all files!Continue? [confirm] Erasing device…… eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ……erasedee
Erase of flash: complete
:?。。。。。?!Loading c2600-i-mz.122-11.bin from 10.32.10.1(via Ethernet0/0)!
?。。。。。。。。。。。。。。。。。。。。。?/p>
?。。。。。。。。。。。。。。。。。?!
[OKRestricted Rights clause at FAR sec.52.227-19 and subparagraph(c)(1)(ii)of the Rights in Technical Data and Computer Software clause at DFARS sec.252.227-7013.cisco Systems,Inc.170 West Tasman Drive San Jose,California 95134-1706 Cisco Internetwork Operating System Software,(11)IOS(tm)C2600 Software(C2600-I-M)Version 12.2T9,RELEASE SOFTWARE(fc1)
TAC Support: http://www.tmdps.cn/tac
Copyright(c)1986-2003 by cisco Systems,Inc.Compiled Mon 23-Jun-03 15:42 by cmong Image text-base: 0x8000809C,data-base: 0x80A68B48 cisco 2610(MPC860)processor(revision 0x203)with 22528K/2048K bytes of memory Processor board ID JAD03483395(1128032249)
M860 processor: part number 0,mask 49 Bridging software.X.25 software,Version 3.0.0.1 Ethernet/IEEE 802.3 interface(s)
Serial(sync/async)network interface(s)
32K bytes of non-volatile configuration memory.8192K bytes of processor board System flash(Read/Write)
Press RETURN to get started!
*Mar 1 00:00:05.652: %PA-2-UNDEFPA: Undefined Port Adaptor type 100 in bay 1 *Mar 1 00:00:07.996: %LINK-3-UPDOWN: Interface Ethernet0/0,changed state to up *Mar 1 00:00:07.996: %LINK-3-UPDOWN: Interface Serial0/0,changed state to down *Mar 1 00:00:07.996: %LINK-3-UPDOWN: Interface Serial0/1,changed state to down *Mar 1 00:00:09.142: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0,changed state to up *Mar 1 00:00:09.142: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0,changed state to down *Mar 1 00:00:09.142: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1,changed state to down *Mar 1 00:00:09.458: %SYS-5-CONFIG_I: Configured from memory by console *Mar 1 00:00:11.245: %LINK-5-CHANGED: Interface Serial0/1,changed state to administratively down *Mar 1 00:00:12.275: %SYS-5-RESTART: System restarted ——Cisco Internetwork Operating System Software,(11)IOS(tm)C2600 Software(C2600-I-M)Version 12.2T9,RELEASE SOFTWARE(fc1)
TAC Support: http://www.tmdps.cn/tac
Copyright(c)1986-2003 by cisco Systems,Inc.Compiled Mon 23-Jun-03 15:42 by cmong *Mar 1 00:00:12.279: %SNMP-5-COLDSTART: SNMP agent on host NE16 is undergoing a cold start Router采用這種方法時(shí),由于使用console口來傳送,速率為9600bps,需要時(shí)間較長。因此可修改console口速率利用xmodem命令實(shí)現(xiàn)快速升級(jí)IOS.具體方法如下:
QUOTE:rommon 1 > confreg 回車
Configuration Summary enabled are:
load rom after netboot fails console baud: 9600
原始的速率9600bps boot: image specified by the boot system commands or default to: cisco2-C2600 do you wish to change the configuration? y/n [n]: y(選擇 yes)
enable “diagnostic mode”? y/n [n]: n(選擇 no)
enable “use net in IP bcast address”? y/n [n]: n(選擇 no)
disable “l(fā)oad rom after netboot fails”? y/n [n]: n(選擇 no)
enable “use all zero broadcast”? y/n [n]: n(選擇 no)
enable “break/abort has effect”? y/n [n]: n(選擇 no)
enable “ignore system config info”? y/n [n]: n(選擇 no)
change console baud rate? y/n [n]: y(選擇 yes)
enter rate: 0 = 9600,1 = 4800,2 = 1200,3 = 2400 4 = 19200,5 = 38400,6 = 57600,7 = 115200 [0]: 7(選擇 7,用最大的11520 速率的xmodem傳輸)
change the boot characteristics? y/n [n]: n(選擇 no)
Configuration Summary enabled are:
load rom after netboot fails console baud: 115200 boot: image specified by the boot system commands or default to: cisco2-C2600 do you wish to change the configuration? y/n [n]: n(選擇 no)
You must reset or power cycle for new config to take effect rommon 2 > reset 回車注意:在按reset鍵前,需要修改串口速度(我的電腦——端口屬性——串口速度調(diào)為115200),然后再修改超級(jí)終端里設(shè)置速率為115200,記住,一定要這么做,否則會(huì)出現(xiàn)亂碼!然后關(guān)閉這個(gè)超級(jí)終端,重新建立一個(gè)超級(jí)終端連接,重新啟動(dòng)系統(tǒng)后,出現(xiàn)
QUOTE:rommon 1> 提示符然后,輸入
QUOTE:rommon 1> xmodem-r
Do not start the sending program yet……
Invoke this application only for disaster recovery.Do you wish to continue? y/n [n]: y(選擇 yes)
Ready to receive file ……
此時(shí),在超級(jí)終端的菜單上的“傳送”——“發(fā)送文件”——選擇IOS映像文件所在地以及選擇使用“xmodem”協(xié)議,點(diǎn)擊“發(fā)送”即可。等待10-20分鐘左右就可升級(jí)完3-6M的IOS文件!待升級(jí)完成后,請(qǐng)記住修改回計(jì)算機(jī)串口與超級(jí)終端、路由器confreg下的xmodem等傳輸速率為9600bps.方法如下:
QUOTE:Router>en 進(jìn)入新IOS的特權(quán)模式
Router#reload 重啟系統(tǒng)
Proceed with reload? [confirm] 回車
00:01:04: %SYS-5-RELOAD: Reload requested System Bootstrap,Version 11.3(2)XA4,RELEASE SOFTWARE(fc1)
Copyright(c)1999 by cisco Systems,Inc.TAC:Home:SW:IOS:Specials for info PC = 0xfff0a530,Vector = 0x500,SP = 0x680127b0 C2600 platform with 24576 Kbytes of main memory PC = 0xfff0a530,Vector = 0x500,SP = 0x80004684 monitor: command “boot” aborted due to user interrupt 30秒內(nèi)按ctrl+break鍵 rommon 1 > confreg(輸入“confreg”命令)
Configuration Summary enabled are:
load rom after netboot fails console baud: 115200
boot: image specified by the boot system commands or default to: cisco2-C2600 do you wish to change the configuration? y/n [n]: y(選擇 yes)
enable “diagnostic mode”? y/n [n]: n(選擇 no)
enable “use nn IP bcast address”? y/n [n]: n(選擇 no)
disable “l(fā)oad rom after netboot fails”? y/n [n]: n(選擇 no)
enable “use all zero broadcast”? y/n [n]: n(選擇 no)
enable “break/abort has effect”? y/n [n]: n(選擇 no)
enable “ignore system config info”? y/n [n]: n(選擇 no)
change console baud rate? y/n [n]: y(選擇 yes)
enter rate: 0 = 9600,1 = 4800,2 = 1200,3 = 2400 4 = 19200,5 = 38400,6 = 57600,7 = 115200 [7]: 0(選擇 0,改回用標(biāo)準(zhǔn)速率速率9600的xmodem傳輸)
change the boot characteristics? y/n [n]: n(選擇 no)
Configuration Summary enabled are:
load rom after netboot fails console baud: 9600 boot: image specified by the boot system commands or default to: cisco2-C2600 do you wish to change the configuration? y/n [n]: n You must reset or power cycle for new config to take effect rommon 2 > 此時(shí)手工改回計(jì)算機(jī)串口與超級(jí)終端2者傳輸速率為9600 然后敲入:
QUOTE:rommon 2 >reset
最好關(guān)掉電源后,重新啟動(dòng)。利用xmodem命令實(shí)現(xiàn)路由器IOS升級(jí)速度較慢,往往等上很長時(shí)間,為了快速升級(jí),可以采用下列方法。
(二)通過tftpdnld命令升級(jí)IOS,具體步驟如下:
1、用Cisco原配的線纜連接路由器的console口與PC機(jī)的COM1,使用PC機(jī)的超級(jí)終端軟件訪問路由器;用一根雙絞線連接路由器的eth0/0口與PC機(jī)的網(wǎng)卡。
2、將路由器的eth0/0口IP地址設(shè)為10.32.10.32;PC機(jī)的IP地址設(shè)為10.32.10.1.將要升級(jí)的IOS映象文件拷貝到相關(guān)的目錄中,并運(yùn)行TFTP服務(wù)器軟件,通過菜單設(shè)置Root目錄為拷貝IOS映象文件所在目錄。
3、通過set 命令查看配置參數(shù)
QUOTE:rommon 2 > set PS1=rommon!> BOOT= BSI=0 RET_2_RTS= ?=0
4、在 rommon 狀態(tài)下輸入:(注意大小寫)
QUOTE:rommon 3 >IP_ADDRESS=10.32.10.1(路由器的ip地址)
rommon 4 >IP_SUBNET_MASK=255.255.255.0(路由器的掩碼)
rommon 5 >DEFAULT_GATEWAY=10.32.10.32(缺省網(wǎng)關(guān),是pc機(jī)的ip地址)rommon 6 >TFTP_SERVER=10.32.10.32(是pc機(jī)的ip地址)
rommon 7 >TFTP_FILE=C2600-I-MZ.122-11.BIN(上傳ios文件的名稱)
rommon 8>sync(保存參數(shù)配置)
rommon 9 >set(查看)
PS1=rommon!> BOOT= IP_ADDRESS=10.32.10.1 IP_SUBNET_MASK=255.255.255.0 DEFAULT_GATEWAY=10.32.10.32 TFTP_SERVER=10.32.10.32 TFTP_FILE=C2600-I-MZ.122-11.BIN BSI=0 RET_2_RTS= ?=0 rommon 10 >tftpdnld執(zhí)行tftpdnld命令進(jìn)行ios升級(jí),有時(shí)可能會(huì)報(bào)錯(cuò)或命令不執(zhí)行,這時(shí)只要用sync命令保存配置后,重新啟動(dòng)路由器(最好關(guān)掉電源再開機(jī))后,再執(zhí)行tftpdnld命令就可以了。
QUOTE:rommon 10 >tftpdnld(傳送文件)出現(xiàn)提示選擇y IP_ADDRESS: 10.32.10.1 IP_SUBNET_MASK: 255.255.255.0 DEFAULT_GATEWAY: 10.32.10.32 TFTP_SERVER: 10.32.10.32 TFTP_FILE: C2600-I-MZ.122-11.BIN Invoke this command for disaster recovery only.WARNING: all existing data in all partitions on flash will be lost!Do you wish to continue? y/n: [n]:
y
?。。。。。。。。。。。。。?!Receiving C2600-I-MZ.122-11.BIN from 10.32.10.32!
!!?。。。。。。。。。。。。。。。。?!
…
?。。。。。。。。。。。。。。。。。。。。?/p>
File reception completed.Copying file C2600-I-MZ.122-11.BIN to flash.Erasing flash at 0x607c0000 program flash location 0x605b0000 rommon 11> 在rommon 11>提示符下鍵入reset,或重新啟動(dòng)路由器(power-cycle),進(jìn)入正常引導(dǎo)狀態(tài),即:
rommon 11 >reset 筆者在Cisco2500、2600、7200等系列路由器上均實(shí)際操作過,以上為在Cisco2610路由器上實(shí)際操作捕獲或截屏,所配地址只是特例,大家可根據(jù)實(shí)際需要予以修改。最后建議:大家在作正常路由器系統(tǒng)升級(jí)時(shí),為防止不正確操作等引起的升級(jí)失敗,請(qǐng)先把路由器原有的系統(tǒng)備份下來。
第二篇:路由器IOS升級(jí)方法總結(jié)
IOS升級(jí)方法一
在對(duì)能夠正常啟動(dòng)的CISCO路由器的IOS進(jìn)行升級(jí)時(shí),比較簡單。具體步驟如下:
1、尋找一種TFTP服務(wù)器軟件(有CISCO公司的TFTPServer或3COM公司的3Cserver等,在升級(jí)較大IOS映象文件時(shí),建議用3Cserver),安裝在一臺(tái)計(jì)算機(jī)上,將要升級(jí)的IOS映象文件拷貝到相關(guān)的目錄中(例:D:),并運(yùn)行TFTP服務(wù)器軟件,通過菜單設(shè)置Root目錄為拷貝IOS映象文件所在目錄(如D:)。假設(shè)該計(jì)算機(jī)的IP地址為10.32.10.1;
2、連接路由器的console口與PC機(jī)的COM1,使用PC的超級(jí)終端軟件訪問路由器,將路由器的地址設(shè)為10.32.10.32(與計(jì)算機(jī)的IP地址同網(wǎng)段即可)。建議在進(jìn)行IOS升級(jí)前將原有IOS文件備份下來,防止待升級(jí)的IOS文件存在問題不可用;
QUOTE: Router# dir flash:(查看目前IOS映象文件名,也可用Router#Show version)
Directory of flash:/
1-rw-5998292 C2600-I-MZ.122-11.BIN
8388608 bytes total(2390252 bytes free)
Router#copy flash tftp(備份IOS文件)
Source filename []?c2600-i-mz.122-11.bin
Address or name of remote host []? 10.32.10.1(TFTP服務(wù)器地址)Destination filename [c2600-i-mz.122-11.bin]?
?。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。?!?
?。。。。。。。。。。。。。。。。。。。。。。。。。?
5998292 bytes copied in 324.071 secs(18509 bytes/sec)
Router#
3、對(duì)路由器進(jìn)行IOS升級(jí);
QUOTE: Router#copy tftp flash
Address or name of remote host []? 10.32.10.1(TFTP服務(wù)器地址)
Source filename []? c2600-i-mz.122-11.bin(需升級(jí)的新IOS映象文件名)
Destination filename [c2600-i-mz.122-11.bin]?
Do you want to over write? [confirm]
Accessing tftp://10.32.10.1/c2600-i-mz.122-11.bin...Erase flash: before copying? [confirm]
Erasing the flash filesystem will remove all files!Continue? [confirm]
Erasing device...eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...erasedee
Erase of flash: complete
Loading c2600-i-mz.122-11.bin from 10.32.10.1(via Ethernet0/0):?。。。。。。?/p>
?。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。?!?
?。。。。。。。。。。。。。。。。。。?/p>
[OKRestricted
Rights clause at FAR sec.52.227-19 and subparagraph
(c)(1)(ii)of the Rights in Technical Data and Computer
Software clause at DFARS sec.252.227-7013.cisco Systems, Inc.170 West Tasman Drive
San Jose, California 95134-1706
Cisco Internetwork Operating System Software
IOS(tm)C2600 Software(C2600-I-M), Version 12.2(11)T9, RELEASE SOFTWARE(fc1)
TAC Support: http://www.tmdps.cn/tac
Copyright(c)1986-2003 by cisco Systems, Inc.Compiled Mon 23-Jun-03 15:42 by cmong
Image text-base: 0x8000809C, data-base: 0x80A68B48
cisco 2610(MPC860)processor(revision 0x203)with 22528K/2048K bytes of memory
Processor board ID JAD03483395(1128032249)
M860 processor: part number 0, mask 49
Bridging software.X.25 software, Version 3.0.0.1 Ethernet/IEEE 802.3 interface(s)
Serial(sync/async)network interface(s)
32K bytes of non-volatile configuration memory.8192K bytes of processor board System flash(Read/Write)
Press RETURN to get started!
*Mar 1 00:00:05.652: %PA-2-UNDEFPA: Undefined Port Adaptor type 100 in bay 1
*Mar 1 00:00:07.996: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Mar 1 00:00:07.996: %LINK-3-UPDOWN: Interface Serial0/0, changed state to down
*Mar 1 00:00:07.996: %LINK-3-UPDOWN: Interface Serial0/1, changed state to down
*Mar 1 00:00:09.142: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up
*Mar 1 00:00:09.142: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
*Mar 1 00:00:09.142: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to down
*Mar 1 00:00:09.458: %SYS-5-CONFIG_I: Configured from memory by console
*Mar 1 00:00:11.245: %LINK-5-CHANGED: Interface Serial0/1, changed state to administratively down
*Mar 1 00:00:12.275: %SYS-5-RESTART: System restarted--Cisco Internetwork Operating System Software
IOS(tm)C2600 Software(C2600-I-M), Version 12.2(11)T9, RELEASE SOFTWARE(fc1)
TAC Support: http://www.tmdps.cn/tac
Copyright(c)1986-2003 by cisco Systems, Inc.Compiled Mon 23-Jun-03 15:42 by cmong
*Mar 1 00:00:12.279: %SNMP-5-COLDSTART: SNMP agent on host NE16 is undergoing a cold start
Router> 采用這種方法時(shí),由于使用console口來傳送,速率為9600bps,需要時(shí)間較長。因此可修改console口速率利用xmodem命令實(shí)現(xiàn)快速升級(jí)IOS。具體方法如下:
QUOTE: rommon 1 > confreg 回車
Configuration Summary
enabled are:
load rom after netboot fails
console baud: 9600
boot: image specified by the boot system commands
or default to: cisco2-C2600
do you wish to change the configuration? y/n [n]: y(選擇 yes)
enable “diagnostic mode”? y/n [n]: n(選擇 no)
enable “use net in IP bcast address”? y/n [n]: n(選擇 no)
disable “l(fā)oad rom after netboot fails”? y/n [n]: n(選擇 no)
enable “use all zero broadcast”? y/n [n]: n(選擇 no)
enable “break/abort has effect”? y/n [n]: n(選擇 no)
enable “ignore system config info”? y/n [n]: n(選擇 no)
change console baud rate? y/n [n]: y(選擇 yes)
enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400
= 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7(選擇 7,用最大的11520
速率的xmodem傳輸)
change the boot characteristics? y/n [n]: n(選擇 no)
Configuration Summary
enabled are:
load rom after netboot fails
console baud: 115200
boot: image specified by the boot system commands
or default to: cisco2-C2600
do you wish to change the configuration? y/n [n]: n(選擇 no)
You must reset or power cycle for new config to take effect
rommon 2 > reset 回車
注意:在按reset鍵前,需要修改串口速度(我的電腦---端口屬性----串口速度調(diào)為115200),然后再修改超級(jí)終端里設(shè)置速率為115200,記住,一定要這么做,否則會(huì)出現(xiàn)亂碼!然后關(guān)閉這個(gè)超級(jí)終端,重新建立一個(gè)超級(jí)終端連接,重新啟動(dòng)系統(tǒng)后,出現(xiàn) QUOTE: rommon 1> 提示符
然后,輸入
QUOTE: rommon 1> xmodem-r
Do not start the sending program yet...Invoke this application only for disaster recovery.Do you wish to continue? y/n [n]: y(選擇 yes)
Ready to receive file...此時(shí),在超級(jí)終端的菜單上的“傳送”---“發(fā)送文件”----選擇IOS映像文件所在地以及選擇使用“xmodem”協(xié)議,點(diǎn)擊“發(fā)送”即可。等待10-20分鐘左右就可升級(jí)完3-6M的IOS文件!待升級(jí)完成后,請(qǐng)記住修改回計(jì)算機(jī)串口與超級(jí)終端、路由器confreg下的xmodem等傳輸速率為9600bps。
方法如下:
QUOTE: Router>en 進(jìn)入新IOS的特權(quán)模式
Router#reload 重啟系統(tǒng)
Proceed with reload? [confirm] 回車
00:01:04: %SYS-5-RELOAD: Reload requested
System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE(fc1)
Copyright(c)1999 by cisco Systems, Inc.TAC:Home:SW:IOS:Specials for info
PC = 0xfff0a530, Vector = 0x500, SP = 0x680127b0
C2600 platform with 24576 Kbytes of main memory
PC = 0xfff0a530, Vector = 0x500, SP = 0x80004684
monitor: command “boot” aborted due to user interrupt 30秒內(nèi)按ctrl+break鍵
rommon 1 > confreg(輸入“confreg”命令)
Configuration Summary
enabled are:
load rom after netboot fails
console baud: 115200
boot: image specified by the boot system commands
or default to: cisco2-C2600
do you wish to change the configuration? y/n [n]: y(選擇 yes)
enable “diagnostic mode”? y/n [n]: n(選擇 no)
enable “use nn IP bcast address”? y/n [n]: n(選擇 no)
disable “l(fā)oad rom after netboot fails”? y/n [n]: n(選擇 no)
enable “use all zero broadcast”? y/n [n]: n(選擇 no)
enable “break/abort has effect”? y/n [n]: n(選擇 no)
enable “ignore system config info”? y/n [n]: n(選擇 no)
change console baud rate? y/n [n]: y(選擇 yes)
enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400
= 19200, 5 = 38400, 6 = 57600, 7 = 115200 [7]: 0(選擇 0,改回用標(biāo)準(zhǔn)速率速率9600的xmodem傳輸)
change the boot characteristics? y/n [n]: n(選擇 no)
Configuration Summary
enabled are:
load rom after netboot fails
console baud: 9600
boot: image specified by the boot system commands
or default to: cisco2-C2600
do you wish to change the configuration? y/n [n]: n You must reset or power cycle for new config to take effect
rommon 2 > 此時(shí)手工改回計(jì)算機(jī)串口與超級(jí)終端2者傳輸速率為9600
然后敲入
QUOTE: rommon 2 >reset 最好關(guān)掉電源后,重新啟動(dòng)。利用xmodem命令實(shí)現(xiàn)路由器IOS升級(jí)速度較慢,往往等上很長時(shí)間,為了快速升級(jí),可以采用下列方法。
二)通過tftpdnld命令升級(jí)IOS,具體步驟如下:
1、用Cisco原配的線纜連接路由器的console口與PC機(jī)的COM1,使用PC機(jī)的超級(jí)終端軟件訪問路由器;用一根雙絞線連接路由器的eth0/0口與PC機(jī)的網(wǎng)卡。
2、將路由器的eth0/0口IP地址設(shè)為10.32.10.32;PC機(jī)的IP地址設(shè)為10.32.10.1。將要升級(jí)的IOS映象文件拷貝到相關(guān)的目錄中,并運(yùn)行TFTP服務(wù)器軟件,通過菜單設(shè)置Root目錄為拷貝IOS映象文件所在目錄。
3、通過set 命令查看配置參數(shù)
QUOTE: rommon 2 > set
PS1=rommon!>
BOOT=
BSI=0
RET_2_RTS=
?=0
4、在 rommon 狀態(tài)下輸入:(注意大小寫)QUOTE: rommon 3 >IP_ADDRESS=10.32.10.1(路由器的ip地址)
rommon 4 >IP_SUBNET_MASK=255.255.255.0(路由器的掩碼)
rommon 5 >DEFAULT_GATEWAY=10.32.10.32(缺省網(wǎng)關(guān),是pc機(jī)的ip地址)
rommon 6 >TFTP_SERVER=10.32.10.32(是pc機(jī)的ip地址)
rommon 7 >TFTP_FILE=C2600-I-MZ.122-11.BIN(上傳ios文件的名稱)
rommon 8>sync(保存參數(shù)配置)
rommon 9 >set(查看)
rommon 10 > set
PS1=rommon!>
BOOT=
IP_ADDRESS=10.32.10.1
IP_SUBNET_MASK=255.255.255.0
DEFAULT_GATEWAY=10.32.10.32
TFTP_SERVER=10.32.10.32
TFTP_FILE=C2600-I-MZ.122-11.BIN
BSI=0
RET_2_RTS=
?=0
rommon 11 >tftpdnld 執(zhí)行tftpdnld命令進(jìn)行ios升級(jí),有時(shí)可能會(huì)報(bào)錯(cuò)或命令不執(zhí)行,這時(shí)只要用sync命令保存配置后,重新啟動(dòng)路由器(最好關(guān)掉電源再開機(jī))后,再執(zhí)行tftpdnld命令就可以了。QUOTE: rommon 11 >tftpdnld(傳送文件)出現(xiàn)提示選擇y
IP_ADDRESS: 10.32.10.1
IP_SUBNET_MASK: 255.255.255.0
DEFAULT_GATEWAY: 10.32.10.32
TFTP_SERVER: 10.32.10.32
TFTP_FILE: C2600-I-MZ.122-11.BIN
Invoke this command for disaster recovery only.WARNING: all existing data in all partitions on flash will be lost!
Do you wish to continue? y/n: [n]: y
Receiving C2600-I-MZ.122-11.BIN from 10.32.10.32?。。。。。。。。。。。。。。?
?。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。?!!
?
?。。。。。。。。。。。。。。。。。。。?!
File reception completed.Copying file C2600-I-MZ.122-11.BIN to flash.Erasing flash at 0x607c0000
program flash location 0x605b0000
rommon 13 >
在rommon 13 >提示符下鍵入reset,或重新啟動(dòng)路由器(power-cycle),進(jìn)入正常引導(dǎo)狀態(tài),即:
Router> 筆者在Cisco2500、2600、7200等系列路由器上均實(shí)際操作過,以上為在Cisco2610路由器上實(shí)際操作捕獲或截屏,所配地址只是特例,大家可根據(jù)實(shí)際需要予以修改。最后建議:大家在作正常路由器系統(tǒng)升級(jí)時(shí),為防止不正確操作等引起的升級(jí)失敗,請(qǐng)先把路由器原有的系統(tǒng)備份下來。
第三篇:路由器IOS升級(jí)方法總結(jié)
路由器IOS升級(jí)方法總結(jié)
本人長期從事計(jì)算機(jī)網(wǎng)絡(luò)管理工作,在對(duì)CISCO路由器的長期日常維護(hù)和管理實(shí)踐中積累了一定的經(jīng)驗(yàn)?,F(xiàn)總結(jié)歸納出CISCO路由器IOS映像升級(jí)的幾種方法,供廣大網(wǎng)絡(luò)愛好者或同仁參考。在介紹CISCO路由器IOS升級(jí)方法前,有必要對(duì)Cisco路由器的存儲(chǔ)器的相關(guān)知識(shí)作以簡單介紹。路由器與計(jì)算機(jī)相似,它也有內(nèi)存和操作系統(tǒng)。在Cisco路 由器中,其操作系統(tǒng)叫做互連網(wǎng)操作系統(tǒng)(Internetwork Operating System),常簡稱為IOS。路由器的存儲(chǔ)器主要有: ROM:只讀存儲(chǔ)器包含路由器正在使用的IOS的一份副本;
RAM:IOS將隨機(jī)訪問存儲(chǔ)器分成共享和主存。主要用來存儲(chǔ)運(yùn)行中的路由器配置和與路由協(xié)議有關(guān)的IOS數(shù)據(jù)結(jié)構(gòu);
FLASH(閃存):用來存儲(chǔ)IOS軟件映像文件,閃存是可以擦除內(nèi)存,它能夠用IOS的新版本覆寫,IOS升級(jí)主要是閃存中的IOS映像文件進(jìn)行更換。NVRAM:非易失性隨機(jī)訪問存儲(chǔ)器,用來存儲(chǔ)系統(tǒng)的配置文件。
IOS升級(jí)方法一
在對(duì)能夠正常啟動(dòng)的CISCO路由器的IOS進(jìn)行升級(jí)時(shí),比較簡單。具體步驟如下:
1、尋找一種TFTP服務(wù)器軟件(有CISCO公司的TFTPServer或3COM公司的3Cserver等,在升級(jí)較大IOS映象文件時(shí),建議用3Cserver),安裝在一臺(tái)計(jì)算機(jī)上,將要升級(jí)的IOS映象文件拷貝到相關(guān)的目錄中(例:D:),并運(yùn)行TFTP服務(wù)器軟件,通過菜單設(shè)置Root目錄為拷貝IOS映象文件所在目錄(如D:)。假設(shè)該計(jì)算機(jī)的IP地址為10.32.10.1;
2、連接路由器的console口與PC機(jī)的COM1,使用PC的超級(jí)終端軟件訪問路由器,將路由器的地址設(shè)為10.32.10.32(與計(jì)算機(jī)的IP地址同網(wǎng)段即可)。建議在進(jìn)行IOS升級(jí)前將原有IOS文件備份下來,防止待升級(jí)的IOS文件存在問題不可用; QUOTE: Router# dir flash:(查看目前IOS映象文件名,也可用Router#Show version)
Directory of flash:/
1-rw-5998292 C2600-I-MZ.122-11.BIN
8388608 bytes total(2390252 bytes free)
Router#copy flash tftp(備份IOS文件)
Source filename []?c2600-i-mz.122-11.bin
Address or name of remote host []? 10.32.10.1(TFTP服務(wù)器地址)
Destination filename [c2600-i-mz.122-11.bin]?
?。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。?/p>
…
?。。。。。。。。。。。。。。。。。。。。。。。。?!!
5998292 bytes copied in 324.071 secs(18509 bytes/sec)
Router#
3、對(duì)路由器進(jìn)行IOS升級(jí); QUOTE: Router#copy tftp flash
Address or name of remote host []? 10.32.10.1(TFTP服務(wù)器地址)
Source filename []? c2600-i-mz.122-11.bin(需升級(jí)的新IOS映象文件名)
Destination filename [c2600-i-mz.122-11.bin]?
Do you want to over write? [confirm]
Accessing tftp://10.32.10.1/c2600-i-mz.122-11.bin...Erase flash: before copying? [confirm]
Erasing the flash filesystem will remove all files!Continue? [confirm]
Erasing device...eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...erasedee
Erase of flash: complete
Loading c2600-i-mz.122-11.bin from 10.32.10.1(via Ethernet0/0):?。。。。。?!
?。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。?!
…
!?。。。。。。。。。。。。。。。。?!
[OK-5998292 bytes]
Verifying checksum...OK(0xA0C0)
5998292 bytes copied in 318.282 secs(18846 bytes/sec)
Router# IOS升級(jí)方法二
由于升級(jí)失敗后或者路由器的config-register寄存器值為0x2101時(shí),開啟路由器時(shí)、或者在開啟(某些型號(hào))Cisco路由器的電源開關(guān)后30秒內(nèi)按下Ctrl+break鍵,中斷路由器的正常啟動(dòng),路由器都會(huì)進(jìn)入rom監(jiān)視模式,即Router(boot)>,在這種情形下,對(duì)路由器的IOS進(jìn)行升級(jí),也比較簡單。首先進(jìn)入特權(quán)模式下,即
QUOTE: Router(boot)>en
Router(boot)# 其他升級(jí)步驟同方法一,即:執(zhí)行copy tftp flash命令,對(duì)IOS進(jìn)行升級(jí)。升級(jí)完成后,不要忘了修改config-register寄存器值為0x2102(恢復(fù)正常值)。QUOTE: Router(boot)# t
Router(boot)(config)# config-register 0x2102
Router(boot)(config)#exit
Router(boot)#wr
Router(boot)#reload
重啟即可。
第四篇:cisco 路由器 EZvpn 總結(jié)
實(shí)驗(yàn)拓?fù)鋱D:
PC2192.168.150.2/24分支機(jī)構(gòu)PC1192.168.100.0/24E0/3:.1R1192.168.100.2/24192.168.1.0/24E0/0:.1公司總部192.168.150.0/24192.168.2.0/24E0/3:.1E0/1:.2E0/0:.1E0/1:.2192.168.200.0/24E0/3:.1PC3R2R3192.168.200.2/24
實(shí)現(xiàn)目標(biāo)
分支機(jī)構(gòu)為不固定IP地址,分支機(jī)構(gòu)和公司總部實(shí)現(xiàn)VPN互聯(lián)。分支機(jī)構(gòu)能夠獲取公司總部的網(wǎng)絡(luò)資源。
基本配置:
EZvpn network-extension 模式 R1基本配置: R1# R1#show run
Building configuration...Current configuration : 1010 bytes!version 12.4 service timestamps debug datetimemsec service timestamps log datetimemsec no service password-encryption!hostname R1!boot-start-marker boot-end-marker!noaaa new-model memory-sizeiomem 5!ipcef noip domain lookup!ipauth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3!?。。。。。。。。。nterface Ethernet0/0 ip address 192.168.1.1 255.255.255.0 ipnat outside ip virtual-reassembly half-duplex!interface Ethernet0/1 noip address shutdown half-duplex!interface Ethernet0/2 noip address shutdown half-duplex!interface Ethernet0/3 ip address 192.168.100.1 255.255.255.0 ipnat inside ip virtual-reassembly half-duplex!ip http server noip http secure-server!ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 192.168.1.2!ipnat inside source list 1 interface Ethernet0/0 overload!access-list 1 permit any!!control-plane?。。。。ine con 0 exec-timeout 0 0 line aux 0 linevty 0 4 login!end
R1#
R2的基本配置: R2# R2#show run
Building configuration...Current configuration : 825 bytes!version 12.4 service timestamps debug datetimemsec service timestamps log datetimemsec no service password-encryption!hostname R2!boot-start-marker boot-end-marker!noaaa new-model memory-sizeiomem 5!ipcef noip domain lookup!ipauth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3?。。。。。。。。。。nterface Ethernet0/0 ip address 192.168.2.1 255.255.255.0 half-duplex!interface Ethernet0/1 ip address 192.168.1.2 255.255.255.0 half-duplex!interface Ethernet0/2 noip address shutdown half-duplex!interface Ethernet0/3 ip address 192.168.150.1 255.255.255.0 half-duplex!ip http server noip http secure-server!ip forward-protocol nd!!
!control-plane!?。。?!line con 0 exec-timeout 0 0 line aux 0 linevty 0 4 login!end R2#
R3的基本配置: R3# *Mar 1 00:13:56.891: %SYS-5-CONFIG_I: Configured from console by console R3# R3#show run Building configuration...Current configuration : 1010 bytes!version 12.4 service timestamps debug datetimemsec service timestamps log datetimemsec no service password-encryption!hostname R3!boot-start-marker boot-end-marker!noaaa new-model memory-sizeiomem 5!ipcef noip domain lookup!ipauth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3!?。。。。。。。。?!interface Ethernet0/0 noip address shutdown half-duplex!interface Ethernet0/1 ip address 192.168.2.2 255.255.255.0 ipnat outside ip virtual-reassembly half-duplex!interface Ethernet0/2 noip address shutdown half-duplex!interface Ethernet0/3 ip address 192.168.200.1 255.255.255.0 ipnat inside ip virtual-reassembly half-duplex!ip http server noip http secure-server!ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 192.168.2.1!ipnat inside source list 1 interface Ethernet0/1 overload!access-list 1 permit any!!control-plane?。。。?!line con 0 exec-timeout 0 0 line aux 0 linevty 0 4 login!end
聯(lián)通性測(cè)試: 在R1上測(cè)試:
在R3上測(cè)試:
在PC1上測(cè)試
在PC2上測(cè)試
在PC3上測(cè)試
設(shè)定公司總部R3為Ezvpn Server,則R3上配置如下 R3# R3#show run
Building configuration...Current configuration : 1505 bytes!version 12.4 service timestamps debug datetimemsec service timestamps log datetimemsec no service password-encryption!hostname R3!boot-start-marker boot-end-marker!aaa new-model!aaa authorization network ezvpnauthor local!aaa session-id common memory-sizeiomem 5!ipcef noip domain lookup!ipauth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3!!!!?。。。?!
!cryptoisakmp policy 1 authentication pre-share group 2!cryptoisakmp client configuration group group1 key cisco!cryptoipsec transform-set mysetesp-des esp-md5-hmac!crypto dynamic-map dymap 1 set transform-set myset reverse-route!crypto map vpnmapisakmp authorization list ezvpnauthor crypto map vpnmap client configuration address respond crypto map vpnmap 1 ipsec-isakmp dynamic dymap??!
interface Ethernet0/0 noip address shutdown half-duplex!interface Ethernet0/1 ip address 192.168.2.2 255.255.255.0 ipnat outside ip virtual-reassembly half-duplex crypto map vpnmap!interface Ethernet0/2 noip address shutdown half-duplex!interface Ethernet0/3 ip address 192.168.200.1 255.255.255.0 ipnat inside ip virtual-reassembly half-duplex!
ip http server noip http secure-server!ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 192.168.2.1!ipnat inside source list 1 interface Ethernet0/1 overload!access-list 1 permit any!!control-plane?。。。?!
line con 0 exec-timeout 0 0 line aux 0 linevty 0 4!End
公司分部R1為remote角色,在Ezvpn Remote 上面配置 R1# R1#sho run
Building configuration...Current configuration : 1244 bytes!version 12.4 service timestamps debug datetimemsec service timestamps log datetimemsec no service password-encryption!hostname R1!boot-start-marker boot-end-marker!noaaa new-model memory-sizeiomem 5!ipcef noip domain lookup!ipauth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3!?。。。。。。。。?!!
cryptoipsec client ezvpn client1 connect auto group group1 key cisco mode network-extension peer 192.168.2.2 xauthuserid mode interactive!!!interface Ethernet0/0 ip address 192.168.1.1 255.255.255.0 ipnat outside ip virtual-reassembly half-duplex cryptoipsec client ezvpn client1!interface Ethernet0/1 noip address shutdown half-duplex!
interface Ethernet0/2 noip address shutdown half-duplex!interface Ethernet0/3 ip address 192.168.100.1 255.255.255.0 ipnat inside ip virtual-reassembly half-duplex cryptoipsec client ezvpn client1 inside!ip http server noip http secure-server!ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 192.168.1.2!ipnat inside source list 1 interface Ethernet0/0 overload!access-list 1 permit any!
!control-plane?。。。?!line con 0 exec-timeout 0 0 line aux 0 linevty 0 4 login!end
R1#
查看R1的vpn狀態(tài)
在PC1上測(cè)試
我們發(fā)現(xiàn),vpn隧道雖然建立起來了,但是,外網(wǎng)和總部內(nèi)網(wǎng)都ping不通了。這是由于PC1的數(shù)據(jù)都經(jīng)由隧道了,包括訪問公網(wǎng)的數(shù)據(jù)包,都被導(dǎo)入隧道中。我們將隧道進(jìn)行分離,讓訪問公網(wǎng)的數(shù)據(jù)能正常被NAT成R1的公網(wǎng)地址。
R3#
show run Building configuration...Current configuration : 1568 bytes!version 12.4 service timestamps debug datetimemsec service timestamps log datetimemsec no service password-encryption!hostname R3!boot-start-marker boot-end-marker!aaa new-model!aaa authorization network ezvpnauthor local!aaa session-id common memory-sizeiomem 5!ipcef noip domain lookup!ipauth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3?。。。。。。。?!
!cryptoisakmp policy 1 authentication pre-share group 2!cryptoisakmp client configuration group group1 key cisco acl 100!cryptoipsec transform-set mysetesp-des esp-md5-hmac!crypto dynamic-map dymap 1 set transform-set myset reverse-route!crypto map vpnmapisakmp authorization list ezvpnauthor crypto map vpnmap client configuration address respond crypto map vpnmap 1 ipsec-isakmp dynamic dymap!!
!interface Ethernet0/0 noip address shutdown half-duplex!interface Ethernet0/1 ip address 192.168.2.2 255.255.255.0 ipnat outside ip virtual-reassembly half-duplex crypto map vpnmap!interface Ethernet0/2 noip address shutdown half-duplex!interface Ethernet0/3 ip address 192.168.200.1 255.255.255.0 ipnat inside ip virtual-reassembly half-duplex!ip http server noip http secure-server!ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 192.168.2.1!ipnat inside source list 1 interface Ethernet0/1 overload!access-list 1 permit any access-list 100 permit ip 192.168.200.0 0.0.0.255 any!!control-plane?。。?!
!line con 0 exec-timeout 0 0 line aux 0 linevty 0 4!end
R3#
在R1上重建VPN
在R1上查看Vpn狀態(tài),我們發(fā)現(xiàn),隧道被成功分離,只有去往192.168.200.0/24的數(shù)據(jù)才會(huì)經(jīng)由隧道。
這個(gè)時(shí)候,我們?cè)赑C1上進(jìn)行測(cè)試
發(fā)現(xiàn),可以正常訪問公網(wǎng),但是還不能訪問vpn對(duì)端內(nèi)網(wǎng),怎么回事呢?我們查看R3的NAT表。
在R3上面查看NAT表
發(fā)現(xiàn),R3內(nèi)網(wǎng)192.168.200.2機(jī)器icmp reply 全部被NAT成R3的公網(wǎng)接口192.168.2.2地址了。
在R3上修正NAT問題 R3# R3#show run Building configuration...Current configuration : 1678 bytes!version 12.4 service timestamps debug datetimemsec service timestamps log datetimemsec no service password-encryption!hostname R3!boot-start-marker boot-end-marker!aaa new-model!aaa authorization network ezvpnauthor local!aaa session-id common memory-sizeiomem 5!ipcef noip domain lookup!ipauth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3?。。。。。。。。?/p>
!cryptoisakmp policy 1 authentication pre-share group 2!cryptoisakmp client configuration group group1 key cisco acl 100!cryptoipsec transform-set mysetesp-des esp-md5-hmac!crypto dynamic-map dymap 1 set transform-set myset reverse-route!crypto map vpnmapisakmp authorization list ezvpnauthor crypto map vpnmap client configuration address respond crypto map vpnmap 1 ipsec-isakmp dynamic dymap!!
!interface Ethernet0/0 noip address shutdown half-duplex!interface Ethernet0/1 ip address 192.168.2.2 255.255.255.0 ipnat outside ip virtual-reassembly half-duplex crypto map vpnmap!interface Ethernet0/2 noip address shutdown half-duplex!interface Ethernet0/3 ip address 192.168.200.1 255.255.255.0 ipnat inside ip virtual-reassembly half-duplex!ip http server noip http secure-server!ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 192.168.2.1!ipnat inside source list 111 interface Ethernet0/1 overload!access-list 1 permit any access-list 100 permit ip 192.168.200.0 0.0.0.255 any access-list 111 deny
ip 192.168.200.0 0.0.0.255 192.168.100.0 0.0.0.255 access-list 111 permit ip any any!!control-plane?。?!
!!line con 0 exec-timeout 0 0 line aux 0 linevty 0 4!end
R3#
我們通過ACL,先限制源地址192.168.200.0去往192.168.100.0地址進(jìn)行NAT轉(zhuǎn)換,然后允許其它流量轉(zhuǎn)換。在PC1上重新測(cè)試
在PC3上進(jìn)行測(cè)試
OK,VPN實(shí)現(xiàn)成功,總部和分支機(jī)構(gòu)內(nèi)部訪問外網(wǎng)和對(duì)端網(wǎng)絡(luò)都正常。
Ezvpn Client模式 R3上配置 R3# R3#show run
Building configuration...Current configuration : 1811 bytes!version 12.4 service timestamps debug datetimemsec service timestamps log datetimemsec no service password-encryption!hostname R3!boot-start-marker boot-end-marker!aaa new-model!aaa authorization network ezvpnauthor local!aaa session-id common memory-sizeiomem 5!ipcef noip domain lookup!ipauth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3?。。。。。。。。?/p>
!cryptoisakmp policy 1 authentication pre-share group 2!cryptoisakmp client configuration group group1 key cisco poolezvpnpool acl 100!cryptoipsec transform-set set1 esp-des esp-md5-hmac!crypto dynamic-map dymap 1 set transform-set set1 reverse-route!crypto map vpnmapisakmp authorization list ezvpnauthor crypto map vpnmap client configuration address respond crypto map vpnmap 1 ipsec-isakmp dynamic dymap!
!interface Ethernet0/0 noip address shutdown half-duplex!interface Ethernet0/1 ip address 192.168.2.2 255.255.255.0 ipnat outside ip virtual-reassembly half-duplex crypto map vpnmap!interface Ethernet0/2 noip address shutdown half-duplex!interface Ethernet0/3 ip address 192.168.200.1 255.255.255.0 ipnat inside ip virtual-reassembly half-duplex!ip local pool ezvpnpool 10.10.10.1 10.10.10.100 ip http server noip http secure-server!ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 192.168.2.1!ipnat inside source list 111 interface Ethernet0/1 overload!access-list 1 permit any access-list 100 permit ip 192.168.200.0 0.0.0.255 any access-list 111 deny
ip 192.168.200.0 0.0.0.255 10.10.10.0 0.0.0.255 access-list 111 deny
ip 192.168.200.0 0.0.0.255 192.168.100.0 0.0.0.255 access-list 111 permit ip any any!!control-plane!!
!??!!line con 0 exec-timeout 0 0 line aux 0 linevty 0 4!end
R3#
R1上的配置 R1#show run
Building configuration...Current configuration : 1396 bytes!version 12.4 service timestamps debug datetimemsec service timestamps log datetimemsec no service password-encryption!hostname R1!boot-start-marker boot-end-marker!noaaa new-model memory-sizeiomem 5!ipcef noip domain lookup!ipauth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3!?。。。。。。。。。?
cryptoipsec client ezvpn client1 connect auto group group1 key cisco mode client peer 192.168.2.2 xauthuserid mode interactive cryptoipsec client ezvpn client connect auto mode network-extension xauthuserid mode interactive??!!interface Loopback0 ip address 10.10.10.1 255.255.255.255!interface Ethernet0/0 ip address 192.168.1.1 255.255.255.0 ipnat outside ip virtual-reassembly half-duplex cryptoipsec client ezvpn client1!interface Ethernet0/1 noip address shutdown half-duplex!interface Ethernet0/2 noip address shutdown half-duplex!interface Ethernet0/3 ip address 192.168.100.1 255.255.255.0 ipnat inside ip virtual-reassembly half-duplex cryptoipsec client ezvpn client1 inside!ip http server noip http secure-server!ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 192.168.1.2!ipnat inside source list 1 interface Ethernet0/0 overload!access-list 1 permit any!!control-plane?。。。。ine con 0 exec-timeout 0 0 line aux 0 linevty 0 4 login!end
R1#
在R1上查看vpn狀態(tài)
我們看到,當(dāng)R1為client模式的時(shí)候,它將獲取地址池中的一個(gè)地址,為10.10.10.7,所有vpn流量,都會(huì)用這個(gè)地址進(jìn)行nat轉(zhuǎn)換。我們看R1上的show ipnat translation
在R1上測(cè)試網(wǎng)絡(luò)連通性
在R3上測(cè)試聯(lián)通性
由于R1內(nèi)部機(jī)器地址都會(huì)被NAT成10.10.10.7,所以,對(duì)于R3內(nèi)部用戶來說是不可訪問的。
配置xauth認(rèn)證 R3的配置 R3# R3#show run
Building configuration...Current configuration : 1941 bytes!version 12.4 service timestamps debug datetimemsec service timestamps log datetimemsec no service password-encryption!hostname R3!boot-start-marker boot-end-marker!aaa new-model!aaa authentication login ezvpnlogin local aaa authorization network ezvpnauthor local!aaa session-id common memory-sizeiomem 5!
ipcef noip domain lookup!ipauth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3?。。。。。?!!username cisco password 0 cisco!
!!cryptoisakmp policy 1 authentication pre-share group 2!cryptoisakmp client configuration group group1 key cisco poolezvpnpool acl 100!cryptoipsec transform-set set1 esp-des esp-md5-hmac!crypto dynamic-map dymap 1 set transform-set set1 reverse-route!crypto map vpnmap client authentication list ezvpnlogin crypto map vpnmapisakmp authorization list ezvpnauthor crypto map vpnmap client configuration address respond crypto map vpnmap 1 ipsec-isakmp dynamic dymap??!interface Ethernet0/0 noip address shutdown half-duplex!interface Ethernet0/1 ip address 192.168.2.2 255.255.255.0 ipnat outside ip virtual-reassembly half-duplex crypto map vpnmap!interface Ethernet0/2 noip address shutdown half-duplex!interface Ethernet0/3 ip address 192.168.200.1 255.255.255.0 ipnat inside ip virtual-reassembly half-duplex!ip local pool ezvpnpool 10.10.10.1 10.10.10.100 ip http server noip http secure-server!ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 192.168.2.1!ipnat inside source list 111 interface Ethernet0/1 overload!access-list 1 permit any access-list 100 permit ip 192.168.200.0 0.0.0.255 any access-list 111 deny
ip 192.168.200.0 0.0.0.255 10.10.10.0 0.0.0.255 access-list 111 deny
ip 192.168.200.0 0.0.0.255 192.168.100.0 0.0.0.255 access-list 111 permit ip any any!!control-plane?。。。。ine con 0 exec-timeout 0 0 line aux 0 linevty 0 4!end
R3#
R1上的過程
提示輸入crypto ipsec client ezvpnxauth,并輸入用戶名和密碼,VPN則認(rèn)證成功。另外,cisco VPN Clint 支持Ezvpn client模式。
新建連接信息如下圖所示:
第五篇:路由器及IOS簡介
路由器及IOS簡介
1.路由器簡介
(1)CPU:中央處理單元,和計(jì)算機(jī)一樣,它是路由器的控制和運(yùn)算部件。
(2)RAM/DRAM:內(nèi)存,用于存儲(chǔ)臨時(shí)的運(yùn)算結(jié)果,例如,路由表、arp表、快速交換緩存、緩沖數(shù)據(jù)包、數(shù)據(jù)隊(duì)列,以及當(dāng)前配置。眾所周知,RAM中的數(shù)據(jù)在路由器斷電后是丟失的。
(3)FLASH:可擦除、可編程的ROM,用于存放路由器的IOS,F(xiàn)LASH的課擦除特性允許我們更新、升級(jí)IOS。而不是更換路由器內(nèi)部的芯片。路由器斷電后,F(xiàn)LASH的內(nèi)容不會(huì)丟失。當(dāng)FLASH容量較大時(shí),可以存放多個(gè)IOS版本。
(4)NVRAM:非易失性RAM,用于存放路由器的配置文件,路由器斷電后,NVRAM中的內(nèi)容仍然保持。
(5)ROM:只讀存儲(chǔ)器,存儲(chǔ)了路由器的開機(jī)診斷程序、引導(dǎo)程序和特殊版本的IOS軟件(用于診斷等有限用途),當(dāng)ROM中軟件升級(jí)時(shí)需要更換芯片。
2.IOS簡介
路由器也有自己的操作系統(tǒng),通常稱為IOS(internetwork operating system)。和計(jì)算機(jī)上的Windows一樣,IOS是路由器的靈魂,所有配置是通過IOS完成的。
圖1“show”命令現(xiàn)實(shí)路由器的各種信息
圖2配置文件的流動(dòng)
ROM
FLASHTFTPROM
CONSOLE
圖3路由器啟動(dòng)過程示意圖