Labbing with a Cisco Catalyst 2950 Switch

View this project on GitHub

In this lab, I dig out an older Cisco Catalyst 2950 switch I've had sitting around, and demonstrate basic, managed switch configuration and administration. This is a fairly older model going back to the early 2000's. But is good for practicing and building up some basic switch management skills.


Connecting to the Switch

In this lab environment, I'm using a serial DB-9 to console port cable to connect the Cisco Catalyst switch to a Windows machine to operate it using PuTTY.

Here in the PuTTY interface, I'm opening a management session with the switch, via Serial connection COM1:

con1.png



Performing a Factory Reset

Performing a factory reset on a Cisco Catalyst 2950 switch to reconfigure it from scratch.

1. Running Factory Reset Commands


flash_init - Initializes the flash file system to access and manipulate files (like configs or VLAN data).
del flash:config.text - Delete the startup configuration file. 
del flash:vlan.dat - Deletes the VLAN database file.
fac4.png

2. Boot Command

Enter in the boot command to complete the factory reset.

fac5.png

3. Boot up

The IOS (Internetwork Operating System image is being loaded from flash memory.

The swtitch then initializes the flash file system again after loading the IOS.

This prepares the switch to access the saved files (e.g., new configs, logs, VLAN database).

It's one of the final steps before the switch reaches the interactive CLI or setup prompt.

fac6.png

4. Final Phase of Booting up

Here the switch is in the final phase of booting up after issuing the boot command.

The completion of the Cisco IOS boot process after a factory reset.

fac7.png

5. The Switch Has Fully Rebooted

Here, the system info is being displayed and is now waiting for the command prompt.

fac8.png

From here, the switch will prompt for different configurations to be set to set it up from scratch.





Configuring Switch from Scratch

1. System Configuration Dialog (setup Wizard)

After the switch is factory reset it'll go into the System Configuration Dialog (setup Wizard) of the Cisco Catalyst 2950.

Below in this example, I'm going to setup the switches hostname to MT0.

conf1.png

2. Password Setup

Here, the password is being set Enable Secret prompt.

This is the primary secure password for accessing privileged EXEC mode (MT0#)

The enable secret is stored in encrypted form in the config.

conf2.png

3. Security and Management Configuration

conf3.png

4. Interface Review Stage

conf4.png

5. Assign a Management Interface

After reviewing the interface summary, the switch prompts you to enter the interface used for network management.

Important: This is not asking for a physical interface like FastEthernet0/1.

Instead, it's asking you to specify a Switched Virtual Interface (SVI) - typically vlan1.

This tells the switch you want to assign an IP address to VLAN 1.

Which is the default management VLAN used on most Cisco Layer 2 switches (like the Catalyst 2950).

This step is critial - it gives the switch a Layer 3 address so it can be remotely managed over the network via Telnet, SSH, SNMP, or just to test connectivity via ping.

conf5.png
conf6.png
conf7.png
conf8.png

6. Enable Cluster Command Switching

After assigning an IP address to VLAN 1, the setup wizard prompts you to optionally enable cluster management:

Cluster Command Switching is a legacy Cisco feature that allows one switch - called the Cluster Command Switch (CCS):

To manage a group of other nearby member switches using Cisco Discovery Protcol (CDP).


Note: Cluster management isn't often used in modern production environments and has been largely replaced, by tools such as Cisco Prime Infrastructure, DNA Center, or other centralized configurations.

In this example, I'm going to enter in yes and enter the specified cluster name when prompted.

conf10.png

7. Review the Generated Configuration Script

Once you complete the Cisco Setup Wizard, the switch presents a preview of the configuration it's about to apply based on your responses.

This step is the final review before saving the configuration to NVRAM.

If everything looks correct, the next prompt will ask whether you'd like to save this configuration so it's retained after a reboot.

conf11.png conf12.png

8. Save or Discard the Configuration

After previewing the full configuration script, the Cisco Setup Wizard prompts you to choose what to do next:

In this example, I'm going to enter in 2 to save the configuration to NVRAM (startup-config) and exit to the command prompt.

conf14.png

After choosing to save the configuration, the switch writes the configuration to NVRAM and exits the setup wizard.

A message might come up that indicates the line protocol on vlan1 id down.

This simply means that there are no physical ports assigned to VLAN 1 are currently connected or active - a normal occurrence in lab setups.

Once a device is connected to a port in VLAN1, the interface will automatically come up.

conf15.png

9. Reboot to Switch Prompt

After the switch writes the configurations to NVRAM and reboots it'll prompt to Press RETURN to get started:.

Upon pressing enter it'll show the switch prompt > followed by the hostanem of thw switch.

conf16.png



Post Initial Setup

1. Enter Privileged EXEC Mode

After exiting the setup wizard and reaching the CLI, you're placed in User EXEC Mode (prompt ends in >), which provides limited read-only access.

To begin managing the switch, type enable

post1.png

This command elevates you to Privileged EXEC mode (prompt ends in #)

Where you can issue high-level diagnostic commands to enter configuration mode to make changes.



2. Enter Global Configuration Mode

Once you're in Privileged EXEC Mode,

MT0#, the command configure terminal or shortcut conf t takes you into Global Configuration Mode.

post2.png
post3.png

3. Change Switch Hostname

Once in Global Configuration Mode, one of the first things that can be done is changing the hostname of the switch.

In this example, I'll specify the new hostname to be switch1.

post4.png
post5.png

4. Setup MOTD Banner

Here, I'll setup and example banner to demonstrate the feature.

MOTD - Message of the Day banners are used to display a login message.

This is useful for compliance, legal disclaimers, or basic identification of the device's role on the network.

In this example, I'll specify the banner as "#CENTRAL SWITCH"#

post6.png

5. Secure Console Access with a Password

Setting this configuration sets it up for anyone who connects to the switch via the console port must enter a password.

It's a basic, yet essential security measure to prevent unauthorized physical access to switch settings.

post7.png

Here, we have finalized the basic management setup of the Cisco Catalyst 2950.

Securing the local (console) and remote (VTY/Telnet) acess with passwords, assigned an IP address to VLAN interface for management access, and configured a default gateway so the switch can communicate with devices outside the subnet.

post8.png

6. Configure Access Ports for Workstations

Here, I've configured the ports Fa0/1-24 as access ports for end user devices.

In this example, these ports are assigned to VLAN 1 and configured with descriptions for clarity.

The spanning-tree portfast is enabled to improve connection time for connected workstations.

post9.png

7. Exit, End, Write Memory

From there, type in exit, end, back to Privileged EXEC Mode and enter in write memory.

post11.png



Creating & Configuring VLANs

1. Create and Name VLANs for Logical Segmention

To get started with creating and configuring VLANs we need to first access Global Configuration Mode from Privileged EXEC Mode.

In this example, two VLANS: VLAN 10 (LAB-1) and VLAN 20 (LAB-2) are created.

VLANs allow you to segment the switch into multiple logical networks, even though all device are physically connected to the same hardware.

Naming the VLANs helps with organization and troulbeshooting.

vlan1.png

2. Assign Switch Ports to VLANs and Save the Configuration

In this step, physical switch ports to VLAN 10 and 20 using the interface range command.

Descriptions are added to document their roles.

After entering in the changes, save the configuration to NVRAM using write memory to make the setup persistent.

vlan2.png

3. Verify VLAN Configuration

After assigning ports to VLANs and saving the configuration, the command show vlan brief is used to confirm that every is correctly set up.

vlan3.png



Configuring Port Security

1. Configure Port Security on an Access Port

In this example, port security is configured on interfaceFA0/1 to restrict access to a single trusted device.

If another device attempts to connect, the switch will shut down the port as a security measure.

Enabling sticky MAC learning allows the switch to dynamically remember the allowed device.

Port security is a critical feature for preventing unauthorized devices on edge ports in secure environments.

portsec1.png

2. Verify Port Security on the Interface

After configuring port security, you can use the following command to verify the status and behavior of a specific port:


  show port-security interface fa0/1

Note: The Secure-down doesn't necessarily mean an error - it can just be nothing is plugged into the port.

When a device connects and a MAC is learned, this will change to Secure-up.

If an unauthorized device connects, the port will be shutdown and a violation count will increment.

portsec2.png



Setting up a SPAN - Switch Port Analyzer

Monitoring the network traffic that is passing through the switch can be implemented for various scenarios.

Whether it's monitoring and analyzing the security of the network, troubleshooting network communications, analyzing what protocols are in use across endpoints, etc.


Here, I'm going to demonstrate setting up and configuring a basic

SPAN - Switch Port Analyzer source and destination port on the switch.

To gather the network traffic from each endpoint connected to the specified port range.


1. Configuring a SPAN (Port Mirroring) Session

Setting this up configures a SPAN session.

To mirror traffic from several source interfaces to one destination interface for monitoring purposes.

span1.png

2. Verifying SPAN Configuration

This step verifies that SPAN session 1 is actively monitoring the correct source and destination interfaces.

span2.png

3. Capturing the Mirrored Traffic with Wireshark

In this SPAN port configuration setup, I have two Windows PCs, connected to fa0/5 - 192.168.1.104 and fa0/7 - 192.168.1.124

Along with another Windows PC running Wireshark plugged into the destination port fa0/9 to collect the network traffic of the devices connected to these interfaces.

wire1.png
wire2.png
wire3.png
wire4.png

Back to Home