Quickly Check Interface Status on Multiple Cisco Blade Switches in an HP C7000 Chassis

The HP blade server ecosystem is very flexible, especially when it comes to I/O connectivity modules, and one popular choice for Ethernet is the Cisco 3020 Blade Switch.  While the HP C7000 does help reduce the nest of physical cables found in a typical server rack, vSphere administrators are on their own when it comes to managing the individual blade switches — nothing new here, just another bespoke Cisco-powered network handcrafted by skilled artisans. It’s not uncommon to have four separate blade switch modules in a chassis, each corresponding to one Ethernet interface on an HP blade server.

Wouldn’t it be nice to have an easy way to quickly view the status of of all four interfaces connected to an individual blade server without having to telnet into four different blade switches and run IOS commands?  Enter clogin, a command-line utility that comes with the Really Awesome New Cisco config Differ (RANCID) tool suite, and should be packaged for most Linux distributions.

If you’re using Mac OS X, good news: RANCID is available through Homebrew.

$ brew install rancid

Once the package is installed, create a .cloginrc file (with 600 permissions) in your home directory with at least the following line to enable seamless authentication to the switches:

add password * {vty-passwd} {enable-passwd}

Now test a simple command to see if things are working:

$ clogin -c "show int status" cisco3020-1

if that is successful, you can create a simple shell script to automate logging into all four blade switches to get stats for a particular blade server.  For example:

if [ $# != 1 ]; then
 echo "Usage: $0 <blade #>" >&2
 exit 1
for i in 1 2 3 4; do
clogin -c "show int gi0/$blade status" cisco3020-$i | grep Gi0/$blade

Run the script and pass the blade number (typically from 1-16 on a C7000) for a quick glance at the status of all ports as well as the VLAN info:

$ blade_interface 8
Gi0/8 connected 2343 full 1000 1000BaseX
Gi0/8 connected trunk full 1000 1000BaseX
Gi0/8 connected 2343 full 1000 1000BaseX
Gi0/8 connected 1859 full 1000 1000BaseX

It’s not exactly software defined networking, but sure comes in handy when troubleshooting connectivity issues with blades.

(Visited 498 times, 1 visits today)
This entry was posted in Virtualizationism and tagged , , , . Bookmark the permalink.

1 Response to Quickly Check Interface Status on Multiple Cisco Blade Switches in an HP C7000 Chassis

  1. spayce says:

    Anything like this in RANCID for virtual connect modules

Comments are closed.