Lab Objective:
The focus of this lab is to understand Cisco IOS Configuration Archive implementation and configuration in Cisco IOS routers. Additional technologies include KRON.
Lab Topology:
This lab requires only a single router running, at a minimum, Cisco IOS Software 12.4 Mainline. The router should have at least one Ethernet interface. The primary purpose of this lab is to reinforce configuration knowledge of the stated chapter.
|
IMPORTANT NOTE If you have multiple devices and servers / hosts in your home lab and you would like to test solutions for topics such as Syslog, SNMP and NetFlow by setting up host and viewing charts or logging information, for example, please feel free to do so. While these labs include logging to ‘supposed’ hosts, there are no SNMP or Syslog servers in the http://www.howtonetwork.net racks and so you will not be able to test the solutions in those racks. If you only have a single router, you can bring up the Ethernet interface by implementing the following configuration: ! |
Task 1
Configure Cisco IOS Configuration Archive feature on the router. The router should store the archived configuration on an FTP server with the IP address 150.1.1.254. The router should include its hostname and timestamp in the configuration archive. The FTP server allows connections from user ‘secureconfig’ with a password of ‘h2n3tw0rk’. In addition to this, enables automatic generation of a configuration backup prior to a write memory orcopy running-config startup-config operation; however, scheduled backups should occur every 8 hours. Verify your configuration using the appropriate commands.
Task 2
To provide some redundancy to the IOS Configuration Archive feature, configure a Cisco IOS Command Scheduler (KRON) policy that will run thearchive config command every 24 hours. Verify your configuration using the appropriate commands.
Task 3
In the future, management would like QoS implemented. In the interim, they are considering implementing NBAR to determine what types of traffic and how much is received from the LAN. The network team has a daily 10AM meeting. Users typically come into the office between 8 and 8:30 AM. It is as this time that there will be a lot of traffic coming into the router from the LAN. To ensure that this data is not lost, configure the router to redirect to TFTP server 150.1.1.254 the output of the show ip nbar protocol discovery command every day at 8:30AM using KRON. Verify your configuration using the appropriate commands.
Lab Validation
Task 1
While the core tasks of this lab are straightforward, there is an additional element that has yet to be discussed. The Cisco IOS Configuration Archive feature supports the $h and $t variables which allow the device hostname ($h) and timestamp information ($t) to be used as the filename. For example, if the device is called R1 and these variables are used, the archived file would be named R1- Jun-15-19:09:41.264 for example. This task is completed as follows:
| Router(config)#hostname R1 R1(config)#interface fastethernet 0/0 R1(config-if)#ip address 150.1.1.1 255.255.255.0 R1(config-if)#exit R1(config)#ip ftp username secureconfig R1(config)#ip ftp password h2n3tw0rk R1(config)#archive R1(config-archive)#path ftp://150.1.1.254/$h$t R1(config-archive)#write-memory R1(config-archive)#time-period 480 R1(config-archive)#exit R1(config)#exit |
Next, verify your configuration using the show running-config command:
| R1#show running-config | section archive|ftp archive path ftp://150.1.1.254/$h$t write-memory time-period 480 ip ftp username secureconfig ip ftp password h2n3tw0rk |
Finally, verify archive operation using the show archive command. Notice the filename has is using the device hostname (R1) plus the timestamp (R1-Jun-15-19:39:26.191). The (-1) indicates that this will be the first file. If you have an FTP server connected to the router, you can set up an account and verify and test the Configuration Archive feature:
| R1#show archive The next archive file will be named ftp://150.1.1.254/R1-Jun-15-19:41:19.367-1 Archive # Name 0 1 [Truncated Output] |
Task 2
The archive config command allows you to manually archive the configuration file to the specified destination. To automate this process, we can leverage the Cisco IOS Command Scheduler (KRON) so that the router automatically performs this action. The same could also be performed using the Embedded Event Manager (EEM). This task is completed as follows:
| R1(config)#kron policy-list RUN-ARCHIVE-DAILY R1(config-kron-policy)#cli archive config R1(config-kron-policy)#exit R1(config)#kron occurrence BACKUP in 1440 recurring R1(config-kron-occurrence)#policy-list RUN-ARCHIVE-DAILY R1(config-kron-occurrence)#exit |
Next, verify your solution by viewing the router configuration:
| R1#more system:running-config | section kron kron occurrence BACKUP in 1:0:0 recurring policy-list RUN-ARCHIVE-DAILY kron policy-list RUN-ARCHIVE-DAILY cli archive config |
Finally, use the show kron command to verify policy occurrence schedule configuration:
| R1#show kron schedule Kron Occurrence Schedule backup inactive, will run again in 0 days 23:57:49 |
Task 3
The requirements of this task are fairly straightforward. This task is completed as follows:
| R1(config)#kron policy-list NBAR-STATISTICS R1(config-kron-policy)#$l-discovery | redirect tftp://150.1.1.254//NBAR.txt R1(config-kron-policy)#exit R1(config)#kron occurrence DAILY-NBAR-STATISTICS at 08:30 recurring R1(config-kron-occurrence)#exit |
Next, verify your configuration using the show running-config command:
| R1#more system:running-config | section kron kron occurrence BACKUP in 1:0:0 recurring policy-list RUN-ARCHIVE-DAILY kron occurrence DAILY-NBAR-STATISTICS at 8:30 recurring kron policy-list RUN-ARCHIVE-DAILY cli archive config kron policy-list NBAR-STATISTICS cli show ip nbar protocol-discovery | redirect tftp://150.1.1.254//NBAR.txt |
Next, verify KRON occurrence scheduling using the show kron schedule command:
| R1#show kron schedule Kron Occurrence Schedule BACKUP inactive, will run again in 0 days 23:23:33 DAILY-NBAR-STATISTICS inactive, will run again in 0 days 23:47:18 at 8 :30 on |
Final Router Configurations
R1
|
R1#term len 0 Current configuration : 1235 bytes R1# |