|
|
This section describes some of the common administrative tasks you need to perform on your switch:
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 this task 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 |
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 System name set. 4003-ER-F1> (enable) set system location Bldg 1 Equip Room System location set. 4003-ER-F1> (enable) set system contact sysadmin@bigcorp.com System contact set. 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 Module name set. 4003-ER-F1> (enable) set module name 3 Gig Server Links Module name set. 4003-ER-F1> (enable) set password Enter old password: <old_password> Enter new password: <new_password> Retype new password: <new_password> Password changed. 4003-ER-F1> (enable) set enablepass Enter old password: <old_enablepass> Enter new password: <new_enablepass> Retype new password: <new_enablepass> Password changed. 4003-ER-F1> (enable)
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 this 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) Access Restricted % MOTD banner set Console> (enable) exit Session Disconnected... Cisco Systems, Inc. Console Thu Apr 30 1999, 16:37:03 4003-ER-F1 (Catalyst 4003) Access Restricted Enter password:
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 this task 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 DNS is enabled Console> (enable) show ip dns DNS is currently enabled. The default DNS domain name is: bigcorp.com DNS name server status ---------------------------------------- ------- dns-server-1.bigcorp.com primary Console> (enable)
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.
To view the current configuration onscreen, perform this task in privileged mode:
| Task | Command |
|---|---|
Display the current configuration onscreen. |
This example shows how to display the current configuration:
Console> (enable) show config ..... .............. .............. .............. .. begin ! #version 5.1(1) ! set password $1$FMFQ$HfZR5DUszVHIRhrz4h6V70 set enablepass $1$FMFQ$HfZR5DUszVHIRhrz4h6V70 set prompt Console> set length 24 default set logout 20 set banner motd ^C 4003-ER-F1 (Catalyst 4003) Access Restricted ^C <...output truncated...> end Console> (enable)
To copy the current configuration to a file on a Trivial File Transfer Protocol (TFTP) server, perform one of these tasks in privileged mode:
| Task | Command |
|---|---|
Catalyst 4000, 2948G, 2926G, and Supervisor Engine III, III F: | |
Supervisor Engine II, II G, III G: | write network |
This example shows how to copy the current configuration to a TFTP server:
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. Console> (enable)
| Task | Command |
|---|---|
Catalyst 4000, 2948G, 2926G, and Supervisor Engine III, III F: | |
Supervisor Engine II, II G, and III G: |
This example shows how to configure the switch from a TFTP server:
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 enable DNS is enabled >> set ip dns domain bigcorp.com Default DNS domain name set to bigcorp.com Console> (enable)
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.
| Task | Command |
|---|---|
Step 1 Copy a system image file from a remote host. | |
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
CCCCCCCCCCCCCC
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
esses)
Installed memory: 32 MB
Testing LEDs.... done!
The system will autoboot in 5 seconds.
Type control-C to prevent autobooting.
rommon 1 >
The system will now begin autobooting.
Autobooting image: "bootflash:cat4000.5-1-1.bin"
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCC###########################
Starting Off-line Diagnostics
<...output truncated...>
Cisco Systems, Inc. Console
4003-ER-F1
Access Restricted
Enter password: <password>
Console> show version 1
Mod Port Model Serial # Versions
--- ---- ---------- -------------------- ---------------------------------
1 0 WS-X4012 JAB023806LN Hw : 0.1
Gsp: 5.1(1)
Nmp: 5.1(1)
Console>
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. | |
Step 2 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 3 Check the software version number to confirm the switch is running the new software. | show version |
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. | download host file |
Step 2 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 3 Check the software version number to confirm the switch is running the new software. | show version |
Flash PC cards in the slot0: or slot1: Flash devices must be formatted before use. To format a Flash PC card (or the bootflash: device, if necessary), perform this 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 Formatting sector 1 Format device slot0 completed Console> (enable)
To change the default Flash device and see which device is the current default, perform this task:
| Task | Command |
|---|---|
Step 1 Set the default Flash device for the switch. | cd device: |
Step 2 Verify the default Flash device for the switch. |
This example shows how to change the default Flash device and how to verify which device is the default:
Console> (enable) cd slot0: Console> (enable) pwd slot0 Console> (enable) cd bootflash: Console> (enable) pwd bootflash Console> (enable)
| Task | Command |
|---|---|
| copy config {flash | file-id | tftp} |
| copy file-id device:[file-id] |
| copy file-id tftp |
| 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 [slot0]? Name of file to copy to []? 5509-ER-F1.cfg Upload configuration to slot0:5509-ER-F1.cfg 13259828 bytes available on device slot0, proceed (y/n) [n]? y ..... .......... .......... Configuration has been copied successfully. Console> (enable)
This example shows how to copy a file from the current default Flash device to a different Flash device:
Console> (enable) copy 5509-ER-F1.cfg slot0: 16383872 bytes available on device slot0, proceed (y/n) [n]? y File has been copied successfully. Console> (enable)
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 [5509-ER-F1.cfg]? - File has been copied successfully. Console> (enable)
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 []? 5509-ER-F1.cfg Flash device [bootflash]? slot0: Name of file to copy to [5509-ER-F1.cfg]? 16376740 bytes available on device slot0, proceed (y/n) [n]? y - File has been copied successfully. Console> (enable)
To display a list of files on a Flash device, perform this task in privileged mode:
| Task | Command |
|---|---|
Display a list of files on a Flash device. | dir [[device:]file-id] [all | deleted | long] |
This example shows how to list the files on a Flash device:
Console> (enable) dir -#- -length- -----date/time------ name 2 7004 Apr 19 1998 10:06:37 5509-ER-F1.cfg 3 3102520 Apr 19 1998 10:09:42 cat5000-sup3.5-1-1.bin 13259956 bytes available (3124044 bytes used) Console> (enable)
To delete files on a Flash device, perform this task in privileged mode:
| Task | Command |
|---|---|
Delete a file on a Flash device. | delete [[m/]device:]file-id |
This example shows how to delete a file on a Flash device:
Console> (enable) delete 5509-ER-F1.cfg Console> (enable)
To undelete a file on a Flash device, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 List the deleted files on the current default Flash device. | |
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 a Flash device:
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 5509-ER-F1. cfg 13273260 bytes available (3110740 bytes used) Console> (enable) undelete 2 Console> (enable)
To free space on a Flash device, use the squeeze command to permanently remove deleted files. You cannot use the undelete command to restore files you deleted prior to entering the squeeze command. To squeeze a Flash device, 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 slot0: All deleted files will be removed, proceed (y/n) [n]? y Squeeze operation may take a while, proceed (y/n) [n]? y Erasing squeeze log Console> (enable)
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 via Telnet, 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 in 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 in the switch:
Console> (enable) reset 6 This command will reset module 2 and may disconnect your telnet session. Do you want to continue (y/n) [n]? y Resetting module 6... 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 6 is online Console> (enable)
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:
Console> (enable) reset 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 Console// System Bootstrap, Version 3.1(2) Copyright (c) 1994-1997 by cisco Systems, Inc. <... output truncated ...>
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Tue Jun 15 13:52:46 PDT 1999
Copyright 1989-1999©Cisco Systems Inc.