RR Labs

A blog by Andrea Dainese

Login to Cisco ACI using API

This post summarizes how to login to a Cisco ACI fabric using API via curl. Login The login process set a cookie and give a token. Both are needed to send other API requests: # curl -c /tmp/cookie -b /tmp/cookie -k -s -X POST -d '{"aaaUser":{"attributes":{"name":"admin","pwd":"password"}}}' -H 'Content-type: application/json' 'https://172.25.82.1/api/aaaLogin.json?gui-token-request=yes' | python -m json.tool | grep urlToken Refresh A refresh is used to reset the session timer: # curl -c /tmp/cookie -b /tmp/cookie -k -s -X GET 'https://172.

Evaluating security of RFID/NFC implementations

Many companies relies on RFID (Radio-frequency identification) tags for many apects. Employer badges are often RFID based and allow to unique identify, authorize and account each employer. Other companies use simple RFID tags or the more evoluted NFC smartcards to identify and billing for services. Many home alarm systems use RFID tags to manage arm/disarm operations. Moreover RFID tags are used to identify goods within stores or buildings in general.

Social Networking in action

I spent the last two days presenting and meeting people. I have to admin that I enjoyed a lot and It was a pleasure meet so many interesting people. After lot of months, the Automate ITĀ² went live. Not so much attendees, but some of them came from abroad, and they were happy about the event itself. I especially enjoyed the presentation of Xavier Homs from Palo Alto; it was about a real automation case study on automatic firewall policy generation from a CMDB.

A CMDB for IT infrastructures

Can we use a CMDB for the whole IT management? In this post we’ll see what a CMDB should be, and we’ll see how to import existing network devices into a CMDB using NAPALM. Finally we’ll see how to operate on network devices from a CMDB and how pushing configurations. This is a compendium to my speech in Milano for AutomateITĀ² event. Suppose an IT manager is asking for the total number of active VMs to his staff:

The Darwin's Law of Evolution for computers

We’re leaving in the ‘hype’ era, where everything is sold as the Holy Graal for a non real-problem. Let’s try to analyze things with a critical eye. Pushed by a friend, who is writing a couple of very good posts I recommend12, I’m now sharing my thoughts about automation, future of network engineers, AI and so on. Of course this is the point of view of my mind, as a result of 20 years playing in the IT world at both work and home.

Machine learning on NetFlow/IPFIX with ELK for free

The ELK (Elasitsearch, Logstash and Kibana) stack provide also a Machine Learning engine, included in the X-Pack plugin. Let’s see how to install it and how to detect anomalies in our network using NetFlow/IPFIX. Install X-Pack for a RPM installation # /usr/share/elasticsearch/bin/elasticsearch-plugin install x-pack # service elasticsearch restart # /usr/share/logstash/bin/logstash-plugin install x-pack # service logstash restart # /usr/share/kibana/bin/kibana-plugin install x-pack # service kibana restart Login to Kibana usint elastic username with password changeme.

ELK as a free NetFlow/IPFIX collector and visualizer

The ELK (Elasitsearch, Logstash and Kibana) stack is one of the most flexible and open source system to store, search and visualize logs.i This post summarizes how to use ELK to store NetFlow/IPFIX data and draw some interesting graphs. Installation There are many ways to install ELK, I suggest to get latest packages from ELK website. I’m using RPM installed into a CentOS 7. Installing RPMs are out of scope, but remember to enable and start them at boot:

Management RADIUS authentication on Cisco ISE

Configuring RADIUS authentication on Cisco ISE for management access is pretty simple and takes just few minutes. Login to ISE as administrator, and go to Administration -> External Identity Sources -> Radius Token. Add a new source: Go now to Administration -> Admin Access -> Admin Users and add all administrator as external user: Remember to set at least one admin group.

Dealing with SNMP on Linux

Every time I need to work with Linux SNMP utilities, I have to re-learn some commands. This post summarize useful SNMP commnads for anyone who need a reference guide. Common options Usually I need to build a custom and trusted MIB repository. Every SNMP utility can take the following flags: -M takes one or more directory where look for MIB file. -m selectively load MIB files from the above directories.

Automatic network discovery and documentation

NetBrain is a famous software that allows network discovery (and management). Let’s focus now on network discovery and documentation: we want to automatically discover network devices, how they’re connected, and store everything into a version control repository (GIT/CVS). So we want to: discover all network devices; map how they’re connected together; track changes automatically; store everything into a version control repository (GIT/CVS); visualize any updated map with a simple browser.