Sunday, June 09, 2013

Cisco Console Access on Mac

When I switched over to Mac, one of the first things I needed to get working was telnet/ssh/console access to networking devices.  I browsed around the google for suggestions.  In linux I used the built in console for telnet/ssh and minicom for console access and these worked well for me but I did wish at times that I had 1 tool to rule them all.  Just never got around to figuring that out.

On the MAC, I didn't care much for the standard terminal client.  I quickly found iTerm2.  iTerm2 doesn't support serial console connections natively.  The Networking Nerd, Tom Hollingsworth (great blog you should follow) suggests using ZTerm.  I was really hoping to get away with just using iTerm2 though.  Basically I settled on using a program that is built in to the Mac called screen and have iTerm2 call it up when needed.

I use 2 console cables.

Trendnet TU-S9 USB to RS232 Serial:

Cisco Console mini USB Type-B to Type-A

My MBP has 2 USB ports, 1 on the left side, 1 on the right.  When you attach a USB cable to your Mac the device will show up in your dev folder.  The dev folder sits at root / and contains all files that represent peripheral devices.  Check it out.  Open terminal and run "ls /dev".  This lists everything in /dev.
Plug in your usb cable, from what I understand, most serial/usb adapters are pretty similar and show up as PL2303-####.

Check by running "ls /dev | grep PL" in terminal, you should see serial the cable.

Mikes-MacBook-Pro:~ mikemunoz$ ls /dev | grep PL
Mikes-MacBook-Pro:~ mikemunoz$

You'll want to make note of the tty for both cables on all USB ports.

iTerm2 allows you to use profiles to set parameters for different sessions.  This is what I used to have iTerm2 run serial connections.
I created 4 profiles so I could use the serial or USB cables.  Left side has serial and USB, Right side has  serial and USB.  You'll notice that when you look at the TTY when plugging in the cables, it changes slightly depending on the USB port used.

Open iTerm2
Go to Profiles
 - Open Profiles
 - Edit Profiles
  - Bottom Left +

I named my profiles

On the command line you type in screen /dev/tty.PL2303-00002014 9600.
Basically you are calling screen up to use the device with the standard 9600 baud rate.
My settings:

Look through other settings, change what you like.

When needed I just call up the Profile and select the one I need.  (⌘O)  You could set shortcuts under each profile if thats your thing.

I will add that I ran in to a common problem when first using the serial adapter, it would crash the Mac when going to sleep or just yanking out the cable without exiting the terminal.

Installing the md_PL2303_MacOSX10.6up drivers by Prolific resolved this problem for me.
The Prolific site requires you to log in to download the drivers (GUEST for user and pass).  Download

No comments: