Read an Excerpt
Chapter 3: Using Configuration Tools
Cisco IOS software includes, I number of configuration tools that simplify the process of setting LIP the initial configuration of a router or access server. This chapter describes the following configuration tools:
- Using AutoInstall
- Using Setup for Configuration Changes
- Using Other Configuration Tools
For a complete description of the configuration tools commands in this chapter, refer to Chapter 4, "Configuration Tools Command." To locate documentation of other commands, you can search online at www.cisco.com
This section provides information about AutoInstall, a procedure that allows you to configure a new router automatically and dynamically. The AutoInstall procedure involves connecting a new router to a network where an existing router is preconfigured, turning on the new router, and enabling it with a configuration file that is automatically downloaded from a Trivial File Transfer Protocol (TFTP) server.
The following sections provide the requirements for AutoInstall and an overview of how the procedure works. To start the procedure, see the "Perform the AutoInstall Procedure" section.
For the Autoinstall procedure to work, your system must meet the following requirements:
- Routers must be physically attached to the network using one or more of the following interface types: Ethernet, Token Ring, Fiber Distributed Data Interface (FDDI), wrial with High-Level Data Link Control (HDLC) encapsulation, or serial with Frame Relay encapsulation. HDLC is the default serial encapsulation. If the Autoinstallprocess fails over HDLC, the Cisco IOS software automatically configures Frame Relay encapsulation.
- The existing preconfigured router must be running Software Release 9.1 or later. For AutoInstall over Frame Relay, this router must be running Cisco IOS Release 10.3 or later.
- The new router must be running Software Release 9.1 or later. For AutoInstall over Frame Relay, the new router must be running Cisco IOS Release 10.3 or later.
NOTE Of Token Ring interfaces, only those that set ring speed with physical jumpers support AutoInstall. AutoInstall does not work with Token Ring interfaces for which the ring speed must be set with software configuration commands. If the ring speed is not set, the interface is set to shutdown mode.
- You must complete procedure 1 and either procedure 2 or 3:
- Procedure 1: A configuration file for the new router must reside on a TFTP server. This file can contain the full configuration or the minimum needed for the administrator to Telnet into the new router for configuration. In addition, make sure to complete one of the following procedures.
- Procedure 2: A file named network-confg also must reside on the server. The file must have an Internet Protocol (IP) host name entry for the new router. The server must be reachable from the existing router.
- Procedure 3: An IP address-to-host name mapping for the new router must be added to a Domain Name System (DNS) database file.
- If the existing router is to help automatically install the new router via an HDLC-encapsulated serial interface using Serial Line Address Resolution Protocol (SLARP), that interface must be configured with an IP address whose host portion has the value I or 2. (AutoInstall over Frame Relay does not have this address constraint.) Subnet masks of any size are supported.
- If the existing router is to help automatically install the new router using a Frame Relayencapsulated serial interface, that interface must be configured with the following:
- An IP helper address pointing to the TFTP server. In the following example, 126.96.36.199 is the address of the TFTP server: ip helper 188.8.131.52
- A Frame Relay map pointing back to the new router. In the following example, 172.21.177. 100 is the IP address of the new router's serial interface, and 100 is the PVC identifier:
frame-relay map ip 172.21.177.100 100 dlci
- If the existing router is to help automatically install the new router via an Ethernet, Token Ring, or FDDI interface using BOOTP or Reverse Address Resolution Protocol (RARP), a BOOTP or RARP server also must be set up to map the new router's Media Access Control (MAC) address to its IP address.
- IP helper addresses might need to be configured to forward the TFTP and DNS broadcast requests from the new router to the host that is providing those services.
Using a DOS-Based TFTP Server
AutoInstall over Frame Relay and other WAN encapsulations support downloading configuration files from UNIX-based and DOS-based TFTP servers. Other booting mechanisms such as RARP and SLARP also support UNIX-based and DOS-based TFTP servers.
The DOS format of the UNIX network-conf file that must reside on the server must be eight characters or fewer, with a three-letter extension. Therefore, when an attempt to load network-confg fails, Autoinstall automatically attempts to download the file cisconet.cfg from the TFTP server.
If cisconet.cfg, exists and is downloaded Successfully, the server is assumed to be a DOS machine. The AutoInstall program then attempts to resolve the host name for the router through host commands in cisconet.cfg.
If cisconet.cfg does not exist, cannot be downloaded, or the program is unable to resolve a host name, DNS attempts to resolve the host name. If DNS cannot resolve the host name, the router attempts to download ciscortr.cfg. If the host name is longer than eight characters, it is truncated to eight characters. For example. a router with it host name "autralia" will be treated as "australi" and AutoInstall will attempt to download australi.cfg.
The format of cisconet.cfg and ciscortr.cfg is to be the same as that described for network-cong and hostname-confg.
If neither network-confg nor cisconet.cfg exists and DNS is unable to resolve the host name, AutoInstall attempts to load router-confg and then ciscortr.cfg if router-confg does not exist or cannot be downloaded. The cycle is repeated three times.
How Autoinstall Works Once the requirements for using AutoInstall are met, the dynamic configuration of the new router Occurs in the following order:
1. The new router acquires its IP address. Depending on the interface connection between the two routers and/or access servers, tile new router's IP address is dynamically resolved by either SLARP requests or BOOTP or RARP requests.
2. The new router resolves its name through network-confg, cisconet.cfg, or DNS.
3. The new router automatically requests and downloads its configuration file from a TFTP server.
4. If a host name is not resolved, the new router attempts to load router-confg or ciscortr.cfg.
Acquiring the New Router's IP Address
The new router (newrouter) resolves its interface's IP addresses by one of the following means:
- If newrouter is connected by an HDLC-encapsulated serial line to the existing router (existing), newrouter sends a SLARP request to existing.
- If newrouter is connected by an Ethernet, Token Ring, or FDDI interface, it broadcasts BOOTP and RARP requests.
- If newrouter is connected by a Frame Relay-encapsulated serial interface, it first attempts the HDLC automatic installation process and then attempts the BOOT? or RARP process over Ethernet, Token Ring, or FDDI. If both attempts fail, the new router attempts to automatically install over Frame Relay. In this case, a BOOTP request is sent over the lowest numbered serial or HSSI interface.
The existing router (existing) responds in one of the following ways depending on the request type:
- In response to a SLARP request, existing sends a SLARP reply packet to newrouter. The reply packet contains the IP address and netmask of existing. If the host portion of the IP address in the SLARP response is 1, newrouter configures its interface using the value 2 as the host portion of its IP address and vice versa. (See Figure 3-1.)
- In response to BOOTP or RARP requests, an IP address is sent from the BOOTP or RARP server to newrouter.
A BOOT? or RARP server must have already been set up to map newrouter's MAC address to its IP address. If the BOOT? server does not reside on the directly attached network segment, routers between newrouter and the BOOTP server can be configured with the ip helper-address command to allow the request and response to be forwarded between segments, as shown in Figure 3-2.
AutoInstall over Frame Relay is a special case in that the existing router acts as a BOOT? server and responds to the incoming BOOT? request. Only a helper address and a Frame Relay map need to be set up. No MAC-to-IP address map is needed on the existing router. As of Software Release 9.2 1, routers can be configured to act as RARP servers.
Because the router attempts to resolve its host name as soon as one interface resolves its IP address, only one IP address needs to be set up with SLARP, BOOTP, or RARP.
Resolving the IP Address to the Host Name
The new router resolves its IP address-to-host name mapping by sending a TFTP broadcast requesting the file network-confg, as shown in Figure 3-3.
The network-confg file is a configuration file generally shared by several routers. In this case, it is used to map the IP address of the new router Oust obtained dynamically) to the name of the new router. The file network- confg must reside on a reachable TFTP server and must be globally readable.
The following is an example of a minimal network-confg file that maps the IP address of the new router (184.108.40.206) to the name newrouter. The address of the new router was learned via SLARP and is based on existing's IP address of 220.127.116.11.
Ip host newrouter 18.104.22.168
If you are not using AutoInstall over Frame Relay, the host portion of the address must be 1 or 2. AutoInstall over Frame Relay does not have this addressing constraint.
If newrouter does not receive a network-confg or a cisconet.cfg file, or if the IP address-to-host-name mapping does not match the newly acquired IP address, newrouter sends a DNS broadcast. If DNS is configured and has an entry that maps newrouter's SLARP, BOOT?, or RARP-acquired IP address to its name, newrouter successfully resolves its name.
If DNS does not have an entry that maps the new router's SLARP, BOOTP, or RARP-acquired address to its name, the new router cannot resolve its host name. The new router attempts to download a default configuration file as described in the next section, and failing that, enters setup mode - or enters user EXEC mode with AutoInstall over Frame Relay.
Downloading the New Router's Host Configuration File
After the router successfully resolves its host name, newrouter sends a TFTP broadcast requesting the file newrouter-conf or newrouter.cfg. The name newrouter-confg must be in all lowercase letters, even if the true host name is not. If newrouter cannot resolve its host name, it sends a TFTP broadcast requesting the default host configuration file router-confg. The file is downloaded to newrouter, where the configuration commands take effect immediately.
When using AutoInstall over Frame Relay, you are put into setup mode while the Autoinstall process is running. If the configuration file is successfully installed, the setup process is terminated. If you expect the AutoInstall process to be successful, either do not respond to the setup prompts or respond to the prompts as follows:
Would you like to enter the initial configuration dialog? [yes] : no
Would you like to terminate autoinstall? [yes] : no
If you do not expect the AutoInstall process to be successful, create a configuration file by responding to the setup prompts. The Autoinstall process is terminated transparently.
You will see the following display as the Autoinstall operation is in progress:
Please Wait. AutoInstall being attempted !!!!!!!!!!!!!!!!!!!! If the host configuration file contains only the minimal information, you must connect using Telnet into existing, from there connect via Telnet to newrouter, and then run the setup command to configure newrouter. Refer to the "Using Setup for Configuration Changes" section later in this chapter for details on the setup command.
If the host configuration file is complete, newrouter should be fully operational. You can enter the enable command (with the system administrator password) at the system prompt on newrouter, and then issue the copy running-config startup-config command to save the information in the recently obtained configuration file into nonvolatile random-access memory (NVRAM) or to the location specified by the CONFIG_FILE environment variable. If it must reload, newrouter simply loads its configuration file from NVRAM.
If the TFTP request fails, or if newrouter still has not obtained the IP addresses of all its interfaces, and those addresses are not contained in the host configuration file, then newrouter enters setup mode automatically. Setup mode prompts you for manual configuration of the Cisco IOS software at the console. The new router continues to issue broadcasts in an attempt to learn its host name and obtain any unresolved interface addresses. The broadcast frequency will dwindle to every 10 minutes after several attempts. Refer to the "Using Setup for Configuration Changes" section later in this chapter for details on the setup command....