We help IT Professionals succeed at work.

How do I clone/copy a Cisco 2960 layer 3 switch config to an identical Cisco 2960

Medium Priority
109 Views
Last Modified: 2019-12-10
I need to clone/copy a Cisco 2960 layer 3 switch config to an identical Cisco 2960.  I need to also copy the layer 3 configuration (routes, vlans, etc).  Anything I have seen only lets you copy the layer 2 config.  Yes I tried to Google the problem first, but there is not much I can find on how to do it.
Any help would be appreciated, thank you.

Steve
Comment
Watch Question

atlas_shudderedSr. Network Engineer
CERTIFIED EXPERT

Commented:
Why not just TFTP or SCP the running/startup config from the existing switch and then push it back to the new switch?  Once it is copied on, reload or, if you have copied over the startup config, run a copy start run to bring the config online.
Senior Network Engineer
Top Expert 2012
Commented:
The vlan database is stored in a file called vlan.dat, you can SCP/TFTP copy that as well to the new switch.
The L3 interface info should be in the normal running config, so you should be able to copy-paste from there, once the vlans exist on the new switch.

Author

Commented:
I will try moving the vlan.dat file.  Would you happen to know where the routes are stored?
TimotiStSenior Network Engineer
Top Expert 2012

Commented:
The static (and default) route is stored in the configuration, like the below snippet:
!
interface FastEthernet0/23
!
interface FastEthernet0/24
 switchport mode trunk
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
 no ip route-cache
 shutdown
!
interface Vlan2
 ip address 192.168.8.1 255.255.255.0
 ip helper-address 192.168.8.254
 no ip route-cache
!
interface Vlan3
 ip address 192.168.9.1 255.255.255.0
 ip helper-address 192.168.9.254
 no ip route-cache
!
!
ip route 0.0.0.0 0.0.0.0 192.168.8.254
ip route 10.0.0.0 0.0.0.255 192.168.9.254
!

Open in new window


So you can copy-paste them into the new switch.
Routes learned via routing protocols (RIP, OSPF, etc) are not stored in the config.
atlas_shudderedSr. Network Engineer
CERTIFIED EXPERT

Commented:
A note on the vlan.dat file.  I would run:

show vlan

Open in new window


on the existing device and then:

show run | inc vlan

Open in new window


If all the vlans (not including defaults, only configured) listed in the first are present in the latter then you shouldn't need to transfer the vlan.dat file.

Author

Commented:
What i learned from this experience is you should not copy and paste the entire file at one time.  When divided into chunks I was able to finally get it over to the new switch.
Thank you for your help.