Dockerizing IOS-XRv

I’ve been playing with docker off and on for about a year or so now. One of my ideas, with Docker, is to use it for my network lab. These days, I’ve mostly virtualized my lab. Lately, been doing a lot of it in VIRL, but this hasn’t stopped me from tinkering.

For a while, I’ve had a base docker container that sets up Open vSwitch and KVM. Once the docker container is started, you can access the container and spin up VM’s or play with Open vSwitch. The Dockerfile to set this container up can be found on my github.

The next iteration of this was to actually have the VM in the container and have it boot up directly. I did this with IOS-XRv. It’s a pretty straight forward set up. The Dockerfile uses centos:6 as its base, installs a couple yum repositories, installs needed packages, and adds the associated files. When it’s all done, you have a docker container that will run the IOS-XRv. You can spin this container up and down at will. It’s pretty nifty.

My next goal in this set up is to have the container generate dynamic mac addresses for IOS-XRv when it boots up. Currently the mac addresses are hard coded. The reasoning for this is that I eventually want Open vSwitch to connect to a ‘controller’ Open vSwitch via VXLAN or GRE. The purpose of this is to spin up multiple containers and have them all connect to each other. This will make the lab environment much more flexible and scalable.

Anyways, check out the docker-ios-xrv github for the README, Dockerfile, and associated files. I’ll post more when I have updates.

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone

April 5, 2015

Posted In: Cisco VIRL, Docker, IOS-XR, KVM, Linux, Miscellaneous Hacking, NFV, openvswitch, SDN, Software Defined Networking

pyMultiChange – SSH Script Update

I updated the ssh-multi.py script from my pyMultiChange repository. It’s now fully functional and allows you to enter ‘enable’ mode on Cisco routers and switches. As I’m using the paramiko library to interact with routers and switches via SSH, I had to switch from using the ‘exec_command’ API to invoke_shell, send, and recv API’s. It took a little more work – and I’m not completely thrilled with how the ‘recv’ API is implemented in paramiko, but it’s what we have to work with for now.

The pyMuliChange repository is available on my github.

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone

November 26, 2014

Posted In: Cisco Administration Python Scripting, Python Tips, Software Defined Networking