Showing posts with label Cisco. Show all posts
Showing posts with label Cisco. Show all posts

Friday, 11 April 2014

Remembering Cisco Logging Levels:



Remembering lists can be dry and difficult; I like to use the journey method and take myself on a journey through a list.   Once I have the headings down I can then "tag" on the additonal knowledge, it's a bit like making a framework to build on.

Here is an example I used to remember the Cisco logging levels, if your studying for the troubleshooting exam this one should be burned into your head!

The error levels:

0 – Emergencies  - There was an emergency
1 – Alerts – You alerted the police
2 – Critical Conditions – A man was in a critical condition
3 – Errors – This was an error he was fine
4 – Warnings – you got a warning for wasting police time
5 – Notification – They sent you a notification of it
6 – Information – It contained information
7 – Debug – the man was only suffering from debug that everyone else has.

This then simply becomes:

There was an Emergency, you Alerted the police! A man in Critical Condition, however this was an Error, you received a Warning from the police for wasting their time.  A Notification arrived that contained Information that he just had Debug that everyone else had.

After studying the art of "remembering" there are some useful things you can do to help yourself, the more ridiculous or funny you make your journey the more likely you are to remember it.  Visualise your journey as if it was actually something you did, these reinforce the memory and help your mind retain it.

Apparently this phenomenon is related to the way our memories evolved from the Cave man days where things would be remembered in the form of a journey and drawn on cave walls, our minds are still wired to work that way!

The whole area of how we remember and the techniques used to improve memory can make for fascinating reading.   If you want to learn more google for "the link system".

Tuesday, 18 March 2014

Cisco Archive Command and Associated Features:

Introduction:


The cisco archive feature is a cheap way to automatically maintain copies of your router configuration files.  You can make automatic backup copies at specified intervals to a variety of locations such as local flash memory or a remote FTP server.   This lab will focus on backing up to an FTP server.

Requirements:

1 x Cisco 2960-s (any device that supports the cisco archive features will do)
1 x Machine with an FTP server set up and a username and password configured.  This lab utilises filezilla ftp server available from https://filezilla-project.org/


If you want to set up a windows 2012 FTP server for this purpose here is a guide I found:
https://social.technet.microsoft.com/wiki/contents/articles/12364.windows-server-2012-ftp-installation.aspx

Assumptions:

1.       Server has an OS preconfigured with an IP Address that can reach the cisco device and vice versa.

Diagram:




Step 1 - test reach-ability:

Make a quick ping to the server from the switch to ensure you have two-way reachability.




Step 2 – Your FTP Server should be configured as follows:

1.       Listen on Port 21
2.       Create a username and password of
a.       Username=Cisco
b.      Password=password
3.       Read and write privelages on the ftp directory

Step 3- Create an FTP username and password pair on your device

Enter the following commands:
Switch(config)#ip ftp username Cisco
Switch(config)#ip ftp password password

Step 4 – Set up the archiving of your configuration using the archive command:

Enter the following commands:
Switch(config)#archive
Switch(config-archive)#path ftp://172.16.49.89/test-config
Switch(config-archive)#write-memory

Step 5 – Testing your archive configuration

A quick test on your archive configuration can be performed by initiating a manual archive by issuing the command below which should echo a successful write result:
Switch#archive config
Writing test-config-Mar--1-00-06-40-4
Troubleshooting tip:  if this doesn’t occur or you see the following logging output: %ARCHIVE_CONFIG-4-ARCHIVE_SKIPPED: Archive of router configuration was skipped due to a previous initiation.
The cure is to reboot your device, now obviously on a production device this may not be possible, I have searched for other solutions and so far I haven’t found any.  If you have a good explanation of why this occurs or a no reboot cure let me know!

SOLVED:  Thankyou to the poster below who noted that issuing the no archive command and then re-issuing the archive command will solve it!

Step 5 – Some Options

You can set the maximum number of backups to keep, the behaviour of this command means the oldest backup will be overwritten by the latest once your maximum limit has been reached.  Unfortunately this doesn’t work when backing up to a network location only when backing up to a local flash device.
Switch(config-archive)#maximum [maximum number 1 – 14]
In order to set when you backup you use the time-period command and specify the number of minutes between backups.  For example: if you wished to back up once a day you would issue the following command with 1440 minutes (60 x 24).
Switch(config-archive)#time-period [time in minutes between each backup]

Step 7 – Exploring associated show commands:

The most useful show command utilised with the archive function is the obviously titled “show archive” which will give you the following information:
·         The maximum number of archives allowed
·         Archive location
·         Time and date the archive was configured
·         The most recent archive created




Step 8 – Using the configure replace command with the archive function:

One of the advantages of the archive command is to enable you to rollback to a previous archive configuration without interrupting the operation of the device.  The following example demonstrates this:
Issue the following command:
Switch(config)#interface gigabitEthernet 1/0/1
Switch(config-if)#description TEST FOR ROLLBACK
You have now changed the running config, now we will rollback to a previous configuration that will remove this change!
TIP! Issue a show archive command first and you can copy and paste the ftp location and filename from the output to paste into the configure replace command.
Issue the following command:
Switch#configure replace ftp://172.16.49.89/test-config-Mar--1-00-17-28-15
This will apply all necessary additions and deletions
to replace the current running configuration with the
contents of the specified configuration file, which is
assumed to be a complete configuration, not a partial
configuration. Enter Y if you are sure you want to proceed. ? [no]: y
Loading test-config-Mar--1-00-17-28-15 !
[OK - 15536/4096 bytes]

*Mar  1 00:34:12: Rollback:Acquired Configuration lock.
The rollback configlet from the last pass is listed below:
********
!
!List of Commands:
no end
archive
 time-period 1
interface GigabitEthernet1/0/1
 description vlan 25 ports
line con 0
 login authentication con
end
********


Rollback aborted after 5 passes

As you can see it successfully removed the interface description from port gigabitethernet 1/0/1
Windows FTP Alternative:

If you want to set up a windows 2012 FTP server for this purpose here is a guide I found:
https://social.technet.microsoft.com/wiki/contents/articles/12364.windows-server-2012-ftp-installation.aspx