Introduction
This document describes how to configure system information on Catalyst switches.
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
This document is not restricted to specific software and hardware versions.
The information in this document is based on command outputs from:
Use the write erase command on switches that run Cisco IOS to ensure that the switches have a default configuration. Use a PC that runs a Terminal Emulator Software.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Background Information
Catalyst switches allow you to configure several descriptive system parameters to ease in the administration of internet work equipment. The ability to document and identify networking equipment can make it easier for network administrators to manage and maintain their network. There are two ways that system information can be viewed or used.
- Via Simple Network Management Protocol (SNMP) with the use of an SNMP management station.
- Via the command prompt on the switch.
This document describes how to set the system parameters on Catalyst switches that run Cisco IOSĀ®. System parameters can then be queried by SNMP management stations. This document also shows you how to set the date, time, and command prompt for the switch. Here are the tasks that are performed in this document:
- Connect a terminal to the switch.
- Configure the system name.
- Configure the system prompt.
- Configure the system location.
- Configure the system contact.
- Configure the system time and date.
- View the system information.
- View the date and time.
- Configure the IP address on the switch.
- View the IP configuration on the switch.
Step-by-Step Procedure
Do the next steps to set the system parameters on Catalyst switches that run Cisco IOS software.
- Connect a terminal to the console ports of the switches. For details on how to connect to the Console ports of the Catalyst Switches, refer to Understand the Terminal Connection to a Console Port on Catalyst Switches.
- Use the hostname command to set the name of the switch in Cisco IOS.
Configure System Name:
Router(config)#hostname Switch-A-SJ1
Switch-A-SJ1(config)
Note: When you begin from a clean configuration in Cisco IOS, the prompt automatically includes Router> in user exec mode. To change the hostname, you must be in the global configuration mode.
-
Configure the system prompt with the prompt command from global config mode in Cisco IOS.
Configure System Prompt:
Switch-A-SJ1(config)#prompt Switch-A>
Switch-A-SJ1(config)#exit
Switch-A>
Note: When you set the prompt with the prompt command in global configuration mode, include the > symbol if you want it to appear as part of the system prompt. To remove the new prompt and return the prompt to its default, use the no prompt command.
-
There is no specific command for Cisco IOS to set the location. You can, however, use the banner motd global configuration command to set location information..
Configure System Location:
Switch-A(config)#banner motd ?
LINE c banner-text c, where 'c' is a delimiting character
Switch-A(config)#banner motd c 170 West Tasman Drive, San Jose, CA c
Note: Notice that the text between the letter c can be displayed during the next log in.
-
There is no specific command to set the system contact in Cisco IOS. You can, however, use the banner motd global configuration command.
Configure System Contact:
Switch-A(config)#banner motd ?
LINE c banner-text c, where 'c' is a delimiting character
Switch-A(config)#banner motd c 170 West Tasman Drive, San Jose, CA; Tech
Support 408 123 4567 c
-
Configure the system date and time with the clock set command in privileged EXEC mode.
Configure System date and time:
Switch-A#clock set 20:09:01 3 Apr 2003
-
To view the system information in Cisco IOS, use the show environment and show version command. The show run command can be used to verify system location, system contact, and so on.
View System Information:
Switch-A#show environment status
backplane:
operating clock count: 2
operating VTT count: 3
fan-tray:
fantray fan operation sensor: OK
!--- Output suppressed.
Switch-A#show run
!
hostname Switch-A-SJ1
!
banner motd ^C
170 West Tasman Drive, San Jose, CA ^C
!
!--- Output suppressed.
-
To display the system date and time, enter the show clock command at the prompt.
View date and time:
Switch-A#show clock
20:09:06.079 UTC Thu Apr 3 2003
-
Use the interface vlan, interface mod/port, switchport, and the ip route commands to set up access to the switch. Enter both global and interface configuration mode.
Configure IP address and default route:
Switch-A(config)#interface vlan 1
Switch-A(config-if)#ip address 172.16.1.2 255.255.255.0
Switch-A(config-if)#no shut
Switch-A(config)#interface fastEthernet 3/1
Switch-A(config-if)#switchport
Switch-A(config-if)#switchport access vlan 1
Switch-A(config-if)#no shut
Now, set the default gateway of the switch. Other techniques can be used to set default gateways and routing in general. The next example is one method:
Switch-A(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.1
-
Verify the IP information on the switch with the show ip interface brief and show ip route commands.
View IP Configuration:
Switch-A#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Vlan1 172.16.1.2 YES manual up up
FastEthernet3/1 unassigned YES unset up up
!--- Output suppressed.
Switch-A#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - ISIS level-1, L2 - ISIS level-2, ia - ISIS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is 172.16.1.1 to network 0.0.0.0
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Vlan1
S* 0.0.0.0/0 [1/0] via 172.16.1.1
Switch-A#
For further details on how to set up the IP address on Catalyst switches, refer to the Configuring a Management IP Address on Catalyst 4500/4000, 5500/5000, 6500/6000, and Catalyst Fixed Configuration Switches document.
Commands to Verify the System Information
Use the next commands to verify system information:
-
show environment- To view how the current system is setup.
-
show clock- To view the system date and time.
-
show interface- To view the configured IP address on the switch.
-
show ip route- To view the default gateway configured on the switch.
Command Summary
These are the various commands referenced in this document:
Cisco IOS (from global config mode) |
hostname |
prompt |
banner motd |
banner motd |
clock |
interface vlan, interface mod/port, switchport |
ip route |
Cisco IOS (from enable mode) |
show environment, show run |
show clock |
show ip interface brief |
show ip route |
Related Information