EarIier I wrote about some ways to modify VM disk images used by Unetlab. Basically it boils down to running a VM, console to it and change things through its shell. Obviously, this approach is no way near a handy way to do small changes like:
- loading basic config
- adding license files
In this post I will talk about
guestfish utility which is a part of
libguestfs tools set. With
guestfish one could easily get a shell-like access to the filesystem located on a disk image (qcow2, vmdk, iso and many others). That is how authors of
libguestfs tools describe it:
libguestfs can access almost any disk image imaginable. It can do it securely — without needing root and with multiple layers of defence against rogue disk images. It can access disk images on remote machines or on CDs/USB sticks. It can access proprietary systems like VMware and Hyper-V.
To demonstrate the way how guestfish works I will solve a particular task of adding a license file to Nokia (Alcatel-Lucent) 7750 Virtual Service Router (VSR) by embedding it to the disk image itself. Tune in!
I had plans to cover Nokia (Alcatel-Lucent) BGP Route Reflectors (BGP RR) in a full-featured post, but… But a lot of new stuff suddenly hit me as I joined Nuage Networks team.
Ok, lyrics aside, during my preparation for BGP exam I noticed that BGP route reflectors behavior defined throughout several chapters and there was no summary diagram (or cheatlist) that covered route reflectors decisions and actions. So, here you are:
This diagram shows the complete decision path of a BGP RR when it needs to reflect a route, including action items for different kind of neighbors (Non-client, Client, regular peer).
Note, that Nokia’s (Alcatel-Lucent) definitions were used for RIB structures (RIB-In, RIB-Out), though the decisions that RR has to make should no differ between vendors.
Download high-resolution file.
Just a quick reminder on STP election process (thanks to Dmitry Figol):
- Choose Root bridge:
- lowest Bridge ID (priority + system mac)
- all ports on a Root bridge are designated
- Choose Root port on each non-root bridge:
- lowest path cost to the root
- lowest neighbor Bridge ID
- lowest neighbor’s Port ID (port priority + internal port number)
- lowest local Port ID (port priority + internal port number)
- Choose Designated port on each segment.
- bridge with the lowest root path cost
- bridge with the lowest Bridge ID
- interface with the lowest Port ID
- All other ports are non-designated/blocking
One way to get PLAZA that was available since the beginning – is cloning the github repo and building python virtual environment with all the packages. And I understand that nowadays this way seems too complicated and the case is ideal for learning some docker!
Thus, I started to build web front-end to python scripts with these goals in mind:
- allow people with zero python knowledge to use the scripts by interaction through simple Web UI;
- make script’s output more readable by leveraging modern CSS and HTML formatting;
- aggregate all the scripts in one repo but in a separate sandboxed directories to increase code manageability.
This short demo should give you some taste of what it is:
Disclaimer: I am nowhere near even a junior python or web developer. And what makes matters worse is that I used (a lot) very dangerous coding paradigm – SDD – Stackoverflow Driven Development. So, hurt me plenty if you see some awful mistakes.
Last week I faced a routine (and quite common) task to get the latest backups of current configuration and BOF files for ~700 routers on a customers network. Sure thing sane man would use some automatization techniques, which could be:
- 5620 SAM scripts
- some scripting language to grab latest backups from the global NE backup location on a SAM server
I tried it both ways and invite you under the cut to read about it.
Virtualenvwrapper’s windows port (
virtualenvwrapper-win) helps to manage your venvs on windows platform, yet it is not so straigtforward about using hooks like
postactivate. That is what official documentation has to say about this:
To run some commands after mkvirtualenv you can use hooks. First you need to define VIRTUALENVWRAPPER_HOOK_DIR variable. If it is set mkvirtualenv will run postmkvirtualenv.bat script from that directory. Version 1.2.0 (16-03-2015)
I tried to set
VIRTUALENVWRAPPER_HOOK_DIR and place
postactivate.bat there, but it didnt work out. The workaround I found for emulating
postactivate behaviour is to edit
postactivate.bat which is located in
It became quite a pain to get Web-based console working on ESXi hosts or vCenter servers with deprecation of NPAPI plugins in modern browsers. As for me, the most comfortable method to get a remote console access is to use standalone Virtual Machine Remote Console client (VMRC) which is available for free for major OSes. The sad part about VMRC is that you have to login to ESXi web client/vCenter, choose a desired VM and click on Launch VMRC link to get access. Too many unnecessary and annoying steps to take.
In my day to day work I have to deal with 2-4 VMs and what I want is to have their consoles 1-click away. In this post I’ll share a tiny Python script which composes links for VMs suitable for VMRC: vmrc://firstname.lastname@example.org:443/?moid=vm-373 . Click on the previous link will trigger VMRC to connect to virtual console of a VM.
The DNS is defined in literally dozens of different RFCs. The terminology used by implementers and developers of DNS protocols, and by operators of DNS systems, has sometimes changed in the decades since the DNS was first defined. This document gives current definitions for many of the terms used in the DNS in a single document.
I saw this RFC has just been published and decided to save it here for further reference since DNS was always a mine field for me.