Viewing and Saving Configuration Settings on a Catalyst 1900 or 2820 Switch

The commands to view and save the configuration settings on a Cisco 1900 switch are similar to those on a Cisco router, with a few small exceptions. To view general information about the switch itself, including its software version, hardware platform, MAC address, memory configuration, and so forth, use the show version command.

Cisco1912#show version
Cisco Catalyst 1900/2820 Enterprise Edition Software
Version V9.00.00
Copyright (c) Cisco Systems, Inc. 1993-1999
Cisco1912 uptime is 0day(s) 11hour(s) 04minute(s) 33second(s)
cisco Catalyst 1900 (486sxl) processor with 2048K/1024K bytes of memory
Hardware board revision is 5
Upgrade Status: No upgrade currently in progress.
Config File Status: No configuration upload/download is in progress
15 Fixed Ethernet/IEEE 802.3 interface(s)
Base Ethernet Address: 00-50-F0-5F-25-00

The startup configuration of a Catalyst 1900 switch is stored in NVRAM. However, you do not need to copy the running configuration on a switch to the startup configuration – the switch does this automatically as you make changes to the configuration. Because of this, you cannot view the startup configuration of a switch. However, you can view the switch configuration using the show run command, as shown below.

Cisco1912#show run
Building configuration...
Current configuration:
!
hostname "Cisco1912"
!
ip address 192.168.1.100 255.255.255.0
ip default-gateway 192.168.1.1
ip name-server 192.168.1.31
!
!
enable secret 5 $1$FMFQ$rUgP9HDSIlsHrXwg2kX7o0
enable password level 1 "CISCO"
enable password level 15 "CISCO99"
!
interface Ethernet 0/1
!
[output truncated]
!
interface Ethernet 0/11
!
interface Ethernet 0/12
!
interface Ethernet 0/25
!
interface FastEthernet 0/26
!
interface FastEthernet 0/27
!
line console
end
Cisco1912#

In cases where you want to erase the configuration of a switch, the command is delete nvram. It is worth noting that while this command deletes the majority of configuration settings, it does not delete any VTP settings that may exist. Deleting VTP settings is covered in another article.

Cisco1912#delete nvram

This command resets the switch with factory defaults. All system
parameters will revert to their default factory settings. All static
and dynamic addresses will be removed.

Reset system with factory defaults, [Y]es or [N]o?

To reboot a Cisco 1900 series switch, issue the reload command, and confirm.

Cisco1912#reload
This command resets the switch. All configured system parameters and
static addresses will be retained. All dynamic addresses will be removed.

Reset system, [Y]es or [N]o?

Configuring IP Address Settings on a Catalyst 1900 or 2820

By default, a Cisco 1900 switch will not have any IP address settings configured. When you do configure an IP address, subnet mask, and default gateway on a switch, you are not configuring a specific port, but rather a management address for the entire switch. This will ultimately allow you to access the switch via telnet, or one of the various web-based applications mentioned earlier. IP address settings are configured from global configuration mode using the ip address and ip default-gateway commands. I have also added the address of a DNS server, using the ip name-server command.

Cisco1912#config t
Enter configuration commands, one per line. End with CNTL/Z
Cisco1912(config)#ip address 192.168.1.100 255.255.255.0
Cisco1912(config)#ip default-gateway 192.168.1.1
Cisco1912(config)#ip name-server 192.168.1.31

To view the IP address configuration of the switch, use the show ip command from the privileged mode prompt. To get back to that prompt from global configuration mode, use either the exit command, or press Ctrl+Z. When entered on our Cisco 1900 switch, the Ctrl+Z command will not display ^Z.

Cisco1912(config)#exit
Cisco1912#show ip
IP Address: 192.168.1.100
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
Management VLAN: 1
Domain name:
Name server 1: 192.168.1.31
Name server 2: 0.0.0.0
HTTP server : Enabled
HTTP port : 80
RIP : Enabled
Cisco1912#

From the configuration shown above, notice that the switch is running an HTTP server for the purpose of allowing configuration via a web browser. The port number on which the HTTP server responds can be changed using the ip http port command, while the no ip http server command will disable the HTTP server completely.

Cisco1912(config)#ip http ?
port port
server Enable HTTP server
Cisco1912(config)#ip http port ?
<0-65535> HTTP port
Cisco1912(config)#no ip http server

Configuring Switch Passwords on a Catalyst 1900 or 2820

The commands to configure user and privileged mode passwords on a Cisco 1900 switch are slightly different than those learned earlier. To configure a user-mode password on a Cisco 1900, use the enable password command, followed by a level number and password. Level numbers range from 1 to 15. User-mode passwords fall into the numeric range 1-14, while a privileged-mode password uses level 15. The commands to add both a user-mode and privileged-mode password to a Cisco 1900 switch are shown below. It should be noted that these passwords are not encrypted, nor case sensitive, but must be between 4 and 8 characters in length.

Cisco1912(config)#enable password level 1 cisco
Cisco1912(config)#enable password level 15 cisco99

Much like on a Cisco router, a Cisco 1900 switch also allows you to apply a more secure enable secret password that supercedes any other privileged mode password that may have been configured. This password is set using the enable secret command, followed by the password of your choice. Enable secret passwords are encrypted, case sensitive, and can be up to 25 characters in length.

Cisco1912(config)#enable secret CiScO9999

Cisco Catalyst 1900 and 2820 Initial Switch Configuration

Much like the initial configuration of a Cisco router, the initial configuration of a Cisco Catalyst 1900 switch is handled via a connection to the switch’s console port. Located on the back of the switch, the RJ-45 console port uses the same connection parameters as on the Cisco routers we looked at earlier – 9600 baud, 8 data bits, no parity, 1 stop bit and no flow control. Remember that connecting to a console port requires you to use a rollover cable.

In most cases, you will connect to the console port only long enough to configure passwords, an IP address, and perhaps a hostname. After this initial configuration is complete, it is much more common (and convenient) to access the switch via a telnet session.

Once connected to the console port, you’ll be presented with the initial system configuration menu, as shown below. The menu-driven system is presented by default, and is the only console-configuration option on switches running Standard Edition software. While the menu-driven configuration may be easier in that you won’t need to remember specific commands, it can also be somewhat confusing, in that you will need to remember (or search) for specific configurable elements within the many menu options. Using the command line is generally a much quicker option, as long as you know the specific commands to enter.

Catalyst 1900 Management Console
Copyright (c) Cisco Systems, Inc. 1993-1999
All rights reserved.
Enterprise Edition Software
Ethernet Address: 00-50-F0-5F-25-00

PCA Number: 73-3122-01
PCA Serial Number: FAB03103IYN
Model Number: WS-C1912-A
System Serial Number: FAB0312S041
Power Supply S/N: APQ0252023A
PCB Serial Number: FAB03103IYN,73-3122-01
————————————————-

1 user(s) now active on Management Console.

User Interface Menu

[M] Menus
[K] Command Line
[I] IP Configuration
[P] Console Password

Enter Selection:

From the main menu, press K to access the command line interface (CLI). This will bring you to the user mode command prompt, distinguished by a simple flex bracket, as shown below. Think of this prompt as being similar to the user mode prompt on a Cisco router – although it allows you to view basic switch information, to do anything useful you’ll need to access privileged mode. The command to access privileged mode is one that you are already familiar with – enable.

Enter Selection: K

CLI session with the switch is open.
To end the CLI session, enter [Exit].

>enable
#

Notice that the enable command brings you directly to the enable mode prompt, the pound sign. Like with our routers, to change the configuration of the switch we will need to enter global configuration mode, using the configure terminal command.

#config t
Enter configuration commands, one per line. End with CNTL/Z
(config)#

The help system also works from the command line on a Cisco 1900 switch. Use ? to access a list of available commands. To view all commands starting with the letter S, use