Configuration Management

Managing switch configurations including running-config, startup-config, and TFTP backup/restore operations

Basic Switch Initial Configuration

Configure essential switch settings including hostname, passwords, and remote access for network management.

Step 1: Enter privileged mode and global configuration

1
2
Switch>enable
Switch#configure terminal

Step 2: Set hostname and domain Configure the switch identity and domain information for proper network identification.

1
2
Switch(config)#hostname SW-CORE-01
SW-CORE-01(config)#ip domain-name company.local

Step 3: Configure console and enable passwords Set secure passwords for local and privileged access to the switch.

1
2
3
4
5
6
SW-CORE-01(config)#enable secret Cisco123!
SW-CORE-01(config)#line console 0
SW-CORE-01(config-line)#password Console123!
SW-CORE-01(config-line)#login
SW-CORE-01(config-line)#logging synchronous
SW-CORE-01(config-line)#exit

Step 4: Configure VTY lines for remote access Enable SSH and Telnet access with authentication for remote management.

1
2
3
4
5
SW-CORE-01(config)#line vty 0 15
SW-CORE-01(config-line)#password VTY123!
SW-CORE-01(config-line)#login local
SW-CORE-01(config-line)#transport input ssh telnet
SW-CORE-01(config-line)#exit

Step 5: Create local user account Add a local administrator account for secure remote access.

1
SW-CORE-01(config)#username admin privilege 15 secret Admin123!

Step 6: Configure management VLAN interface Set up an IP address for remote management access.

1
2
3
4
5
SW-CORE-01(config)#interface vlan 1
SW-CORE-01(config-if)#ip address 192.168.1.10 255.255.255.0
SW-CORE-01(config-if)#no shutdown
SW-CORE-01(config-if)#exit
SW-CORE-01(config)#ip default-gateway 192.168.1.1

Step 7: Generate SSH keys and save configuration Enable secure SSH access and save all configurations to startup-config.

1
2
3
4
SW-CORE-01(config)#crypto key generate rsa modulus 2048
SW-CORE-01(config)#ip ssh version 2
SW-CORE-01(config)#end
SW-CORE-01#copy running-config startup-config

Step 8: Verify the configuration

1
2
3
SW-CORE-01#show running-config
SW-CORE-01#show ip interface brief
SW-CORE-01#show users

Key Points:

  • Always use strong passwords with mixed case, numbers, and symbols
  • Enable logging synchronous on console to prevent command interruption
  • SSH keys are required for SSH version 2 functionality
  • Save configuration to avoid losing settings after reboot

Switch Running and Startup Configuration Management

Manage configuration files between RAM (running-config) and NVRAM (startup-config) for persistent switch settings.

Step 1: View current running configuration Display the active configuration currently loaded in RAM.

1
2
SW-CORE-01>enable
SW-CORE-01#show running-config

Step 2: View startup configuration Check the configuration that will load on next boot from NVRAM.

1
SW-CORE-01#show startup-config

Step 3: Save running config to startup config Copy the active configuration to NVRAM to make changes persistent across reboots.

1
SW-CORE-01#copy running-config startup-config

Alternative shorter command:

1
SW-CORE-01#write memory

Step 4: Load startup config to running config Replace current active configuration with the saved startup configuration.

1
SW-CORE-01#copy startup-config running-config

Step 5: Backup configuration to TFTP server Save configuration files to external server for backup and recovery purposes.

1
2
SW-CORE-01#copy running-config tftp://192.168.1.100/SW-CORE-01-backup.cfg
SW-CORE-01#copy startup-config tftp://192.168.1.100/SW-CORE-01-startup.cfg

Step 6: Restore configuration from TFTP server Load a previously saved configuration from external server.

1
2
SW-CORE-01#copy tftp://192.168.1.100/SW-CORE-01-backup.cfg running-config
SW-CORE-01#copy tftp://192.168.1.100/SW-CORE-01-backup.cfg startup-config

Step 7: Erase startup configuration Remove the startup configuration file to return to factory defaults on next boot.

1
2
SW-CORE-01#erase startup-config
SW-CORE-01#delete flash:config.text

Step 8: Compare configurations View differences between running and startup configurations.

1
SW-CORE-01#show archive config differences

Step 9: Verify file system and memory usage

1
2
3
SW-CORE-01#show flash:
SW-CORE-01#show version
SW-CORE-01#dir

Key Points:

  • Running-config is lost on power cycle if not saved to startup-config
  • Always verify backup/restore operations completed successfully
  • Use write erase as shortcut for erase startup-config
  • Configuration changes take effect immediately in running-config
  • TFTP transfers require network connectivity and proper server setup