As some of you know, I recently jumped off the Windows band wagon and purchased a Mac Book Pro. I like it, but it’s taking some getting used to. Recently I wanted to use it to configure a Cisco device via console and realized I didn’t even know where to start. For Macs being ‘really’ easy, it’s not super clear what happens when you plug in a device that the Mac doesn’t have a driver for. So I turned to Google, below is what I came up with that seemed to work for me.
Finding the right driver This was actually the hardest part. I’m sure we’ve all seen the very popular USB to COM adapter that looks like this…
While they may be branded under many names, I believe they are ,for the most part, all manufactured using Aten hardware. Mine was the ‘UC-232A’ model. After trying to get the driver right from Aten and having it not work, I did some googling and came across this site…
Apparently finding the right driver is a problem that others are having as well. At any rate, this guy had a link to a set of drivers that worked for me…
Download those drivers to your Mac book and install. Once I did that, I was able to see the device from the terminal…
You can see the first time I ran the command I didn’t have the device plugged in. Once I plugged it in, the USB to COM adapter showed up as a valid TTY device (PL2303-00003014).
Using the adapter for a terminal session So now that you have the device installed, how do you actually connect to a a console device? After more googling, I came across a terminal app called ‘Screen’. The screen app is what I’ll be using as a terminal emulator to connect to the device console ports. Once your adapter shows up, connecting is pretty straight forward…
All you do is pass the device to the screen app as a parameter and specify your the baud rate. When you run that you should get kicked to a blank white screen. Bang, bang the enter key a couple of times and you should be on your device…
To exit screen, press ‘CTRL – A’ followed by the letter ‘k’. This will bring up a message at the bottom of the window that looks like this…
Hit ‘y’ and you’ll be dumped back out to the terminal. Pretty simple right? After using this for awhile, and not being careful about closing my sessions, I eventually ran into this error…
followed by…
Pretty obvious here that I forgot to actually close the session to the device. But if you don’t know what you’re doing a *nix box, this can be frustrating. Basically, this means that there’s still a copy of screen running that’s holding onto the device you are trying to use (the com adapter). To fix this, run this series of commands…
Here we run ‘ps’ to tell us about running processes. From that output, we find the screen app, and then determine it’s process number (far left number). Then we simply kill the process with the kill command. Once you do that, you should be back in business!
Making a program out of it During my googling, I found some people that had made a script to run the app based on some menu input. This makes things slightly easier so I thought I’d give it a go. Here’s what I came up with by hacing pieces of other peoples scripts together…
First thing to do is open the AppleScript editor. This should open a new untitled project. Paste this code into the window…
set serialDevices to (do shell script “ls /dev/tty.*”) set theDeviceList to (paragraphs of serialDevices) as list set theDevice to (choose from list theDeviceList) set baudList to {1200, 2400, 4800, 4800, 9600, 19200, 38400, 57600, 115200, 230400} set baudRate to (choose from list baudList default items {9600}) tell application “Terminal” do script “screen ” & theDevice & ” ” & baudRate set number of rows of window 1 to 100 set number of columns of window 1 to 80 set background color of window 1 to “black” set normal text color of window 1 to “green” set custom title of window 1 to “SerialOut” end tell
Should look something like this…
Then hit the ‘Compile’ button on the menu bar. This will make it look pretty…
Next thing to do is to export the code as an application. To do this, click on the ‘File’ menu option and select export…
On the export menu, give the script a name, and change the file format to ‘Application’. This will allow you to launch the script as an app…
Once you save it, quit the AppleScript editor and double click on the application you just created, you should get a series of prompts that look like this…
After you pick your device and baud rate, you should see a terminal window launch. Click on it and hit enter a couple of times…
All set! Just a easier way to select the device you want to use as well as pick the baud rate. Keep in mind that the same rules apply. ‘CTRL-A’ plus ‘k’ to quit the session. A nice free way to use my existing adapter on my Mac!
As some of you know, I had the privilege of being invited to my first Networking Field day which was held back in early March. The experience was incredible. Being able to talk directly to vendors (moreover, the subject matter experts at the vendors) about their current and upcoming offerings is an incredible experience. On top of that, I got to meet some of the network bloggers and experts that I’ve been reading and following for many years. These are the guys that helped me get involved in blogging and the networking community.
And now for a quick rant on the ‘networking community’. GET INVOLVED! While it might be hard to believe, there is a VERY active networking community out there. It’s not hard! I started my blog in November of 2009. My first post was on how to configure guest wireless on a base license ASA security appliance. And I was running my blog on this…
That is an old Pentium 4 computer I found in a dumpster somewhere. It’s running CentOS with WordPress on top of it. I had to learn at least basic Linux to get the thing working (another learning experience!) and I’ve been using the box ever since. Should I upgrade? Maybe, but that’s not my point. You don’t even have to go this far, if you don’t mind having a URL like blog.wordpress.com you can do this for FREE! All it takes is your time!
A tweet that Ethan Banks (@ecbanks) sent yesterday sort of brought my thought process on blogging full circle…
And while your at it, write a blog entry on it! I can’t tell you how much blogging has helped my learning process. I’m a firm believer that sometimes you just need to hear an explanation phrased in a different way for it to make sense to you. There are likely thousands of blog entries out there on how to configure private VLANs on Cisco gear. Does that make them redundant or unnecessary? I’d argue that some of the blog posts out there make WAY more sense than Cisco’s documentation. It all depends on how you learn and how your brain processes the concepts. Another plus of blogging is having a public online archive of what you’ve been studying and working on. Forget how to do something? Have internet access? Just look it up!
I’ll admit, there were times over the last 3+ years where I neglected the blog entirely. Stuff happens, but I think you’ll find that once you start blogging, and really get involved, it becomes an addiction. I love blogging now. Why? Because I’m involved in the community. Here’s an example. I posted an article on how to configure standard and extended ACLs based on my CCIE studies. Within hours of posting I get a comment from Paul Stewart (@packetu) over at Packet University…
And just like that, something came up that hadn’t ever occurred to me. The networking community is about so much more than just blog posts. It’s about having a community of people who are REALLY interested in networking that you can communicate with, bounce ideas off of, and learn from.
And you don’t have to be an expert to get started. I had just just gotten my CCNA 4 years ago when I started blogging and all I had was a strong interest in learning more about networking. 4 years later I’m sitting on my couch studying for me CCIE and I get an email from Stephen Foskett (@sfoskett) asking if I want to come to a Networking Field day event.
My point is that you should get involved. Trust me, if you are interested in getting involved, you’ll be more than surprised by the experience. So if you’re interested in becoming part of the ‘networking community’ but don’t know where to start, just reach out! We’re all here to help you get started and everyone that’s involved loves it when the community get’s bigger.
End ‘networking community’ rant
Now that my rant is over, let’s talk a little bit more about the actual event. If you’ don’t know what Tech Field days are, the Tech Field Day site is a great place to start…
Basically, delegates from across the blogging community get invited to the events by Gestalt IT. Vendors have blocks of time in which they can talk to us about new technologies, new products, and ask for feedback. The whole idea is to connect people together. You ,as a blogger, get the chance to talk to the real subject matter experts at some of the vendors which is something that doesn’t happen as often as it should.
Another neat thing about Tech Field Days is that they are streamed live. That is, even if you aren’t there in person , you can watch the stream live and interact with the delegates through twitter or other social media. In addition, the videos are then professionally edited and posted online for you to view later. Here’s a quick run down of the vendors that presented and their associated recordings…
So there you have it. I love the idea of being able to go back and view pieces of the actual presentations when I’m looking at a particular technology later on. A quick side-note on that topic. There is A LOT of content here. Many delegates explain the event as ‘drinking from the fire hose’. That’s totally true. There were lots of technologies discussed that I plan on spending a lot more time looking at. However, that’s going to take time. I fully expect to be generating NFD5 related posts for the next 3 or 4 months at least. Since I like to write more about the ‘hands on’ application of these technologies it tends to take more time, especially since all of this stuff is cutting edge.
The other huge plus of attending NFD5 was meeting some truly awesome people. Not only from the vendors, but the other delegates and Tech Field day staff. If you don’t currently follow these people, do so now…
I was admittedly a little nervous meeting all of these people. I mean, this is a list of some of the smartest people in the networking industry. They were all amazing people to meet. I was more than honored to meet them all and look forward to continued contact going forward.
So that’s it. I wanted to get my first NFD5 post out there (along with my ‘community’ rant) to get things started. I’m taking a month or so off from CCIE studying to focus on blogging so expect some more NFD related posts in the coming weeks.
While working on studying multicast, I had to find a way to test the multicast traffic. I had read that others accomplished this by just by doing manual ‘joins’ on the routers/switches and that seemed to be sufficient for basic tests. However, I was hoping for a little bit more so I could really see multicast in action.
After a little goggling I came across the VLC player…
I determined that it supported multicast RTP streams. However, after installation, I was having a hard time getting a computer to actually stream a video clip. I’m sure I was just missing a setting somewhere in the GUI but I found a different way to do it that fit my needs a little better. You can load a video through VLC with all of your required settings by passing the settings to the VLC.exe on load. I ended up hacking together this command to load my video for the multicast stream…
That looks awful, but if you paste it into notepad without word wrap you’ll get a straight line out of it. Basically, this just loads the VLC EXE (change your path if required) and tells it to load the specified AVI file into a multicast stream on the multicast IP address of 239.1.2.3 port 5004. It also tells VLC to loop the video so it keeps playing.
I was fortunate enough to have an old PC laying around so between that, my desktop, and my wife’s new laptop I had three PCs that I could test the multicast streaming on. I’d fire up the command above on one of the PCs, and then I could connect through the lab with a VLC player on the two other PCs.
Connecting to the stream through VLC is pretty easy, you just open the VLC player and select the ‘Open Network Stream’ option from the Media menu…
In the ‘Open Media’ box that appears, enter the IP of the multicast stream using the syntax of…
rtp://@<Multicast IP address>
Then hit play and wait for the IGMP joins and the PIM grafting to take place and with any luck you’ll see the stream you are generating from the other PC…
Which in my case, if a man spinning flaming things around (it was the only AVI I could find).
Hope this makes it a little easier for anyone else trying to do this, for some reason all of the guides I found online for using VLS for multicast streaming were old and the command syntax must have changed significantly.