26-2
Catalyst 6000 Family Software Configuration Guide—Releases 6.3 and 6.4
78-13315-02
Chapter 26 Working with Configuration Files
Working with Configuration Files on the Switch
Use the following guidelines when creating a configuration file:
•
We recommend that you connect through the console port when using configuration files to
configure the switch. If you configure the switch from a Telnet session, IP addresses are not
changed, and ports and 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 passwords already exist, you cannot enter the
set password
and
set enablepass
commands
because the password verification will fail. If you enter 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 commands in a logical way so that the system can
respond appropriately. One method of creating a configuration file is as follows:
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 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 (usually
/
tftpboot on a
UNIX workstation).
Step 5
Make sure the permissions on the file are set to world-read.
This example shows an example configuration file. This file could be used to set the Domain Name
System (DNS) configuration on multiple switches.
begin
!
#dns
set ip dns server 172.16.10.70 primary
set ip dns server 172.16.10.140
set ip dns enable
set ip dns domain corp.com
end