Wednesday, July 9, 2014

Neuron: Using grep to return the matched text

I'm working on retiring an old 3080 Cisco VPN Concentrator.  As part of this I'm trying to figure out which L2L tunnels are still in use.  I have the device logging to syslog so it's just a matter of doing some analysis.

One of the things I wanted to do was to return just the part of the syslog that looks like this:

(L2L: <L2L Tunnel Name>)

Obviously I could grep '(L2L: .*)' filename.txt and get all of the lines that have that matched.  But that still left a lot of gunk I didn't need.  Thankfully grep has an answer.  Adding the -o switch to grep results in just the matched text being returned.  I was then able to pipe this to sort and then uniq to get my list of tunnels that had been accessed.

grep -o '(L2L: .*)' filename.txt | sort | uniq

Now comes the hard part of getting contact information for the old tunnels. 

Wednesday, March 26, 2014

Neuron: Batch File + Excel FTW!

Excel is every network engineer's favorite way to organize lists of IPs for documentation, even though they wish they had a better solution.  Have you ever needed to add a large amount of IPs that happen to be in order?  There is a better way than typing them by hand.

So let's say you need to list out 10.10.10.1 - 10.10.10.240...

C:>for /l %i in (1 1 240) do echo 10.10.10.%i > outfile.txt


This produces a text file with an IP per line.  Copy and past that into an excel column and you're done.  If you need something more fun like say 10.10.10.0/30 - 10.10.10.252/30 you can change the first number in the parentheses to 0, the second number to 2 and the third to 252.  The syntax is that the first is the start for %i, the second is the amount to increment and the third is the stopping point.

Thursday, July 18, 2013

Mind the Gap... Between VoIP and Analog

Around five years ago my company made the decision that at some point in the future we would be replacing our phone system with a VoIP system.  As part of that decision we decided that it was no longer smart to run separate voice and data wiring on new projects.  This led us to a problem of how to make the connection between data patch panels and the existing voice 66 blocks.

Unfortunately we didn't go straight to the solution we are using now.  Our first solution was to take voice cross connect wire and terminate it with an 8p8c connector on one end and then punch down the other end to the 66 block.  For one or two links, this solution worked ok, but scaling the solution ended up with a rat's nest of cross connect cables.  

The next solution was basically the same as the first only we using CAT6 patch cables with one 8p8c cut off.  It was easier to keep the cabling neater, but it still didn't scale well as the thicker cables got in the way on the 66 blocks.

Finally we came to the solution that I want to share.  We started buying Panduit 24 port 1 pair voice panels.  These panels have a RJ-21 connector on the back that splits a 25 pair cable into 24 RJ45 jacks with 1 pair connected to pins 4 and 5 of each jack.  When combined with a 25-pair amphenol cable and a prewired 66 block, it makes a very modular and convenient way to bridge the gap between data and analog voice cabling. In this configuration I often put the voice panel with my switches as it serves as a "voice switch" in the rack. 

During the last five years this has served well and I believe that it will also help support our large analog deployment that will remain with our new VoIP system.  Hopefully our trial and error will help someone else out.