You know those times when you paste innocuous config to a router and it just freezes up on you? Even if you know you’ve done nothing wrong it can be a few scary seconds until the router starts to respond again. While reading up on onePK I was trying to come up with a use case. Though I eventually thought about some other things that would actually be useful. The very first thing that came to mind was something to test just for fun. The prank Picture this; You ask a co-worker to login to a router and shutdown an interface which won’t be used anymore. Your colleague logs into the device and disables the interface and the session hangs. Only it doesn’t just hang, it’s dead and apparently your colleague can’t ping the device now. At this point it can be a good idea to ask your co-worker about what exactly he changed.
Even with people who work in networking, as soon as you say the word “firewall” a lot of people tend to stare at that far away place that only exists in their minds. I think some of this comes from the fact that “it’s not a router”. Another reason is that people just haven’t taken the time to get familiar with firewalls. The ASA is Ciscos firewall or VPN device. Though the ASA can do a lot of things, in this post I will cover the basics such as how you set it up and connect the device to the Internet.
It’s now over 10 years since I released the first version of SYDI-Server, back in August 2004. During the first years I wrote quite a bit of code and kept adding features to the different scripts. However, the last version SYDI-Server 2.3 was released in 2009. So one could say that development has slowed down a bit. However even today it gets a few hundred downloads every week. Even today I keep getting emails from people who’ve just found SYDI for the first time and are loving it.
At times when I look at the tools available for server admins today I long for the times when I didn’t work in networking. Sure we can use tools like Puppet and Ansible for networking too. However the tools are made for servers. Of course there are tie-ins into network automation, but the functionality is rudimentary at best. The current problem as I see it is the lack of decent APIs, granted some vendors are better than others. And I haven’t had the pleasure of working with those who understand XML. Sometime in a not too distant future when we have flying skateboards, SDN and nano bots these problems will disappear, but we’re not there yet. Before I take a deep dive to see what’s actually possible to do with onePK, OpenDaylight and all that good stuff I wanted to see how much is possible to do today. So this post is about Ansible which is really simple to learn and SNMP, where one of the words in the acronym is “simple”. It should be a perfect match, right?
If you’ve decided to try Nagios and install it through your distributions packaging system, you might notice that the version you get is quite old. Some features or addons you want might not work with earlier releases. So you decide to download the Nagios tarballs and install the old fashioned way. Though not as simple as just typing ‘yum install nagios’ or ‘apt-get install nagios3’, you really get the sense that you’ve done something. A problem with this approach is if you have to replicate it later, you might have forgotten some configure option you used or lost the list of prerequisites for various plugins. In a perfect world you would always document your setup. Unfortunately a lot of people don’t live in that perfect world. However on the bright side, there are tools like Ansible which lets you automate a lot of tasks. Another benefit in this case is that Ansible Playbooks also can serve as s system documentation.
RANCID is a config differ. In itself that’s just as boring as it sounds. However picture this; you’ve just arrived at the office after a maintenance window. End users have started to complain about systems which have stopped working. The technicians who worked during the night are sleeping and they seemed to have forgotten to document what they did. If you had it installed RANCID could have told you exactly what configuration the technicians changed. Aside from showing you what changed during last night RANCID shows you all the changes since it was introduced. So if you hade been using RANCID for three years it could show you all the changes on all your network devices since that time. Having all your configurations stored on the RANCID server also works as a backup. Though great for collecting device configurations you can also use RANCID to get specific information from your devices by sending a command to several nodes, such as “show ip route” or “show crypto pki certificates”. Taking it a step further you can use it to change configurations, so if you need to change an access list on all firewalls or routers you can use RANCID to do so. Though RANCID might not be perfect, it’s really simple to use. If you don’t have anything like it RANCID will be a great tool for you.
Even though you used a template to configure your network devices from the beginning, and you have policy in place which says that all your devices should be configured in the same way, you might have a vague sense that some of your routers aren’t configured according to the standard you’ve setup. In my experience if you have that vague sense, that’s enough to say that you have devices which aren’t configured as you would want them to be. There are a lot of great tools which can compare two files and show you where they differ. However if you have hundreds of routers and switches it’s just not that fun anymore. Also you might not want to compare the entire configuration files to each other as no files will be identical since they will have different hostnames, ip addresses and other local settings. nk-compare-configs.sh is a free tool which can help you identify which of your devices are deviating from your templates.
It’s always bad when a service fails. It’s worse when the failure could have been easily avoided. When you’re asked if it would have been possible to prevent the disruption you don’t want to answer; “Yes, but it would have taken ten minutes of my time.” Service failure due to certificate expiration is an example of a scenario which never needs to happen. Check Windows Certificate Expiration is a Nagios Plugin which warns you before a service fails. The plugin is part of Networklore Monitoring pack for Nagios. It is written in Powershell and queries a servers LocalMachine personal certificate store. Some type of certificates you can monitor using other plugins, such as check_http which can monitor certificates on ssl sites. This plugin is intended for other services where you don’t want to open up additional ports, or if you can’t access the certificate directly from your Nagios server. Once you have setup NSClient++ this plugin should take less than ten minutes so install.
Using templates to configure your network devices have several benefits. This post describe how you can use Numbers for Mac to create a dynamic template you can use to create new configuration files. If your network consists of several routers you generally want them to share as much configuration as possible with each other. Say you have several branch offices which all has a local router which connects to the data center. Chances are that those branch office routers will be configured in the same way. The difference in configuration will mainly be hostnames, ip addresses and perhaps access-lists. When it’s time to connect a new branch office you can cut and paste parts of the config from another router or you can use a template. In the network-device-template.numbers released in Nelkit, I’ve used a simple configuration for a Cisco 880 router. However the example can be used for any type of device which uses a text based config.
“No problems I said, I’ll just use SNMP to collect that.” Or so I thought. There are so many different MIBs so at times I just want to believe I can collect everything from SNMP. However once you have a specific need the information just isn’t there. It started with a simple question. Is there a better way to collect interface information? My client had been using Rancid to collect the output from “show interface”. This worked quite well until some hardware and software upgrades changed the output causing the parser scripts they were using to stop working. So I wrote a small script which collected the ifTable from IF-MIB and created a csv file. That was easy enough. But since this was so easy there were a few more things my client needed. They wanted to know which mac-domains used which port-channels on their Cisco uBR10012 routers. In this scenario a mac-domain is tied to a bundle interface and policy based routing was used to decide where the traffic from each bundle interface was sent.