分享

CISCO 2500、1600系列路由器使用手册--配置Autoinstall 功能 - ...

 昵称90415 2009-02-12

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 tcp–small-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.)

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多