Table Of Contents
Administering the Switch
Configure the Global System Settings
Configure the Login Banner
Configure DNS
Manage Configuration Files
How to Display the Current Configuration
How to Back Up the Current Configuration
How to Configure the Switch Using a Backup Configuration
Manage System Images
Work with the Flash File System
Reset a Module or the Switch
Administering the Switch
The following sections describe some of the common administrative tasks you need to perform on your switch:
•
Configure the Global System Settings—How to set system information, the time and date, and the login and enable passwords.
•
Configure the Login Banner—How to change message-of-the-day displays.
•
Configure DNS—How to configure the switch to use the Domain Name System (DNS).
•
Manage Configuration Files—How to work with switch configuration files.
•
Manage System Images—How to upload and download system image files.
•
Work with the Flash File System—How to use the Flash file system.
•
Reset a Module or the Switch—How to reset the supervisor engine and switch modules.
Configure the Global System Settings
You can specify a variety of useful global system settings for your switch, such as system information, current date and time, system prompt, and passwords.
To configure the global system settings, perform these tasks in privileged mode:
| |
Task
|
Command
|
Step 1
|
Set the system name. The prompt changes to the system name.
|
set system name name_string
|
Step 2
|
Set the system location.
|
set system location location_string
|
Step 3
|
Set the system contact.
|
set system contact contact_string
|
Step 4
|
Set the current date and time.
|
set time mm/dd/yy hh:mm:ss
|
Step 5
|
Set the system prompt (overriding the prompt string generated by the set system name command).
|
set module name mod_num [name_string]
|
Step 6
|
Set the system prompt (overriding the prompt string generated by the set system name command).
|
set prompt prompt_string
|
Step 7
|
Set the console password (used to access the switch CLI).
|
set password
|
Step 8
|
Set the enable password (used to access privileged configuration mode).
|
set enablepass
|
This example shows how to configure the global system settings:
Console> (enable) set system name 4003-ER-F1
4003-ER-F1> (enable) set system location Bldg 1 Equip Room
4003-ER-F1> (enable) set system contact sysadmin@bigcorp.com
4003-ER-F1> (enable) set time 04/30/1999 9:45:00
Fri Apr 30 1999, 09:45:00
4003-ER-F1> (enable) set module name 2 Gig Uplinks
4003-ER-F1> (enable) set module name 3 Gig Server Links
4003-ER-F1> (enable) set password
Enter old password: <old_password>
Enter new password: <new_password>
Retype new password: <new_password>
4003-ER-F1> (enable) set enablepass
Enter old password: <old_enablepass>
Enter new password: <new_enablepass>
Retype new password: <new_enablepass>
Configure the Login Banner
The login banner, or message of the day, is the text that appears onscreen when you open a Telnet session or console port connection to the switch. The login banner can be up to 255 characters long.
To configure the login banner, perform the following task in privileged mode:
Task
|
Command
|
Enter the message of the day (where c is a character that signifies the beginning and end of the message).
|
set banner motd c [text] c
|
You can verify the login banner configuration by ending your session and reconnecting, or by viewing the configuration using the show configuration command.
This example shows how to configure the login banner and how to verify the banner configuration (when connected through the console port):
Console> (enable) set banner motd %
4003-ER-F1 (Catalyst 4003)
Cisco Systems, Inc. Console Thu Apr 30 1999, 16:37:03
4003-ER-F1 (Catalyst 4003)
Configure DNS
Domain Name System (DNS) allows you to use hostnames instead of IP addresses to refer to other devices on the network. To use DNS, you must have one or more name servers connected to the network.
To configure DNS, perform these tasks in privileged mode:
| |
Task
|
Command
|
Step 1
|
Set the address of the DNS server. The first address entered is considered the primary server. If more than one server is entered, you can use the primary keyword to make a particular name server the primary server.
|
set ip dns server ip_addr [primary]
|
Step 2
|
Set the domain name.
|
set ip dns domain name
|
Step 3
|
Enable DNS.
|
set ip dns enable
|
Step 4
|
Verify the DNS configuration. Use the noalias keyword to show IP addresses instead of server names.
|
show ip dns [noalias]
|
This example shows how to configure the switch to use DNS and how to verify the DNS configuration:
Console> (enable) set ip dns server 10.10.10.100
10.10.10.100 added to DNS server table as primary server.
Console> (enable) set ip dns domain bigcorp.com
Default DNS domain name set to bigcorp.com
Console> (enable) set ip dns enable
Console> (enable) show ip dns
DNS is currently enabled.
The default DNS domain name is: bigcorp.com
---------------------------------------- -------
dns-server-1.bigcorp.com primary
Manage Configuration Files
Configuration files contain the switch configuration information. Often, you will want to view the current configuration, back up the existing configuration before making changes, or configure the switch using a backup configuration.
How to Display the Current Configuration
To display the current configuration on screen, use the show config command, as follows:
Console> (enable) show config
set password $1$FMFQ$HfZR5DUszVHIRhrz4h6V70
set enablepass $1$FMFQ$HfZR5DUszVHIRhrz4h6V70
4003-ER-F1 (Catalyst 4003)
How to Back Up the Current Configuration
To copy the current configuration to a file on a Trivial File Transfer Protocol (TFTP) server, write the configuration file to a remote host using the copy config tftp command, as follows:
Console> (enable) copy config tftp
IP address or name of remote host []? 10.10.10.150
Name of file to copy to []? 4003-ER-F1.cfg
Upload configuration to tftp:4003-ER-F1.cfg, (y/n) [n]? y
Configuration has been copied successfully.
How to Configure the Switch Using a Backup Configuration
To configure the switch using a configuration file on a TFTP server, copy the configuration file to a remote host using the copy tftp config command, as follows:
Console> (enable) copy tftp config
IP address or name of remote host []? 10.10.10.150
Name of file to copy from []? dns_config.cfg
Configure using tftp:dns_config.cfg (y/n) [n]? y
Finished network download. (135 bytes)
>> set ip dns server 10.10.10.100 primary
10.10.10.100 added to DNS server table as primary server.
>> set ip dns domain bigcorp.com
Default DNS domain name set to bigcorp.com
Manage System Images
To change the system software image on your switch, obtain the appropriate software image file for your switch, place it on a TFTP server, and use the procedure for your switch to copy the image to the switch and reboot using the new image.
To copy a system software image from a TFTP server and reboot the switch using the new software image, perform this task in privileged mode:
| |
Task
|
Command
|
Step 1
|
Copy a system image file from a remote host.
|
copy tftp flash
|
Step 2
|
Modify the BOOT variable, prepending the new image to the BOOT string.
|
set boot system flash file_id prepend
|
Step 3
|
You must reset the switch to run the new software, which will disconnect any Telnet sessions established with the switch (a console port session will remain connected).
|
reset system
|
Step 4
|
Check the software version number to confirm the switch is running the new software.
|
show version
|
This example shows how to copy a software image from a TFTP server, reset the switch, and check the version of the installed software image:
Console> (enable) copy tftp flash
IP address or name of remote host []? 10.10.10.150
Name of file to copy from []? cat4000.5-1-1.bin
Flash device [bootflash]?
Name of file to copy to [cat4000.5-1-1.bin]?
8784112 bytes available on device bootflash, proceed (y/n) [n]? y
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
File has been copied successfully.
Console> (enable) set boot system flash bootflash:cat4000.5-1-1.bin prepend
BOOT variable = bootflash:cat4000.5-1-1.bin,1;bootflash:cat4000.4-4-1.bin,1;
Console> (enable) reset system
This command will reset the system.
Do you want to continue (y/n) [n]? y
1999 Mar 26 22:01:56 %SYS-5-SYS_RESET 0:00.505752: Please set IPAddr variable
0:00.506320: Please set Netmask variable
0:00.506675: Please set Broadcast variable
0:00.507176: Network is not configured
WS-X4012 bootrom version 4.4(1), built on 1998.12.28 10:22:22
H/W Revisions: Meteor: 4 Comet: 8 Board: 2
Supervisor MAC addresses: 00:10:7b:f7:2f:00 through 00:10:7b:f7:32:ff (1024 addr
The system will autoboot in 5 seconds.
Type control-C to prevent autobooting.
The system will now begin autobooting.
Autobooting image: "bootflash:cat4000.5-1-1.bin"
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCC###########################
Starting Off-line Diagnostics
Cisco Systems, Inc. Console
Enter password: <password>
Mod Port Model Serial # Versions
--- ---- ---------- -------------------- ---------------------------------
1 0 WS-X4012 JAB023806LN Hw : 0.1
Work with the Flash File System
You can use the Flash file system to store system-software images and configuration files locally on the switch (instead of saving to a TFTP server).
Note
The Catalyst 4000 family, 2980G, and 2948G switches support the bootflash: Flash device.
To format the bootflash:, perform the following task in privileged mode:
Task
|
Command
|
Format the desired Flash device.
|
format [m/]device:
|
This example shows how to format a Flash PC card:
Console> (enable) format slot0:
All sectors will be erased, proceed (y/n) [n]? y
Enter volume id (up to 30 characters): Supe III Flash Card
Format device slot0 completed
To copy Flash files between bootflash: and a TFTP server, perform one of these tasks in privileged mode:
Task
|
Command
|
• Copy the current configuration to a Flash device or a TFTP server.
|
copy config {bootflash: | file-id | tftp}
|
• Copy a Flash file on the current default Flash device to a TFTP server.
|
copy file-id tftp
|
• Copy a file from a TFTP server to a Flash device (you are prompted for the Flash device name).
|
copy tftp file-id
|
This example shows how to copy the current configuration to the current default Flash device:
Console> (enable) copy config flash
Flash device [bootflash]?
Name of file to copy to []? bootflash-ER-F1.cfg
Upload configuration to slot0:4003-ER-F1.cfg
13259828 bytes available on device bootflash, proceed (y/n) [n]? y
Configuration has been copied successfully.
This example shows how to copy a file from the current default Flash device to a TFTP server:
Console> (enable) copy 5509-ER-F1.cfg tftp
IP address or name of remote host []? 10.10.10.150
Name of file to copy to [4003-ER-F1.cfg]?
File has been copied successfully.
This example shows how to copy a file from a TFTP server to a Flash device:
Console> (enable) copy tftp flash
IP address or name of remote host []? 10.10.10.150
Name of file to copy from []? 4003-ER-F1.cfg
Flash device [bootflash]?
Name of file to copy to [4003-ER-F1.cfg]?
16376740 bytes available on device bootflash, proceed (y/n) [n]? y
File has been copied successfully.
To display a list of files on the bootflash:, perform the following task in privileged mode:
Task
|
Command
|
Display a list of files on the bootflash:.
|
dir [all | deleted | long]
|
This example shows how to list the files on a Flash device:
-#- -length- -----date/time------ name
2 7004 Apr 19 1998 10:06:37 4003-ER-F1.cfg
3 3102520 Apr 19 1998 10:09:42 cat4000.5-1-1.bin
13259956 bytes available (3124044 bytes used)
To delete files on the bootflash:, perform this task in privileged mode:
Task
|
Command
|
Delete a file on the bootflash:.
|
delete file-id
|
This example shows how to delete a file on a Flash device:
Console> (enable) delete 4003-ER-F1.cfg
To undelete a file on the bootflash:, perform these tasks in privileged mode:
| |
Task
|
Command
|
Step 1
|
List the deleted files on the current default Flash device.
|
dir deleted
|
Step 2
|
Undelete the desired file (use the file index number shown in the first column [#] of the dir display to identify the file).
|
undelete index
|
This example shows how to undelete a file on the bootflash:
Console> (enable) dir deleted
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
2 .D ffffffff 6d005dfe 317754 15 7964 Aug 18 1998 10:27:38 4003-ER-F1.
13273260 bytes available (3110740 bytes used)
Console> (enable) undelete 2
To free space on the bootflash:, use the squeeze command to permanently remove deleted files.
Note
You cannot use the undelete command to restore files you deleted prior to entering the squeeze command.
To squeeze the bootflash:, perform this task in privileged mode:
Task
|
Command
|
Permanently remove deleted files from a Flash device.
|
squeeze [m/]device:
|
This example shows how to permanently remove deleted files from a Flash device:
Console> (enable) squeeze bootflash:
All deleted files will be removed, proceed (y/n) [n]? y
Squeeze operation may take a while, proceed (y/n) [n]? y
Reset a Module or the Switch
Sometimes you need to reset an individual module or the entire switch (for example, when you install a new system software image). If you are connected to the switch through a Telnet session, resetting an individual module can disconnect your session (if the Telnet session was established through a port on that module). If you reset the entire switch, your Telnet session will disconnect.
To reset an individual module installed on the switch, perform this task in privileged mode:
Task
|
Command
|
Reset an individual module.
|
reset mod_num
|
This example shows how to reset an individual module on the switch:
Console> (enable) reset 3
This command will reset module 3 and may disconnect your telnet
session.
Do you want to continue (y/n) [n]? y
Console> (enable) 05/30/1999,09:32:05:SYS-5:Module 6 reset from
telnet/10.10.10.12/
05/30/1999,10:18:23:SYS-5:Module 3 is online
To reset the entire switch, perform this task in privileged mode:
Task
|
Command
|
Reset the entire switch.
|
reset
|
This example shows how to reset the entire switch:
This command will reset the system.
Do you want to continue (y/n) [n]? y
Console> (enable) 05/30/1999,10:24:46:SYS-5:System reset from
System Bootstrap, Version 3.1(2)
Copyright (c) 1994-1997 by cisco Systems, Inc.
<... output truncated ...>