Lookout if you process Cisco IOS-XR configuration files

I lost too much time just doing a simple script: checking for a class-map configuration across several backup configuration files. And it never matched!

The problem should be with me or my script as I knew it was all ok on some of the files.

However after bouncing my head several times I found the issue.

Some of the configuration has trailing spaces at the end of the line!

At first I thought it was may be a problem with RANCID. But it was not.

To make this visible I just issued something like this at the router prompt

sh run | b ^class-map match-any CORE-VOICE

And copy-pasted some lines to vim that gave me this


The red squares show that there are spaces at the end of two lines!

It’s a nice feature to have active on vim. Just add these two lines to your ~/.vimrc

highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/

So, next time you have to chew some IOS-XR configurations files don’t forget to right trim all those lines!


The Joy of Wrong

I’m writing down this excerpt from “Poke the Box” by Seth Godin, as a reminder that we have to start and deliver. Even if it’s not the ideal solution for our application, program module, system integration, or network design. If we don’t have that initial stuff running we may procrastinate and spend all of our time just on research.

In the Pike Place Market in Seattle, you can still find the first Starbucks. There’s something wrong with it, though. It’s not quite right, not quite a Starbucks . The logo is different; the layout is different.


It turns out that the original Starbucks didn’t sell coffee.


They sold coffee beans and tea leaves and even herbs. But except for a sip or a taste of coffee brewed from a particular bean (drip, no espresso!), there was no cup of coffee to be had.


Starbucks was wrong. Jerry Baldwin, one of the founders, made a mistake. He thought the beans were the point, not the coffee. Left to Jerry’s vision of the future, Starbucks would certainly have failed. It took Howard Schultz, a trip to Italy, and an obsession with espresso to turn Starbucks into Starbucks. And Howard gets a lot of credit for making that happen.


But what if the “wrong” Starbucks had never been built? What if Jerry and his partners had said, “Well, we’re not sure if this bean thing is going to work, so let’s do nothing”? Without Jerry Baldwin and his flawed idea for a coffee bean store, there’d be no Frappuccino. One led to the other by the usual route, which is never a straight line.


The original Starship Enterprise was conceived by Matt Jefferies. It looked like a cross between a Frisbee and a can opener. Clearly wrong.


But Matt had the drive to deliver. He took the wrong start and revised and improved and innovated until the Enterprise we know and love came to be. The hardest part, it seems to me, was the first one, the wrong one.


Poking doesn’t mean right. In means action.



How to automount a remote share in Mavericks

You want to use Time Machine over a remote share. It is important to permanently mount it when you login to your Mac.

As an example let’s connect to a Western Digital My Cloud that has the default name WDMyCloud.

How to mount it

After launching the Finder you may see it at the Shared section

Shared WDMyCloud

and just click it and connect with the share you want.

If it’s not visible just select from the Finder’s Menu Go / Connect to Server...

At the Server Address: type


You may change wdmycloud.local with the IP address of your NAS or remote share. Choose the type of connection and then just choose a share. It will show up like this

Shared wdmycloud.local

Auto mounting the share

Select from the top menu Apple / System Preferences... / Users & Groups / Login Items

Click the + button and now select your remote device from the left list under Shared.

WDMyCloud Connect As

Make the connection and select the share you want.

It’s done! Now every time you enter your Mac it will try to mount that share immediately.

A little note…

Apple guys like to be funny. See what would show up if you used smb: instead of cifs:

smb wdmycloud.local Connect As

You may be interested in Using an SMB share from Mac OS X in Linux