28-2
Catalyst 6500 Series Switch Software Configuration Guide—Release 8.7
OL-8978-04
Chapter 28 Working with Configuration Files
Working with the Configuration Files on the Switch
Creating and Using Configuration File Guidelines
Creating configuration files can help you configure your switch. The configuration files can contain
some or all the commands that are needed to configure one or more switches. For example, you might
want to download the same configuration file to several switches that have the same hardware
configuration so that they have identical module and port configurations.
This section describes the guidelines for creating a configuration file:
•
We recommend that you connect through the console port when using the configuration files to
configure the switch. If you configure the switch from a Telnet session, the IP addresses are not
changed, and the ports and the modules are not disabled.
•
If no passwords have been set on the switch, you must set them on each switch by entering the
set
password
and
set enablepass
commands. Enter a blank line after the
set password
and
set
enablepass
commands. The passwords are saved in the configuration file as clear text.
If the passwords already exist, you cannot enter the
set password
and
set enablepass
commands
because the password verification will fail. If you enter the passwords in the configuration file, the
switch mistakenly attempts to execute the passwords as commands as it executes the file.
•
Certain commands must be followed by a blank line in the configuration file. The blank line is
necessary; without the blank line, these commands might disconnect your Telnet session. Before
disconnecting a session, the switch prompts you for confirmation. The blank line acts as a carriage
return, which indicates a negative response to the prompt and retains the Telnet session.
Include a blank line after each occurrence of these commands in a configuration file:
–
set interface sc0
ip_addr netmask
–
set interface sc0 disable
–
set module disable
mod
–
set port disable
mod/port
Creating a Configuration File
When creating a configuration file, you must list the commands in a logical way so that the system can
respond appropriately. To create a configuration file, perform these steps:
Step 1
Download an existing configuration from a switch.
Step 2
Open the configuration file in a text editor, such as vi or emacs on UNIX or Notepad on a PC.
Step 3
Extract the portion of the configuration file with the desired commands and save it in a new file. Make
sure that the file begins with the word
begin
on a line by itself and ends with the word
end
on a line by
itself.
Step 4
Copy the configuration file to the appropriate TFTP directory on the workstation (
/
tftpboot on a UNIX
workstation).
Step 5
Make sure that the permissions on the file are set to world-read.