The Cisco AutoInstall procedure allows you to configure a router automatically and remotely over the network.
|
AutoInstall is particularly useful for establishing new routers in remote locations where, for example, the branch office staff have very limited networking knowledge and experience.
|
The new router must be connected to an existing router on either a WAN or a LAN link.
|
The existing router acts as a Bootstrap Protocol (BOOTP) or Reverse Address Resolution Protocol (RARP) server.
|
It must be set up to help the new router acquire its IP address.
|
This existing router also contains a helper address for the TFTP server.
|
Configuring a helper address means that all incomming TFTP requests are forwarded to a particular address, in this case a particular TFTP server.
|
The TFTP server provides a host name file for the new router.
|
If this file is not available on the TFTP server, then the new router uses a Domain Name Server (DNS) server.
|
Finally, the new configuration is downloaded from the TFTP server to the new router.
@@
The AutoInstall procedure has several steps.
|
First the new router sends a SLARP or BOOTP request for an IP address.
|
The new router learns its IP address from the first valid BOOTP or RARP reply it receives.
|
Once the new router has obtained an IP address, it requests a file from the TFTP server to resolve this IP address into a hostname.
|
The response to this request comes in the form of a file named network-confg containing the hostname for the new router.
|
Finally, the new router uses its newly acquired hostname to request the hostname-confg file that contains its specific configuration entries.
|
The TFTP server downloads this file to the new router.
|
The AutoInstall process includes several fallback features to use if a common scenario fails to provide the proper response to the new router's requests.
|
If the hostname request to the TFTP server fails to provide the new router with a host name, it will use another request procedure.
|
The new router sends a request to the DNS server to obtain IP address-to-hostname translation.
|
If the new router requests a hostname-config file, but the TFTP server cannot send the requested file, it will send a more generic configuration named router-confg.
|
Then you can telnet the new router and make specific configuration changes necessary for the new router.
@@
A new router can AutoInstall from an existing router and TFTP server using an Ethernet, Token Ring, or FDDI interface.
|
In the example shown here, the commands are entries on the existing router.
|
The Interface command defines an Ethernet interface on the existing router.
|
The IP address command defines the IP address and subnet mask for the Ethernet (E0) on the existing router
|
For more information about IP addressing and subnet masking, see the CBT Systems course £RTCP/IP Addressing and Cisco Routers£r.
|
The IP Helper-Address command defines the address of the TFTP server so that all incoming TFTP requests at the E0 interface are forwarded to that address.
|
A new router can receive an AutoInstall from an existing router and TFTP server across a WAN.
|
In this example, the command entries are on the existing router, which uses HDLC.
|
The commands define

• the serial interface 
  being used
|
• the IP address and 
  subnet mask for the 
  serial interface
|
• the helper address of 
  the TFTP server
|
In the example shown here, the existing router and new router connect over a Frame Relay link.
|
The first three commands shown here define

• the serial interface
|
• the IP address and subnet 
  mask for the serial interface
|
• the address of the tftp server
|
The Encapsulation command defines Frame Relay encapsulation.
|
For more information about Frame Relay and Cisco routers, see the CBT Systems course £RFrame Relay, SMDS, and ATM Configuration for Cisco Routers£r.
|
The Frame-relay map ip command statically maps the new router's IP address, 172.16.11.10, to its designated data-link connection identifier (DLCI), 39.
@@
When you switch on a configured Cisco router, it goes through an initialization sequence to load the operating system and configuration file.
|
If no configuration file is found and you are not using AutoInstall, for instance when you first use a new Cisco router, the router enters setup mode, prompting you for an initial configuration.
|
This is called the system configuration dialog.
|
It is also sometimes referred to as the setup dialog.
|
<F>You begin the initial configuration process by typing £Ryes£r, or pressing £UReturn£u.
|
At this point you can choose not to continue with the system configuration dialog by entering £Rno£r at the prompt.

You can press £UCtrl+C£u to terminate the process and start over at any time.
|
If you choose to see it, the router displays a summary of the configuration information, if any, for each interface.
|
As usual, you press the space bar to continue from a More prompt.
|
Next, you are prompted for global parameters, such as a router name and passwords, at the console.
|
You use the configuration values you have determined for the router, entering them at the appropriate prompts.
|
At any prompt during the setup dialog, you can request help by typing a question mark (£R?£r).

If the prompt requires a Yes or No answer, no further help is available, but if there is a range of acceptable answers, the help facility will give you some guidance.

For example, if you are prompted to select the number of bits in a subnet mask, the help facility might inform you that you can choose a decimal number between 0 and 16 for a class B address.
@@
You are prompted for parameters for each installed network interface.
|
In the example shown here, there is a Token Ring interface.
|
And there are also two serial interfaces.
|
You enter the configuration values you have determined for each interface at the appropriate prompt.
|
When you complete the configuration process for all installed interfaces on the router, the setup command facility displays the configuration command script that was created.
|
You are asked whether you want to use the new configuration.
|
If you enter £RYes£r, the configuration file is executed and saved to NVRAM.
|
If you enter £RNo£r, the configuration file is not saved and you can use the Setup command to begin the process again.
|
There is no default for this prompt; you must answer Yes or No.
|
Once you have answered Yes to this last question, the system is ready to use.
|
If you want to alter the configuration in any way, you have to do it manually.
@@
The commands that determine a router's configuration are held in configuration files.
|
There are two principal configurations associated with each router:

• startup configuration file
|
• running configuration
|
The startup configuration file is stored in NVRAM and is accessed when the router is restarted.
|
You enter £Rshow startup-config£r to see the startup configuration.
|
You use the Show Config command with Cisco IOS versions 10.3 and earlier.
|
In this example you can see how much NVRAM is needed for the startup configuration file.
|
The running configuration is held in RAM and changes as you modify interfaces and make other configuration changes.
|
You enter £Rshow running-config£r to examine the running configuration.
|
You use the Write Term command with Cisco IOS versions 10.3 and earlier.
|
When administrators want to make changes and test configurations, they first change the running configuration.
|
When they are happy with the new configuration, they copy the running configuration to the startup configuration file.
@@
There are several ways to generate router configuration information.
|
First, you use the Privileged mode configure command to enter Global Configuration mode.
|
When you are in Global Configuration mode you have access to a set of commands that affect the system configuration as a whole.
|
Cisco commands are not case-sensitive.
|
When you use the configure command you are prompted for the source of the configuration commands.
|
You can specify the terminal, NVRAM, or a file stored on a TFTP server on the network as the source.
|
Alternatively you can specify terminal configuration by typing £Rconfigure terminal£r at the command line.

The Configure Terminal command is often shortened to Config term, or Config followed by two returns.
|
The default method is to enter commands from the terminal console.
|
You can configure the router from a virtual (remote) terminal, or from a console terminal.
|
This allows you to change the existing router configuration at any time.
|
<F>You can access many other specific configuration modes from Global Configuration mode.
|
For example, many router features are enabled on a router interface basis.
|
You use the Interface command to access Interface Configuration mode.
|
In this example, a serial interface is configured to provide clocking.
|
In this example, a routing protocol has been enabled by a Global Configuration command.
|
The router configuration mode prompt is displayed.
|
Then the Network command is used to associate a specific network with the routing protocol.
@@
You can enter multiple boot system commands in the router's startup configuration file to provide a backup method for loading a system image into the router.
|
You can enter the different types of boot system commands in any order in NVRAM configuration.

If you enter multiple boot commands, the router tries them in the order in which they were entered.
|
You can load an operating system image in three ways:

• from flash memory
|
• from a network TFTP server
|
• from ROM
|
Flash memory allows you to copy new system images without changing electrically erasable programmable read-only memories (EEPROMs).
|
The information stored in flash memory isn't vulnerable to network failures that can occur when loading system images from servers.
|
In case flash memory becomes corrupted, you can specify a system image to be loaded from a TFTP server.
|
This provides a backup boot method for the router.
|
In case of both network failure and corrupted flash memory, you can specify that the system image loads from ROM  to provide a final backup boot method.
|
However, system images stored in ROM might not always be as complete or as current as those stored in flash memory or on network servers.
@@
You can create a backup of the Cisco IOS image by copying it to a network server.
|
You can use this copy of the system image to verify that the copy in flash memory is the same as the original disk file.
|
The example shown here uses the Show flash command to learn the name of the system image file.
|
In this case the filename is igs-j-1.
|
You can then use the Copy Flash TFTP command to copy the image to a tftp server.
|
You can load Cisco IOS software into flash from a tftp server using the Copy TFTP Flash command.
|
The system prompts you for the IP address (or name) of the tftp server.
|
Then you are prompted for the name of the image file.
|
<F>You get the option of erasing the existing flash memory before writing to it.
|
In the example shown here, a system image named igs-j-1 is copied into flash memory.
|
Each exclamation mark (!) means that ten User Datagram Protocol (UDP) segments have successfully transferred.
|
The series of Vs indicates successful checksum verification.
@@
You can approach router configuration with a general method.
|
Initially, you make certain changes to the router's configuration by entering commands in the appropriate configuration mode.
|
Then you examine the results of the changes you have made.
|
You use the Show Running-Config command to do this.
|
If the results are satisfactory you save them to the backup file that the router will use when it starts up again.
|
Otherwise you can remove the changes.
@@
You can load configuration information from

• a TFTP server on the network
|
• NVRAM
|
You can store the current router configuration (in RAM) on a network TFTP server using the Copy Running-Config TFTP command.
|
You can then configure the router by retrieving the configuration file.
|
This allows you to maintain and store configuration information at a central location.
|
You retrieve configuration information from the TFTP server by entering the Copy TFTP Running-Config command.
|
You then select an appropriate configuration file from those on the TFTP server.
|
The network configuration file contains commands that apply to all routers and terminal servers on the network.

The host configuration file contains commands that apply to one router in particular.
|
You enter the IP address, or name, of the remote host from which you are retrieving the configuration file.
|
In the example shown here, the router is configured from the TFTP server with IP address  172.16.2.155.
|
You enter the name of the configuration file (or accept the default name).
|
Cisco IOS operates two conventions for naming files, one for UNIX and one for DOS.

Under the UNIX convention, the default filenames are hostname-config for the host file, and network-config for the network configuration file.

In a DOS environment, the server filenames are limited to eight characters plus a three-character extension (for example, router.cfg).
|
Finally, you confirm the configuration filename and the server address that the system supplies.
@@
You can merge configuration information to the running configuration file from NVRAM using the Copy Startup-Config Running-Config command.
|
This command adds startup commands to the running configuration.

It is not a reset operation.
|
Alternatively you can use the Erase Startup-Config command to erase the contents of NVRAM.
|
When you reboot the router you can enter new configuration information in the setup dialog.
|
To display the saved configuration you use the Show Startup-Config command.
|
This displays the contents of NVRAM.
@@
Let's look now at examples of how you can configure a Cisco router.
|
You can secure the system by using passwords to restrict access.
|
For example, you can use the enable password command to restrict access to the Privileged Exec mode.
|
We'll look here at how you establish passwords on individual terminal lines.
|
First you enter Global Configuration mode using the Config Term command.
|
If you type a question mark you see a list of available configuration commands.
|
To enable passwords on terminal lines you use the Line command.
|
You enter £Rline console 0£r to begin the password configuration process for the console terminal.
|
You then enter £Rlogin£r to enable password checking.
|
Finally, you enter £Rpassword£r followed by your chosen password for this terminal line.
|
You enter £Rline vty 0 4£r to establish password protection on incoming telnet sessions from remote terminals 0 through 4.
|
Again, using the Login command enables password checking.
|
And then you use the password command with your chosen Password.
@@
Now let's look at how you give a router a meaningful name.
|
You enter Global Configuration mode by typing £Rconfig term£r.
|
Because you want to change the hostname of the router, you can type £Rho?£r to check which command to use.
|
You need to use the hostname command.
|
To find out more about the hostname command you enter £Rhostname ?£r.
|
Now that you know the correct syntax to use, you can change the router's name.
|
So if you want to change the router's name to SanJose you enter £Rhostname SanJose£r.
|
Then you press £UCtrl+Z£u to exit configuration mode.
|
A message is displayed letting you know that the router has been configured.
|
You press £UReturn£u to acknowledge the message.
|
Notice that the router name has changed at the prompt.
|
You can check the new configuration by entering £Rshow running-config£r.
|
You can see that the router's name has changed.
|
This can be contrasted with the startup configuration.
|
You enter £Rshow startup-config£r to see the startup configuration file.
|
This still shows the old router name.
|
The changes made to the running configuration (in RAM) have not affected the configuration stored in the startup configuration file (in NVRAM).
|
To add the changes to the startup configuration, you use the Copy Running-Config Startup-Config command.
|
You can restore the startup configuration by entering £Rconfig mem£r.
|
This is the abbreviated version of the configure Memory command.
|
Notice that the router name has now changed back to SanFran.
|
Now, if you examine the running configuration file, you see that the original hostname has been restored.
@@
Let's try a straightforward router configuration exercise.
|
You'll change the router's hostname from London to Vienna.
|
First, let's check the router's running configuration file.
|
You can assume you are logged in to the router London and are in Privileged mode.
|
You enter £Rshow running-config£r to see the router's running configuration file.
|
Note that the hostname is the same as that displayed at the router prompt.
|
Next, let's check the startup configuration file.
|
You can confirm that the hostname in the startup configuration file is the same as that in running configuration by entering £Rshow startup-config£r.
|
Now you can configure the router.
|
You enter £Rconfigrue terminal£r to access Global Configuration mode.
|
You enter £Rhostname Vienna£r to change the router's name.
|
You exit from Configuration mode by pressing £UCtrl+Z£u.
|
A message is then displayed confirming that the router has been configured.
|
You acknowledge the message and return to the Privileged mode prompt by pressing £UReturn£u.
|
The router's configuration has now changed.
|
To see the new hostname you have configured you enter £Rshow running-config£r to examine the router's new running configuration file.
@@
