It is currently Thu Jul 19, 2018 3:09 pm


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to reset a cisco switch
PostPosted: Thu Jan 02, 2014 11:51 am 
Offline

Joined: Fri Dec 20, 2013 8:05 am
Posts: 8
Hi everyone!
What is the best way for restore devices to their default configurations? I got two units of cisco WS-C2960S-24TS-L, but they have configure files and vlan configure, so I want to reset them.I want to simulate this situation on gns3. May I get it?
I know these:
- use the erase startup-config command
- use the config-register 0x2102 command in global configuration mode




Top
 Profile  
 
 Post subject: Re: How to reset a cisco switch
PostPosted: Fri Jan 03, 2014 11:36 am 
Offline

Joined: Wed Nov 27, 2013 11:08 am
Posts: 66
Location: Portugal
Hi,

You have to:

erase startup-config
delete flash:vlan.dat

Regards.


Top
 Profile  
 
 Post subject: Re: How to reset a cisco switch
PostPosted: Sat Jan 04, 2014 12:09 am 
Offline

Joined: Fri Mar 05, 2010 11:33 am
Posts: 1494
Location: Australia
Quote:
- use the config-register 0x2102 command in global configuration mode
has nothing to do with switches - it is a router command.

However, in GNS3, RAM and FLASH work a bit differently to "real" equipment.

Firstly, you will ALWAYS loose your vlans on a GNS3 simulated switch (the NM-ESW16 module) unless you check the [x] Save nvrams including EtherSwitch VLANs and crypto keys option when you start a new project. This will actually cause a copy of the FLASH to be kept within your project, and any changes to flash (such as delete flash:vlan.dat will be immediate and persistent across reloads.

However, NVRAM (where the startup-configuration is kept) is not persistent. And of course GNS3 does not support the reload command, so when you reload a router in GNS3, you need to either Stop then Start the router, or reload it using the GNS3 Device | Reload menu (also accessible from the right-click menu).

What actually happens when you reload in GNS3, is that dynamips re-reads the startup configuration from your project's configs directory, or if there is no config for that router, loads the baseconfig.txt file (or whatever file you have nominated for that image). The implication of this is twofold:
  1. The erase startup-config command has no effect - it does NOT delete the startup file from your project's configs directory, and
  2. After you have made changes to your configs and issued a save startup-config command, the startup configuration is not yet saved in your project's configs directory - you must also issue a File | Save Project command to ensure your startup file is saved.

You can find out more about how GNS3 directories and files work in my book GNS3 Network Simulation Guide - here is a sample (without formatting - I loose the formatting when I cut and paste)
Quote:
Conceptualizing a project
The project you just created and saved was saved as a collection of files and folders. In this section, you will explore those files and where they live.
Use a file browser to browse to the location of your GNS3 Projects directory (typically on Windows this is %HOMEPATH%\GNS3\Projects; on OS X and Linux this is ~/GNS3/Projects).You should find, a directory there with the same name as the project you just created. Open that directory and you will see your topology. net file, a topology.png file, and four directories called captures, configs, qemu- flash-drives, and working. If you had not checked the Save nvrams including EtherSwitch VLANs and crypto keys option when you created your project, you would not see the working directory.
Some operating systems like to confuse users by hiding the ".net" and ".png" part of the filename, so you may see the topology.net and the topology.png files both listed simply as "topology".
The captures directory will hold the Wireshark packet captures. Wireshark is discussed under the heading Capturing Packets with Wireshark later in the chapter. The qemu-flash-drives directory will be discussed in Chapter 4, Unleashing Other Emulators.


Disclaimer: I am the author of the GNS3 Network Simulation Guide



_________________
RedNectar
http://rednectar.net
@rednectarchris
GNS3 WorkBench-a VMware image of Ubuntu with GNS3 and VPCS installed and a collection of exercises/labs


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO