Skip to main content

Posts

Pythonic surprises for a Java programmer - Part 1

I had been a hard core Java programmer through out my career and had moved onto Python a while ago. The transition to python was a roller coaster ride of moments of unbridled exultation, deja vu and mirth followed by those of horror, surprise and deep disgust. Just to crib a bit, Python does not provide encapsulation...arrrghhhhh!!! and the best way to prevent people from calling an internal method seems to be to request them not to do so. """      This method is meant to be consumed locally.      Don't call it from outside.... please please please :( """ def _do_something_internal():     -----------------     ----------------- This blog (and a few subsequent ones, hopefully) will capture my observations on some gotchas that "pleasantly" surprise people coming from the Java domain (may be relevant to other languages as well). Variable Scoping Scenario 1 : def method1():     try: ...

How to setup Juniper's Openstack FWaaS Plugin

I have written a tech wiki article on how to install Juniper's OpenStack FWaaS Plugin @ http://forums.juniper.net/t5/Data-Center/How-to-set-up-OpenStack-firewall-as-a-service-plugin-for-SRX-and/ta-p/282050 This article covers the configuration that needs to be done on the OpenStack side as well as the configuration that needs to be done for the plugin. A reference topology is used and the whole configuration is done as a walk through using the reference model.

Creating Juniper VSRX 2.0 VM on Virtualbox

Juniper has come out with their latest version of VSRX 2.0 (formerly called as Firefly or VSRX 1.0). This release supports a broader set of features and is more performant than the earlier version. More details about the product can be obtained here I had recently tried out instantiating VSRX 2.0 on Virtualbox. The process required a few minor tweaks and this blog will cover them. Prerequisites Download VSRX KVM Applicance from Juniper Website (You need to take care of the legal formalities) Virtualbox 4.3 and above Download qemu-img converter for Windows  The image provided by Juniper is in QCOW2 format. In order to use it in Virtual box you need to convert it to VDI format. To do this you can use the tool qemu-img converter as follows: #qemu-img.exe convert media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.qcow2 -O vdi vsrx2.0-1.vdi The conversion will take a few seconds and you should have the VDI created in the directory. At this piont, you can proceed to create a VM by f...

Scrapy : A python framework for web crawling

Scrapy in the words of its creators: "Scrapy is an application framework for crawling web sites and extracting structured data which can be used for a wide range of useful applications, like data mining, information processing or historical archival."  A screenshot grabbed from the site shows how concise the working code can be: Scrapy works only with Python 2.7. The objective of this blog is to get you started with Scrapy and provide you with enough information to carry further on your own. In this blog, I will setup a scrapy project and retrieve some data off my blog site. Pre-requsites Python 2.7 pip and setuptools Python packages. lxml . Most Linux distributions ships prepackaged versions of lxml. Otherwise refer to http://lxml.de/installation.html OpenSSL . This comes preinstalled in all operating systems, except Windows where the Python installer ships it bundled. Setup pip install scrapy Create a Project scrapy startproject blog This comman...

OpenStack Kilo MultiNode VM Installation using Centos 7 on VirtualBox

In this blog, I will walk you through the steps that need to performed to create a MultiNode OpenStack Kilo setup running on Centos 7 VMs. The resultant network topology will be as follows: Pre-requisites VirtualBox A Laptop or Server with 16 GB RAM and around 20 GB free hard disk space CentOS 7 Minimal ISO Internet Connectivity

Juniper Inter VLAN routing in 3 ways explored

When inter VLAN routing needs to be configured on Juniper devices the first thing that comes to mind is to use RVI (SVI in cisco land) and be done with it. But, there are certain situations where this approach may not work and this article explores the alternative ways of configuring inter VLAN routing on Juniper devices. Lets say we have a router on a stick topology where an MX/SRX is acting as the router. Depending upon whether its MX or SRX the approach to configure inter VLAN routing varies. The below picture acts as our reference topology for this article: In this topology, we have a switch which has two VLANs 100 & 200 and the tagged packets are sent across to MX/SRX on a trunk port ge-0/0/1. VLAN 100 is assigned to a subnet 10.1.0.0/24 having a gateway ip set to 10.1.0.1. Similarly, VLAN 200 is assigned to a subnet 10.2.0.0/24 having a gateway ip set to 10.2.0.1 Note : In this article I will use an RI instead of the global routing table. Scenario 1 (RVI) ...