A-A+
CISCO路由器启动自动配置的实验和方法
【实验拓扑】
【实验要求】
1、首先按照上图来连接路由器并配置好网络,在设置静态路由使得R1与R5之间能够互通。
2、将R5的当前配置文件拷贝到R1的flash中。
3、在R1上开启tftp-server,文件为flash中R5的配置。
4、在R1上开启DNS,并将R5主机名对应R5的IP地址。
5、不保存R5的配置,重启R5,使得配置能够自动从R1中获得。
【实验配置】
按照“实验基本配置”配置好网络,然后按照下面步骤操作
- R5#conf t
- R5(config)#tftp-server system:running-config alias R5.cfg
- R1#copy tftp flash:
- Address or name of remote host []? 155.1.0.5
- Source filename []? R5.cfg
- Destination filename [R5.cfg]?
- Accessing tftp://155.1.0.5/R5.cfg...
- Erase flash: before copying? [confirm]n
- Loading R5.cfg from 155.1.0.5 (via FastEthernet0/0): !
- [OK - 1263 bytes]
- Verifying checksum... OK (0x9A03)
- 1263 bytes copied in 4.948 secs (255 bytes/sec)
- R4:
- interface Serial 0/0
- ip helper-address 155.1.146.1
- R1:
- tftp-server flash:R5.cfg alias r5-confg
- !
- ip dns server
- ip host R5 155.1.0.5
- R5#wr era
- Erasing the nvram filesystem will remove all configuration files! Continue?
- [confirm]
- [OK]
- Erase of nvram: complete
- R5#reload
- System configuration has been modified. Save? [yes/no]: no
- Proceed with reload? [confirm]
- ……
- Would you like to enter the initial configuration dialog? [yes/no]:
- Press RETURN to get started!
- *Mar 1 00:00:10.695: %LINEPROTO-5-UPDOWN: Line protocol on Interface VoIPNull0,
- changed state to upsslinit fn
- *Mar 1 00:00:24.691: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
- *Mar 1 00:00:27.691: %LINK-3-UPDOWN: Interface Serial0/1, changed state to
- down
- *Mar 1 00:00:27.691: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to
- up
- *Mar 1 00:00:30.691: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to
- up
- *Mar 1 00:00:33.691: %LINEPROTO-5-UPDOWN: Line protocol on Interface , changed
- state to up
- *Mar 1 00:00:36.691: %LINEPROTO-5-UPDOWN: Line protocol on Interface
- Serial0/0, changed state to up
- *Mar 1 00:00:36.691: %LINEPROTO-5-UPDOWN: Line protocol on Interface
- Serial0/1, changed state to down
- *Mar 1 00:00:36.691: %LINEPROTO-5-UPDOWN: Line protocol on Interface
- Ethernet0/0, changed state to up
- *Mar 1 00:00:36.691: %LINEPROTO-5-UPDOWN: Line protocol on Interface
- Ethernet0/1, changed state to up
- *Mar 1 00:00:57.691: %LINEPROTO-5-UPDOWN: Line protocol on Interface
- Serial0/0, http://www.luyouqiwang.com/14518/ changed state to down
- *Mar 1 00:01:15.643: %LINEPROTO-5-UPDOWN: Line protocol on Interface
- Accessed by Shamsheer Khan from 87.101.244.8 at 05:34:23 Dec 31,2007
- CCIE Routing & Switching Lab Workbook Volume I Version 4.1
- Copyright ? 2007 Internetwork Expert www.InternetworkExpert.com
- - 22 -
- Serial0/0, changed state to up
- *Mar 1 00:02:16.875: %LINK-5-CHANGED: Interface Ethernet0/0, changed state to
- administratively down
- *Mar 1 00:02:16.879: %LINK-5-CHANGED: Interface Ethernet0/1, changed state to
- administratively down
- *Mar 1 00:02:16.879: %LINK-5-CHANGED: Interface Serial0/1, changed state to
- administratively down
- *Mar 1 00:02:17.875: %LINEPROTO-5-UPDOWN: Line protocol on Interface
- Ethernet0/0, changed state to down
- *Mar 1 00:02:17.879: %LINEPROTO-5-UPDOWN: Line protocol on Interface
- Ethernet0/1, changed state to down
- *Mar 1 00:02:19.691: %IP-5-WEBINST_KILL: Terminating DNS process
- *Nov 17 13:45:24.679: %SYS-5-RESTART: System restarted --
- Cisco IOS Software, 3600 Software (C3640-JK9O3S-M), Version 12.3(14)T7, RELEASE
- SOFTWARE (fc2)
- Technical Support: http://www.cisco.com/techsupport
- Copyright (c) 1986-2006 by Cisco Systems, Inc.
- Compiled Wed 22-Mar-06 21:46 by pwade
- *Nov 17 13:45:24.691: %SNMP-5-COLDSTART: SNMP agent on host Router is
- undergoing a cold start
- *Nov 17 13:45:33.975: %SYS-5-CONFIG_I: Configured from tftp://155.1.146.1/r5-
- confg by console
- R5#
注:上面高亮部分显示了自动从R1上获取配置
【实验基本配置】
- R1:
- inter fa 0/0
- ip address 155.1.146.1 255.255.255.0
- no shut
- ip route 155.1.0.0 255.255.255.0 155.1.146.4
- R4:
- inter ethernet 0/0
- ip address 155.1.146.4 255.255.255.0
- no shut
- !
- interface Serial 0/0
- encaps frame-relay
- no frame-relay inverse
- ip address 155.1.0.4 255.255.255.0
- frame map ip 155.1.0.5 405 broad
- no shutdown
- R5:
- interface Serial 0/0
- encaps frame-relay
- no frame-relay inverse
- ip address 155.1.0.5 255.255.255.0
- frame map ip 155.1.0.4 504 broad
- no shut
- ip route 155.1.146.0 255.255.255.0 155.1.0.4
- R6:
- inter gig 0/0
- ip address 155.1.146.6 255.255.255.0
- no shut