Just another Cisco blog
Posts tagged IOS
Make IOS Like JUNOS
Mar 24th
Thought you guys would like the title.
Sorry for the lack of content lately, I’ve been very busy.
Today we’re going to explore the “archive” feature in IOS with a small “archive tutorial”. This was sparked by a recent comment on one of my JUNOS posts. The commenter said that the “archive” command in IOS is the same as “rollback” in JUNOS. They are similar, but “rollback” is there by default where you need to do some tinkering with “archive”. I’ve used it in the past, but never with the intention of mimicking JUNOS’s “rollback”.
Here’s the config:
EDGE(config)#archive EDGE(config-archive)#? Archive configuration commands: default Set a command to its defaults exit Exit from archive configuration mode log Logging commands maximum maximum number of backup copies no Negate a command or set its defaults path path for backups rollback Rollback parameters time-period Period of time in minutes to automatically archive the running-config write-memory Enable automatic backup generation during write memory EDGE(config-archive)#path disk0:config-backup EDGE(config-archive)#max 14 EDGE(config-archive)#write-memory |
To enter the config, we simply type “archive” in global config. There are quite a few options, as we can see. First we’ll need to set our path to store the archived configs, this is a 7200, so I’m using disk0 and a simple naming convention. Next we specify how many configs we want to backup, I’m using the maximum on my device, which is 14. Finally we set the “write-memory” command, which tells the router to archive the config anytime we save.
Cisco IOS Firewall Tutorial
Jan 25th
Awhile ago a friend asked me for a write up on IOS Firewall/CBAC. At the time I hadn’t felt like writing about it as I don’t use it much, but I recently had to configure it, so I thought I may as well take a break from Juniper posts and do the article.
The IOS Firewall uses CBAC (Context-Based Access Control) to inspect traffic flows at the upper layers. CBAC will inspect the outgoing traffic while maintaining stateful intformation for each session. It will then open pinholes in the firewall/incoming ACL to allow appropriate traffic back in. Something I forgot to point out, CBAC can be very CPU intensive, your traffic. Keep that in mind before and do some testing before deploying it on your network. Here’s the topology:

We have our router running IOS firewall, its WAN connection is on Fa0/1 out to the internet, and its LAN connection is on Fa0/0, which connects to some servers and workstations. Let’s configure the firewall:
Playing With EEM
Jan 5th
Yesterday someone asked me how to periodically save the running config using an EEM (Embedded Event Manager) applet. I’d never used EEM before (I’m terrified of code), but I decided to do some research to see how it could be done. It was surprisingly easy. Here’s what EEM is according to Cisco:
Embedded Event Manager (EEM) is a powerful and flexible subsystem in Cisco IOS that provides real-time network event detection and onboard automation. Using EEM, customers can adapt the behavior of their network devices to align with their business needs.
This applet was needed so the work done by his helpdesk team would be written to the config. They are given very limited access and are unable to execute the “wr” command. The first thing I gave him was this:
event manager applet WR_CONFIG event syslog pattern ".*%SYS-5-CONFIG_I.*" action 1.1 cli command "enable" action 1.2 cli command "wr" action 1.3 syslog msg "Config changed by user, new config has been written" |
Useful IOS Commands
Jan 4th
My “Show Run Variations” post sparked an interesting thread on Networking-Forum. I thought it would be nice to make a post with as many useful/little known commands as I can find. I might make a separate page for this depending on how much I can come up with and how frequently updates would be needed. Here we go:
show ip nbar protocol-discovery stats bit-rate top-n 10 |
This command will show you the top 10 protocols (that NBAR can see) on your router. I use this in an alias called “traffic”. You will also need “ip nbar protocol-discovery” enabled on interfaces you want to see statistics for.
show processes cpu sort |
This command will show the sorted CPU usage of all processes running on the router. You could also use “show proc cpu history” to see some ASCII graphs of CPU utilization.
reload in 5 |
Show Run Variations
Nov 28th
A recent thread on TechExams gave me the idea for a post on all the variations of the “show run” command. In this article I’ll go through the variations that I use the most, and some others that I don’t use much, but are pretty helpful.
Let’s take a look:
First we’ll look at all the options provided by IOS help:
EDGE#sh run ? all Configuration with defaults brief configuration without certificate data class-map Show class-map information control-plane Show Control-Plane information flow Global Flow configuration subcommands full full configuration interface Show interface configuration linenum Display line numbers in output map-class Show map class information policy-map Show policy-map information ssid Show Dot11 SSID information view View options vlan Show L2 VLAN information vrf Show VRF aware configuration | Output modifiers |
I’m sure everyone reading this has used good old “sh run” many times. What about the other options? I use “sh run interface” quite a bit:
EDGE#sh run int fa0/0 ... interface FastEthernet0/0 description OUTSIDE ip address xx.xx.xx.xx 255.255.255.248 ip access-group OUTSIDE_IN in no ip redirects no ip unreachables no ip proxy-arp ip accounting access-violations ip nbar protocol-discovery ip nat outside ip virtual-reassembly load-interval 30 duplex auto speed auto no cdp enable service-policy input QoS_IN service-policy output SHAPER end |
That and “sh run | section” are probably the variations I use most:
EDGE#sh run | sec ephone-dn ephone-dn 1 dual-line number 5001 no-reg primary label Colby name Colby ephone-dn 3 number 5003 no-reg primary label Laptop name Colby-Laptop ephone-dn 4 number 5004 no-reg primary name Wireless ephone-dn 5 number 5005 no-reg primary ephone-dn 6 number 5006 no-reg primary name Katie ephone-dn 11 dual-line number 555-555-5555 label 555-555-5555 name Colby |
That one is perfect for times when you are looking for specific parts of the config, without having to wade through everything.
A new one I just learned from Networking-Forum:
EDGE#sh run Building configuration... ! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec service password-encryption ! /ospf <--- I typed this filtering... router ospf 200 router-id 192.168.254.254 log-adjacency-changes network 192.168.5.0 0.0.0.255 area 1 network 192.168.13.0 0.0.0.3 area 0 network 192.168.254.254 0.0.0.0 area 0 |
Recent Comments