FAQ banner
Get the Help and Supports!

This help center can answer your questions about customer services, products tech support, network issues.
Select a topic to get started.

ICT Tech Savings Week
2025 MEGA SALE | In-Stock & Budget-Friendly for Every Project

How to Save Running Config and VLANs on Cisco


Managing VLAN configurations on Cisco switches is critical for maintaining network stability, security, and compliance in your business network. However, many administrators overlook one crucial step: ensuring these configurations persist across device reboots and power cycles. This guide explains how to save VLAN configurations on Cisco switches using CLI, helping you avoid unexpected outages and unnecessary rework.

save configuration file vlan cisco cli switch

Understanding Cisco Configuration Memory: Running-Config vs Startup-Config

To effectively save configuration on Cisco switches, it’s essential to understand:

  • Running Configuration (RAM): The active configuration currently in use, stored in RAM. Changes here are temporary and will be lost if the device reboots.
  • Startup Configuration (NVRAM): The configuration loaded on boot, stored in NVRAM, persistent across reboots.

To make your VLAN and interface configurations permanent, you need to copy the running configuration to the startup configuration.


VLAN Configuration Storage: The Role of vlan.dat

Cisco Catalyst switches store normal-range VLANs (1-1005) in a separate file called vlan.dat located in flash memory.

The VTP mode affects how VLANs are saved:

  • VTP Server/Client: VLANs are saved in vlan.dat, not shown in show running-config.
  • VTP Transparent: VLANs are saved in both vlan.dat and running-config, visible in show running-config.

Extended-range VLANs (1006-4094):

  • VTP v1/v2: Supported only in Transparent mode, not saved in vlan.dat, requiring manual save with copy running-config startup-config.
  • VTP v3: Supports extended VLANs with propagation and saving in vlan.dat.


How to Configure VLANs on Cisco Switch

Basic VLAN configuration typically involves:

Switch# configure terminal
Switch(config)# vlan 10
Switch(config-vlan)# name Accounting
Switch(config)# interface GigabitEthernet1/0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10

For a detailed guide, check out how to configure VLAN on Cisco 9300.


How to Save VLAN Configuration Using CLI

Once VLANs and interfaces are configured, save your changes permanently:

Switch# copy running-config startup-config
Destination filename [startup-config]? [Press Enter]

Or using the alternative command:

Switch# write memory

Use these commands in Privileged EXEC mode (Switch#).

If you are in Global Configuration mode, use:

Switch(config)# do copy running-config startup-config


Why Saving VLAN Configurations Is Critical

Not saving VLAN configurations can lead to:

  • Outages: VLANs revert on reboot, causing lost connectivity.
  • Security Risks: Unsegmented networks exposing sensitive data.
  • Compliance Breaches: For industries requiring segmentation (PCI, HIPAA).
  • Operational Overhead: Reconfiguration after every reboot wastes time.


Best Practices for Saving VLAN Configurations

  • Test Before Saving: Verify VLAN functionality before committing.
  • Save Incrementally: After configuring VLANs or major changes.
  • Verify After Saving:
Switch# show startup-config
Switch# show vlan brief
  • Back Up Configurations: Use TFTP/FTP for external backups:
Switch# copy startup-config tftp:
  • Monitor VTP Mode: Ensure you understand where VLANs are saved.


How to Back Up a vlan.dat File

To back up the vlan.dat file that contains your VLAN configurations, copy it from the switch's flash memory to a TFTP or FTP server for safekeeping:

Switch# copy flash:vlan.dat tftp:
Address or name of remote host []? 192.168.1.50
Destination filename [vlan.dat]? [Press Enter]

This ensures you have a backup of your VLAN database, which can be restored if your switch is replaced or reset, helping maintain consistent VLAN configurations across your network.


FAQ

Q1: Does copy running-config startup-config save VLANs?

Yes, it saves VLAN configurations in Transparent mode and extended VLANs, but normal VLANs are managed in vlan.dat.

Q2: What is the difference between write memory and copy running-config startup-config?

They perform the same function; write memory is shorthand for saving the running configuration to startup.

Q3: What happens if I don’t save the VLAN configuration?

All VLAN and interface assignments revert to the previous state on reboot, causing potential outages.


Selecting the Right Cisco Switch for VLAN Deployments

  • For basic VLAN segmentation, consider: Cisco Catalyst 2960-XR Series Switches
  • For advanced VLAN needs and extended VLAN support: Cisco Catalyst 3850 Series Switches, Cisco Catalyst 9300 Series Switches
  • For stacking and scalability: Switches with StackWise support simplify VLAN management across multiple devices.


Conclusion

Executing copy running-config startup-config after VLAN configuration is non-negotiable for maintaining a stable, secure, and compliant network. It ensures your Cisco switches retain VLAN configurations across reboots, saving operational time and preventing outages.

Explore our range of Cisco Switches and Huawei Switches at router-switch.com to power your business network. If you need personalized recommendations for your VLAN deployment, our experts are ready to assist.


Categories: Switches