GB | BIG5
|
| 首頁 > 網絡管理 > 網絡設備 > 正文 |
 |
| CISCO 2500、1600系列路由器使用手冊--配置Autoinstall 功能 |
| 不詳 (2001-05-02 01:17:46) |
1.7. 配置Autoinstall 功能
cisco 2500,1600系列路由器在沒有任何配置之前,可以自動啟動autoinstall自動配置功能即路由器會自動地到tftp服務器中尋找配置文件,並下載運行。配置文件需要事先編輯好,並存放在tftp服務器的根目錄下:
要啟動自動配置功能,必須滿足以下條件:
路由器的物理線路必須事先接通。Cisco路由器可以通過以下幾個端口找到tftp服務器。
以太端口
令牌環端口
FDDI端口
用cisco HDLC或幀中繼封裝的同步串口
Cisco 2500,1600系列路由器的高速同步串口在缺省狀態下
封裝的協議為Cisco HDLC
注意:如果在HDLC封裝的端口無法實現自動配置功能,則路由器會自動在該端口上封裝幀中繼。
新路由器的完整或最小的配置,必須存放在tftp服務器的根目錄下,且tftp服務器必須正在運行。
如果通過已配置好且正在與新路由器通過HDLC封裝的端口相連的路由器幫助實現自動配置功能,則已配置好的路由器的該端口的IP地址的最一個字節必須為1或2。(幀中繼無此限制)
如果通過已配置好的路由器的幀中繼封裝的端口幫助新路由器實現自動配置功能,已配置的路由器必須進行如下配置:
定義IP helper地址指向tftp服務器
IP helper address tftp服務器的IP地址
映射新路由器的IP地址
frame-relay map ip新路由器的與該端口的IP地址,本地幀中繼地址
如果通過已配置好的路由器的以太端口,令牌環端口,FDDI端口幫助新路由器實現自動配置功能,則這些端口所連接的網段上必須有BOOTP或RARP服務器.且必須將新路由器的MAC地址與IP地址進行映射。
有時可能需設置 IP helper地址幫助傳輸tftp及DNS廣播。以下介紹通過HDLC封裝的端口實現自動配置。
自動配置工作過程,如圖:
首先,新路由器需要得到與已存在的路由器相連的通過HDLC封裝的端口的IP地址。這裡即是Router A的Serial 1端口。新路由器通過SLARP廣播尋找。如果已配置好的路由器的與其相連的端口,這裡即是Router B的Serial 0端口的IP地址的最一個字節為1,則Router A的Serial1的IP地址的最一個字節為2,如果Router B的Serial 0的地址的最一個字節為2,則Router A的Serial 1 IP地址的最一個字節為1。
之,新路由器需要知道自己的名字。如果在tftp服務器上,它會尋找一個名字為network-config或Cisconet.cfg的文件。在這個文件中,必須有Router A serial 1 端口的IP地址與新路由器名字的映射,這裡
Router A的名字為Kim。
在新的路由器找到自己的名字之,它會在tftp服務器的根目錄下尋找自己的配置文件。配置文件的名字為:
新路由器的名字-confg
這裡Router A的配置文件名為Kim-confg
新的路由器下載配置文件,並裝DRAM中運行。
實例:
已配置好的路由器Router B的配置
kim#sho run
Building configuration…
Current configuration:
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname kim1
!
boot system flash
boot system rom
!
interface Ethernet0
ip address 10.1.1.1 255.255.255.0
no ip mroute-cache
no ip route-cache
!
internet Serial0
ip address 192.192.192.1 255.255.255.0
iup helper-address 10.1.1.33
!廣播地址指向tftp服務器
no ip mroute-cache
no ip route-cache
!本實例用V.35 線纜直連模擬DDN專線,HDLC的配置請參照HDLC 配置章節
bandwidth 2000
! 帶寬為2M
clockrate 2000000
!同步時鐘
interface Serial1
no ip address
no ip mroute-cache
no ip route-cache
shutdown
!
no ip classless
!
line con 0
line 1 8
transport input all
line aux 0
transport input all
line vty 0 4
login
!
end
network-confg文件的內容:
ip host kim 192.192.192.2
!新路由器RouterA的高速同步串口1的地址與名字映射
ip host try 10.1.2.1
ip host try1 10.1.3.1
kim-confg文件的內容
int e0
ip add 193.1.3.1 255.255.255.0
int e1
ip add 192.1.2.1 255.255.255.0
ip route 0.0.0.0 0.0.0.0 192.192.192.1
RouterA的自動啟動過程及啟動的執行配置
%SYS-5-RELOAD:Reload requested
System bootstrap,Version 11.2(10c),SOFTWARE
Copy right © 1986-1996 by cisco Systems
2500 processor with 2048Kbytes of main memory
Notioce:NVRAM invalid, possibly due to write erase.
F3:5173084+61848+255460 at 0x3000060
Restricted Rights Legend
Use,duplication,or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the commercial Computer Software Restricted Rights clause at FAR sec.52.227-19 and subparagraph (c)(1)(ii) of the Rights in Technial Data and Computer Software clause at DFARS sec.252.225-7013.
Cisco Systems,inc.
170 West Tasman Drive
San Jose,california 95134-1706
Cisco internetwork Operating System Software
IOS(tm) 2500 software (c2500-D-L), version 11.2(5),RELEASE SOFTWARE(fc1)
Copyright (c) 1986-1997 by cisco systems inc.
Compiled Mon 31-Mar-97 20:17 by ckralik
Image text-base:0x302a734 data-base:0x00001000
Cisco 2500 (68030) processor (revision L) with 2048K/2048K bytes of memory.
Processor board ID 06246045, with hardware revision 00000000
Bridging software.
X.25 software,version 2.0, NET2 BFE and GOSIP compliant.
2 Ethernet/IEEE 802.3 interface(s)
2 Serial network interface(s)
32K byte of non-volatile configuration memory.
8192K bytes of processor board system Flash (Read ONLY)
Notice: NVRAM invalid, possibly due to write erase.
SLARP: interface Serial resolved. This interface has been automatically resolved thru the SLARP process. The router will now attempt to retrieve its name and configuration file.
Loading network-config from 10.1.1.33 (via Serial1):!
!新路由器RouterA在tftp服務器中找到network-confg文件
[OK 74/32723 bytes]
configuration mapped ip address 192.192.192.2 to kim
! 新路由器RouterA的名字為kim,地址為192.192.192.2
Loading kim-confg from 10.1.1.33 (via serial1):!
[OK 122/32723 bytes]
! 新路由器RouterA從tftp服務器中成功下載自己的配置文件,名為kim-confg
SETUP:new interface Serial0 placed in “shutdown” state
Press RETURN to get started!
%LINK 5 SLARP: Serial1 address 192.192.192.2, resolved by 192.192.192.1
%LINK 3 UPDOWN interface Ethernet0, changed state to up
%LINK 3 UPDOWN interface Ethernet1, changed state to up
%LINK 3 UPDOWN interface serial0, changed state to down
%LINK 3 UPDOWN interface serial1, changed state to up
%LINEPROTO-5-UPDOWN:line protocol on interface ethernet0,changed state to down
%LINEPROTO-5-UPDOWN:line protocol on interface ethernet1,changed state to down
%LINEPROTO-5-UPDOWN:line protocol on interface serial0,changed state to down
%LINEPROTO-5-UPDOWN:line protocol on interface serial1,changed state to up
%PARSER-4-BADCFG: Unexpected end of configuration file.
%SYS-5-CONFIG: Configuration from network-confg by console tftp from 10.1.1.33
%SYS-5-CONFIG: Configuration from kim-confg by console tftp from 10.1.1.33
%SYS-5-RESTART: System restarted
cisco internet work Operating System Software
IOS (tm) 2500 software (C2500-D-L), Version 11.2(5), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1997 by cisco system, Inc.
Compiled Mon 31-Mar-97 20:17 by ckralik
%LINK 5 CHANGED: interface Serial0, changed state to administratively down
kim > en
!新路由器RouterA的配置
kim#sho run
Building configuration…
Current configuration:
!
version 11.2
no service udp-small-servers
no service tcpsmall-servers
!
hostname kim
!
!
ip host kim 192.192.192.2
ip host try 10.1.2.1
ip host try1 10.1.3.1
!
interface Ethernet0
ip address 192.1.3.1 255.255.255.0
!
interface Ethernet1
ip address 192.1.2.1 255.255.255.0
!
interface Serial0
no ip address
shutdown
!
interface Serial1
ip address 192.192.192.2 255.255.255.0
!
no ip classless
ip route 0.0.0.0 0.0.0.0 192.192.192.1
!
line con 0
line aux 0
line vty 0 4
login
!
如果線路沒有接好,或Autoinstall功能被錯誤地啟動,或錯誤啟動自動下載配置文件功能時,路由器會不停地尋找幾個文件。如下:
%SYS-5-RELOAD:Reload requested
System Bootstrap.Version 11.0(10c),SOFTWARE
Copyright(c) 1986-1995 by cisco systems
2500 process with 2048 Kbytes of main memory
%SYS-4-CONFIG_NEWER: Configurations from version 11.2 may not be correctly under stood。
F3:5173084+61848+255460 at 0x3000060
Restricted rights legend
Use,duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the Commercial Computer Software -Restricted 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 Internet work Operating System Software
IOS (TM) 2500 Software (c2500-D-L),version 11.2(5),RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1997 by cisco Systems.Inc.
Compiled Mon 31-Mar-97 20:17 by ckralik
Image test-base: 0x0302 A 734,data-base: 0x00001000
cisco 2509 (68030) processor (revision M)with 2048K/2048K bytes of memory.
Procesor board ID 06900170.with hardware revision 00000000
Bridging software.
X.25 software.Version 2.0,NET2, BFE and GOSIP compliant.
1 Ethernet/IEEE 802.3 interface(s)
2 Serial network interfaces
8 teminal line(s)
32K bytes of non-volatile configuration memory.
8192K bytes of processor board System flash (Read ONLY)
Loading network-confg[timed out]
Loading cisconet.cfg [timed out]
Loading kim-confg [timed out]
Loading kim.cfg [timed out]
這時應斷掉所有線路,在沒有封鎖BREAK情況下,重新啟動路由器並在WIN95或NT的超級終端下鍵入CTRL+BREAK鍵,進入RXBOOT模式,並修改寄存器值到0x42並重新初始化。(此上步驟與上面的處理口令丟失的步驟一樣)可以將原有配置全部刪掉。
在超級權限狀態下
write erase 回車
並將寄存器值改回到0x2102,並重新啟動或在全局設置模式下設置
no service config
cofing - register 0x2102 (疑應為config-register 0x2102,但原文如此)
之重新啟動。
命令行規則:
在任何模式下,只要鍵入的命令行的關鍵字從左至右所包含的字母能將該命令與其它同一模式下的命令完全區別開來。即可。
如:interface serial 0
完全可以寫成 int s 0
2.在任何模式下,打一個“?”即可以顯示所有在該模式下的所有命令。
3.如果不會正確拼寫某個命令,可以鍵盤入開始的幾個字母,在其緊跟一個問號,路由器即提示有什樣的命令與其匹配。
4.如不知道命令行面的參數應為什,可以在該命令的關鍵字空一個格,鍵盤入“?”,路由器即會提示你與“?”對應的位置的參數是什。
如:copy ? 或copy run ?
5.要去掉某條配置命令,在原配置命令前加一個no並空一個格,如要去掉前面提到的boot system flash,在相同模式下,可以鍵盤入no boot system flash。
(http://www.fanqiang.com)
進入【UNIX論壇】
|
|
| 相關文章 |
cisco的異步回撥命令集 (2001-10-18 08:00:00) Cisco PIX防火牆的安裝流程 (2001-10-18 07:00:00) Cisco IOS 基本命令集 (2001-10-17 15:00:02) Cisco HSRP的配置 (2001-10-17 12:00:01) 備份Cisco路由器用戶配置 (2001-08-17 15:00:01) Cisco路由器密碼忘了該怎辦? (2001-07-22 16:12:35) Linux 網管 123 --- 第8章. 備份及回存程序 -3.Cisco 路由器組態備份 (2001-07-02 20:10:00) CISCO2501,2522的詳細配置與調試 (2001-06-28 10:08:00) Cisco路由器上如何防止DDoS (2001-06-25 07:00:00) Cisco路由器配置實例 --反轉多路復用的妙用 (2001-06-08 17:04:00)
|
===更多相關=== |
|
|
 |
★ 樊強制作 歡迎分享 ★ |