cc/td/doc/product/lan/cat5000/rel_5_1
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Administering the Switch

Administering the Switch

This chapter describes how to perform various administrative tasks on Catalyst 5000, 4000, 2948G, and 2926G series switches.


Note For complete syntax and usage information for the commands used in this chapter, refer to the Command Reference for your switch.

This chapter consists of these sections:

Setting the System Name and System Prompt

The system name on the switch is a user-configurable string used to identify the device. The default configuration has no system name configured.

If you do not manually configure a system name, the system name is obtained through DNS if you configure the switch as follows:

If the DNS lookup is successful, the DNS host name of the switch is configured as the system name of the switch and is saved in NVRAM (the domain name is removed).

If you have not configured a system prompt, the first 20 characters of the system name are used as the system prompt (a greater-than symbol [>] is appended). The prompt is updated whenever the system name changes, unless the prompt is manually configured using the set prompt command.

The switch performs a DNS lookup for the system name whenever one of the following occurs:

If the system name is user configured, no DNS lookup is performed.

Configuring a Static System Name and Prompt

These sections describe how to statically configure the system name and prompt:

Configuring a Static System Name

To statically configure the system name, perform this task in privileged mode:
Task Command

Statically set the system name.

set system name name_string


Note When you set the system name, the system name is used as the system prompt. You can override the prompt string with the set prompt command.

This example shows how to set the system name on the switch:

Console> (enable) set system name Catalyst 5000
System name set.
Catalyst 5000> (enable)

Configuring a Static System Prompt

To statically configure the system prompt, perform this task in privileged mode:
Task Command

Statically set the system prompt.

set prompt prompt_string

This example shows how to statically configure the system prompt on the switch:

Console> (enable) set prompt Catalyst5500>
Catalyst5500> (enable)

Clearing the System Name

To clear the system name, perform this task in privileged mode:
Task Command

Clear the system name.

set system name

This example shows how to clear the system name:

Console> (enable) set system name
System name cleared.
Console> (enable)

Setting the System Contact and Location

You can specify the system contact and location to help you with resource management tasks.

To specify the system contact and location, perform this task in privileged mode:
Task Command

Step 1 Set the system contact.

set system contact [contact_string]

Step 2 Set the system location.

set system location [location_string]

Step 3 Verify the global system information.

show system

This example shows how to specify the system contact and location and verify the configuration:

Catalyst 5000> (enable) set system contact sysadmin@corp.com
System contact set.
Catalyst 5000> (enable) set system location Sunnyvale CA
System location set.
Catalyst 5000> (enable) show system
PS1-Status PS2-Status Fan-Status Temp-Alarm Sys-Status Uptime d,h:m:s Logout
---------- ---------- ---------- ---------- ---------- -------------- ---------
ok         none       ok         off        ok         0,04:04:07     20 min
 
PS1-Type   PS2-Type   Modem   Baud  Traffic Peak Peak-Time
---------- ---------- ------- ----- ------- ---- -------------------------
other      none       disable  9600   0%      0% Tue Jun 23 1998, 16:51:36
 
System Name              System Location          System Contact
------------------------ ------------------------ ------------------------
Catalyst 5000            Sunnyvale CA             sysadmin@corp.com
Catalyst 5000> (enable)

Setting the System Clock


Note You can configure the switch to obtain the time and date using the Network Time Protocol (NTP). For information on configuring NTP, see "Configuring NTP."

To set the system clock, perform this task in privileged mode:
Task Command

Step 1 Set the system clock.

set time [day_of_week] [mm/dd/yy] [hh:mm:ss]

Step 2 Display the current date and time.

show time

This example shows how to set the system clock and display the current date and time:

Console> (enable) set time Mon 06/15/98 12:30:00
Mon Jun 15 1998, 12:30:00
Console> (enable) show time
Mon Jun 15 1998, 12:30:02
Console> (enable)

Creating a Login Banner

You can create a single or multiline message banner that appears on the screen when someone logs in to the switch. The first character following the motd keyword is used to delimit the beginning and end of the banner text. Characters following the ending delimiter are discarded. After entering the ending delimiter, press Return. The banner must be fewer than 255 characters.

Configuring a Login Banner

To configure a login banner, perform this task in privileged mode:
Task Command

Step 1 Enter the message of the day.

set banner motd c message_of_the_day c

Step 2 Display the login banner by logging out and logging back into the switch.

This example shows how to set the login banner on the switch using the # symbol as the beginning and ending delimiter:

Console> (enable) set banner motd #
Welcome to the Catalyst 5000 Switch!
Unauthorized access prohibited.
Contact sysadmin@corp.com for access.
#
MOTD banner set
Console> (enable)

Clearing the Login Banner

To clear the login banner, perform this task in privileged mode:
Task Command

Clear the message of the day.

set banner motd cc

This example shows how to clear the login banner:

Console> (enable) set banner motd ##
MOTD banner cleared
Console> (enable)

Creating and Using Command Aliases

You can use the set alias command to define command aliases (shorthand versions of commands) for frequently used or long and complex commands. Command aliases can save you time and can help prevent typing errors when you are configuring or monitoring the switch.

The name argument defines the command alias. The command and parameter arguments define the command to enter when the command alias is entered at the command line.

To define a command alias on the switch, perform this task in privileged mode:
Task Command

Step 1 Define a command alias on the switch.

set alias name command [parameter] [parameter]

Step 2 Verify the currently defined command aliases.

show alias [name]

This example shows how to define two command aliases, sm8, that issues the show module 8 command, and sp8, that issues the show port 8 command. This example also shows how to verify the currently defined command aliases and what happens when you enter the command aliases at the command line:

Console> (enable) set alias sm8 show module 8
Command alias added.
Console> (enable) set alias sp8 show port 8
Command alias added.
Console> (enable) show alias
sm8             show module 8
sp8             show port 8
Console> (enable) sm8
Mod Module-Name         Ports Module-Type           Model    Serial-Num Status
--- ------------------- ----- --------------------- --------- --------- -------
8                       2     DS3 Dual PHY ATM      WS-X5166  007243262 ok
 
Mod MAC-Address(es)                        Hw     Fw         Sw
--- -------------------------------------- ------ ---------- -----------------
8   00-60-2f-45-26-2f                      2.0    1.3        51.1(103)
Console> (enable) sp8
Port  Name               Status     Vlan       Level  Duplex Speed Type
----- ------------------ ---------- ---------- ------ ------ ----- ------------
 8/1                     notconnect trunk      normal   full    45 DS3 ATM
 8/2                     notconnect trunk      normal   full    45 DS3 ATM
 
Port   ifIndex
-----  -------
 8/1   285
 8/2   286
 
 
Use 'session' command to see ATM counters.
 
Last-Time-Cleared
--------------------------
Thu Sep 10 1998, 16:56:08
Console> (enable)

Creating and Using IP Aliases

You can use the set ip alias command to define textual aliases for IP addresses. IP aliases can make it easier to refer to other network devices when using ping, telnet, and other commands, even when Domain Name System (DNS) is not enabled.

The name argument defines the IP alias. The ip_addr argument defines the IP address to which the name refers.

To define an IP alias on the switch, perform this task in privileged mode:
Task Command

Step 1 Define an IP alias on the switch.

set ip alias name ip_addr

Step 2 Verify the currently defined IP aliases.

show ip alias [name]

This example shows how to define two IP aliases, sparc, that refers to IP address 172.20.52.3, and cat5509, that refers to IP address 172.20.52.71. This example also shows how to verify the currently defined IP aliases and what happens when you use the IP aliases with the ping command:

Console> (enable) set ip alias sparc 172.20.52.3
IP alias added.
Console> (enable) set ip alias cat5509 172.20.52.71
IP alias added.
Console> (enable) show ip alias
default         0.0.0.0
sparc           172.20.52.3
cat5509         172.20.52.71
Console> (enable) ping sparc
sparc is alive
Console> (enable) ping cat5509
cat5509 is alive
Console> (enable)

Configuring Static Routes


Note For information on configuring a default gateway (default route), see the "Configuring Default Gateways" section.

In some situations, you might need to add a static routing table entry for one or more destination networks. Static route entries consist of the destination IP network address, the IP address of the next hop router, and the metric (hop count) for the route.

In software release 5.1 and later, the destination IP network address can be variably subnetted to support Classless Interdomain Routing (CIDR). You can specify the subnet mask (netmask) for a destination network using the number of subnet bits or using the subnet mask in dotted decimal format. If no subnet mask is specified, the default (classful) mask is used.

The switch forwards IP traffic generated by the switch using the longest address match in the IP routing table. The switch does not use the IP routing table to forward traffic from connected devices, only IP traffic generated by the switch itself (for example, Telnet, TFTP, and ping).

In software releases prior to release 5.1, the classful subnet mask is always used (you cannot specify the subnet mask for the destination network).

To configure a static route, perform this task in privileged mode:
Task Command

Step 1 Configure a static route to the remote network.

set ip route destination[/netmask] gateway [metric]

Step 2 Verify that the static route appears correctly in the IP routing table.

show ip route

This example shows how to configure a static route on the switch and how to verify that the route is configured properly in the routing table:

Console> (enable) set ip route 172.16.16.0/20 172.20.52.127
Route added.
Console> (enable) show ip route
Fragmentation   Redirect   Unreachable
-------------   --------   -----------
enabled         enabled    enabled 
 
The primary gateway: 172.20.52.121
Destination      Gateway          RouteMask    Flags   Use       Interface
---------------  ---------------  ----------   -----   --------  ---------
172.16.16.0      172.20.52.127    0xfffff000   UG      0           sc0
default          172.20.52.121    0x0          UG      0           sc0
172.20.52.120    172.20.52.124    0xfffffff8   U       1           sc0
default          default          0xff000000   UH      0           sl0
Console> (enable) 
 


hometocprevnextglossaryfeedbacksearchhelp
Posted: Mon Jul 19 12:41:33 PDT 1999
Copyright 1989-1999©Cisco Systems Inc.