Friday, July 20, 2012

w00t! Show me the 10Gbps PF_RING love!

Many thanks to Luca Deri and Silicom USA for graciously supplying me with a shiny new dual-port Intel® X520-based 10 Gigabit PE210G2i9-T accelerated packet-capture card.

Now I have all of the proper network security implements of destruction to support wire-speed zero-copy DMA PF_RING deep-packet inspection at 10Gbps:
root@token:~# lspci | cut -d':' -f3 | grep Gigabit
 Intel Corporation 82579LM Gigabit Network Connection (rev 05)
 Intel Corporation I350 Gigabit Network Connection (rev 01)
 Intel Corporation I350 Gigabit Network Connection (rev 01)
 Intel Corporation 82599EB 10 Gigabit TN Network Connection (rev 01)
 Intel Corporation 82599EB 10 Gigabit TN Network Connection (rev 01)

root@token:~# dmesg | cut -d']' -f2 | grep NIC | grep dna
 igb: dna0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
 ixgbe 0000:05:00.0: dna1: NIC Link is Up 10 Gbps, Flow Control: RX/TX
Watch this space for more Ninja Master Packet Assassin™ goodness...

Saturday, July 14, 2012

Security Garlic: A Preview of Coming Attractions

Upon discovering the wonders of PF_RING with DNA, OpenvSwitch L4-hashed port-mirroring, Intel® VT-d / SR-IOV, KVM with VirtIO, and Security Onion, I just knew that these incredibly powerful tools belonged together.


So I'd say this a very early Alpha-stage implementation of what I'm looking to accomplish and document, but I have high hopes for success. The goal is to use the PF_RING DNA drivers (and possibly vPF_RING) to perform transport-layer 5-tuple hashing and load-balancing in hardware, and then hand off the resulting pieces to a team of virtualized network inspection engines for deeper analysis. On the right hardware (modern higher-end Intel NICs), DNA and SR-IOV allow us to perform all this work using Zero-Copy Direct Memory Access, eliminating the need to burn CPU cycles simply to handle interrupts from your NIC. That means more horsepower to inspect all those packets.

UPDATE: I've discovered that OpenvSwitch's L4-hashing mechanism for load-balancing currently only works when LACP is enabled on a bonded link. LACP breaks the technique I'm employing here because it requires that all of the composite members of the port-channel be connected to the same endpoint device. I may have to write some patches for OpenvSwitch to get this working the way I'd like... in the meantime this is still doable with PF_RING.

UPDATE 2: I may have spoken too soon. Perhaps this has already been addressed: http://openvswitch.org/pipermail/dev/2011-May/008934.html

Thursday, July 12, 2012

These Are a Few of My Favorite Things...

Rat's nests of CAT5, tracing with ping, these are a few of my favorite things... Especially when everything's all neatly connected to a single device that magically does everything I need. I'm still going to publish Part III of my guide on building Kenny, but in the meantime, I've found a fantastic replacement for a whole pile of old Linksys gear. I haven't named him yet, but I'm learning to love my new Mikrotik RouterBoard RB2011L, which I acquired for a quite reasonable $99 from r0c-n0c.com.


The user interface for this RouterOS-based device is awkward, non-intuitive, and very poorly documented. That said, this is an incredibly powerful device. I recommend that everyone buy one as soon as possible, before they stop making them. There are OpenWRT works-in-progress for other Mikrotik RouterBoard platforms, and I'm crossing my fingers that this one will be appearing on that list Real Soon Now.

Sunday, June 3, 2012

Network Monitoring at Home for Fun and Profit (Part II)

This is pretty complicated stuff, so I'm going to start out with a fairly long-winded and familiar analogy. If you're already well-versed on terms like MAC addresses and ARP caches, and the challenges of port mirroring, feel free to skip this part. Or not. You might learn something. I sure did. :-)

To expand on a time-honored metaphor often taught in computer networking classes, imagine that your home network is the postal service. It's the postal service's job to sort and deliver mail to the appropriate recipient, presumably at their home address. The postal service employs mail carriers to physically shuffle millions of properly addressed, stamped, and postmarked envelopes around the country to wherever they need to go each day.

Saturday, June 2, 2012

ZFS and DTrace on Ubuntu Linux

I know what I'll be doing this weekend...

"So, I had heard about ZFS and DTrace running on Linux. People have been working on them for years. Basically, since the time the technologies came out on Solaris. So, I decided to follow up on these ports and see what could be done. Luckily, I had great success in getting both to run on an Ubuntu server of mine. If you would like to do so as well, just follow the steps below."

http://liberumvir.com/2012/06/01/zfs-and-dtrace-running-on-ubuntu.html

Tuesday, May 22, 2012

Daemonlogger native package now in OpenWRT trunk!

Success! My patch for building Daemonlogger as a native OpenWRT package has been accepted into the mainline distribution and committed to trunk. Pre-built binary packages are now available for all supported architectures in the nightly snapshots tree. You'll find the appropriate .ipk for Kenny (a WRT150N) and similar Broadcom-based routers here.

Unfortunately these packages only work on the latest trunk firmware builds at the moment, and the 3.2 kernel along with the extra software included in these builds does not leave enough free JFFS space or usable RAM to run daemonlogger effectively. I'm trying to convince the developers to include this in the next stable release (Backfire 10.03.2) based on the 2.6 kernel, but no luck yet.

For the time being you can still grab my binary packages here from my GitHub repository. These *do* install and run cleanly on the current stable version (Backfire 10.03.1). For most Broadcom-based WRT-type devices, you'll want the brcm47xx build.

UPDATE: Binary daemonlogger .ipk packages for ALL OpenWRT-supported embedded devices and platforms are now available here: http://bit.ly/dl-owrt

Saturday, May 12, 2012

Meet Kenny :-)

Everything on my network is named after a character from South Park, and Kenny seemed like an appropriate name for this little fella because he died many, many horrible deaths along the way to getting this right.


After making all that fuss about missing those big boxes with shiny logos, I decided that Kenny deserved his very own piece of flair. Strangely, no one seems to make OpenWRT badges, so I got him the next best thing - a brushed aluminum Tux badge...

Friday, May 11, 2012

Network Monitoring at Home for Fun and Profit (Part I)

Who says you can't have professional, enterprise-grade network monitoring capabilities over your home or small office network for less than $100 worth of commodity off-the-shelf hardware? Not me! Often times, the surest way to get something difficult accomplished is to try to convince me that it can't be done. Impossible you say? That's crazy talk.

Recently I left a position that had afforded me the opportunity to play around with all kinds of fancy, expensive toys - the kind you might see sporting flashy logos with big names like Cisco and Gigamon and NetOptics. It wasn't very long after parting ways with my beloved magical boxes of networking tricks before I started getting that itch to tinker. Bad. I wanted my lab back, dammit.