C’est la vie, it has been almost a year since I posted on the blog, a year full of change, but here I am kicking up again with this simple short post about how scripting could save you time and effort on daily basis.
I know most of you might be using those free or commercially available applications to manage your daily work and they are all great; and I don’t want to convince you of reinventing the wheel but I am talking here about higher level of control over your very own, tailored to your specific needs tools.
OK, honestly I am combining both myself, I write scripts that interact with other available tools to get me exactly where I want to go. Here are some ways I use scripting everyday:
Managing/Creating configuration: In my daily work I usually need to apply thousands of configuration lines to a router or multiple to build some lab. There are many simple ways to automate this daunting operation using existing applications. But it gets harder when I need to write the configuration dynamically or on the fly, for example when I need to create hundreds/thousands of interfaces with some sequence, addresses or policies to test something. I usually use scripts to do the job for me.
Try WISB, it is small application that can be used to distribute the same piece of configuration to multiple devices automatically.
Collecting logs: This is another chore in our jobs, that is sometimes tricky. If troubleshooting problem or debugging how something works in details, mostlyI need to collect logs in a very systematic way or in specific order from multiple devices, and I always miss, if I do manually. Scripts can do a great job in helping you troubleshoot problems while having your lunch. A recent example was using a script to monitor a small memory leak problem in a production network which would have been very hard to spot manually.
Simulating scenarios: This is another good job for scripts simulating specific design issues/problems. I use this often in my daily work by combining my own scripts with other available tools I am usually able to come out with a specific scenario to test something. I use this for generating traffic patterns, flapping interfaces, crafting of packets or other application layer services (HTTP, FTP, etc) if needed.
Stress/performance testing: scripting also is very useful to stress test or measure the performance of some services or features on your routers or networks. Like for example testing same host (MAC/IP) enforcements, creating large number of connections to some service.
Finally Having Fun: writing scripts or automating operations is fun for many, it breaks the boring repetitive tasks by adding some spice and creativity to it. I spend sometime writing/editing/ debugging the script but once I am done; it acts like an employee that keeps working for me for free ( yes I am lazy but not very much) 🙂
So, my general advice to you would be; Go find a powerful Linux box in your network or lab and play with scripts that would save you time and effort in your daily operations and if you can’t write them yourself most probably you will find many ready available on the Internet out there. Also don’t forget about the scripting capabilities offered by the box itself, that’s a very handy tool too.
Happy Networking ..