The Host Network Stack

This post is a collection of useful articles/videos that I’ve collected about networking on XenServer and Linux. XenServer Xen Network Throughput and Performance Guide (Technical Overview) XenServer: Under the Hood < Specifically device -> PIF -> network -> VIF relationship Linux (video) Through the Ether and Back Again < discusses python and the Linux Sockets API How SKBs work Queueing in the Linux Network Stack Linux Advanced Routing & Traffic Control HOWTO Linux Device Drivers 3rd Edition < specifically chapter 17 As you can see, there are a multitude of elements to consider when looking into host networking issues for a Linux VM running on XenServer (which is Linux underneath the covers anyway)....

February 5, 2014 · itsahill00

Managing Nagios Configurations

There’s a good talk given by Gabe Westmaas at the HK OpenStack Summit: The talk describes what Rackspace monitors in the public cloud OpenStack deployment, how responses are handled, and some of the integration points that are used. I recommend watching it for OpenStack specific monitoring and a little context around this post. In this post I am going to discuss how the sausage gets made - how the underlying Nagios configuration is managed....

January 22, 2014 · itsahill00

Determining Enabled VLANs from SNMP with Python

Similar to this thread, I wanted to see what VLANs were allowed for a trunked port as reported by SNMP with Python. With the help of a couple of colleagues, I made some progress. [code language=“python”] vlan_value = ‘000000000020000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000’ for key,value in enumerate(format(int(vlan_value, 16), “0100b”).rjust(len(vlan_value) * 4, ‘0’)): … if value == ‘1’: … print key … … … 42 146 [/code] Convert the string returned to Hex Convert that to Binary Right fill 0s to the appropriate length to give offset (determined by the size of the string) Loop through the resulting value and each character that is a 1 is an enabled VLAN on the port In conjunction with LLDP, I’m able to query each switch/port and interface is connected to and determine if the VLANs are set properly on the port....

December 13, 2013 · itsahill00

Personal Backups with Duply

A month or two ago I finally went through all the old hard drives I’ve accumulated over the past decade. I mounted each of the disks and moved a bunch of files onto my desktop’s drive. There were lots of photos from the drives that I don’t want to lose so I decided to get a little more serious about backups. I decided to give Duply a go. Duply is a wrapper for duplicity, which underneath it all uses the tried and trusted rsync....

December 8, 2013 · itsahill00

Network wiring with XenServer and Open vSwitch

In the physical world when you power on a server it’s already cabled (hopefully). With VMs things are a bit different. Here’s the sequence of events when a VM is started in Nova and what happens on XenServer to wire it up with Open vSwitch. nova-compute starts the VM via XenAPI XenAPI VM.start creates a domain and creates the VM’s vifs on the hypervisor The Linux user device manager manages receives this event, and scripts within /etc/udev/rules....

June 26, 2013 · itsahill00

Measuring Virtual Networking Overhead

After discussing [ovs-discuss] ovs performance on ‘worst case scenario’ with ovs-vswitchd up to 100%. One of my colleagues had a good idea: tcpdump the physical interface and the vif at the same time. The difference between when the packet reaches the vif and the packet reaches the physical device can help measure the amount of time in a userspace->kernelspace transit. Of course, virtual switches aren’t the only culprit in virtual networking overhead- virtual networking is a very complex topic....

May 29, 2013 · itsahill00

Deep Dive: HTB Rate Limiting (QoS) with Open vSwitch and XenServer

DISCLAIMER: I’m still getting my feet wet with Open vSwitch. This post is just a cleaned up version of my scratchpad. Open vSwitch has a few ways of providing rate limiting - this deep dive will go into the internals of reverse engineering an existing virtual interface’s egress rate limits applied with tc-htb. Hierarchy Token Bucket (htb) is a standard linux packet scheduling implementation. More reading on HTB can be done on the author’s site - I found the implementation and theory pretty interesting....

April 29, 2013 · itsahill00

Using Swift and logrotate

Ever have an exchange like this? Q: What happened on this service? A: We can’t keep logs on the server past 2 months. Those logs are gone. Just about every IaaS out there has an object store. Amazon offers S3 and OpenStack providers have Swift. Why not just point logrotate at one of those object stores? That’s just what I’ve done with Swiftrotate. It’s a simple shell script to use with logrotate....

March 31, 2013 · itsahill00

Home Lab setup

Hardware: Dell XPS 8500 Intel i5 RAM + SSD upgrades from Crucial Local Storage (1T) Software: Fedora Core 18 (base OS) VirtualBox Vagrant DevStack XenServer 6 I’m setting up a home lab to do some light coding on OpenStack and for testing implementations of next generation software/hardware deployment tools like BOSH and Razor.

March 31, 2013 · itsahill00

the grep is a lie

grep is a wonderful tool for digging through logs on specific issues, but there are a few cases when people misuse it and claim the logs don’t have the answers when grep didn’t yield an answer. Here’s an example of Rails application logging from Ruby on Rails Guides: Processing PostsController#create (for 127.0.0.1 at 2008-09-08 11:52:54) [POST] Session ID: BAh7BzoMY3NyZl9pZCIlMDY5MWU1M2I1ZDRjODBlMzkyMWI1OTg2NWQyNzViZjYiCmZsYXNoSUM6J0FjdGl vbkNvbnRyb2xsZXI6OkZsYXNoOjpGbGFzaEhhc2h7AAY6CkB1c2VkewA=--b18cd92fba90eacf8137e5f6b3b06c4d724596a4 Parameters: {"commit"=>"Create", "post"=>{"title"=>"Debugging Rails", "body"=>"I'm learning how to print in logs!...

December 28, 2012 · itsahill00