My lab will require me to console into 4 switches. I don’t want to buy another router to be my terminal server, and I also don’t want to have to swap out console cables every 2 minutes.
Thankfully I don’t have to. Linux has a handy tool to turn a regular PC with a bunch of USB serial ports into a terminal server.
All you need is a bunch of USB ports (a USB hub will do), some rollover cables and a bunch of these which I found on ebay:
I bought 3 of the above, as the PC itself already has 1 serial port.
The app I’m going to use is called ser2net. Let’s install it
darreno@CCIE:~$ sudo apt-get install ser2net
Now let’s see if Ubuntu 10.10 has reconised my USB serial cables:
darreno@CCIE:~$ dmesg | grep tty [ 0.000000] console [tty0] enabled [ 0.932016] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A [ 0.932314] 00:05: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A [ 6.625434] usb 6-1: ch341-uart converter now attached to ttyUSB0 [ 6.649441] usb 6-3: ch341-uart converter now attached to ttyUSB1 [ 6.672443] usb 3-2: ch341-uart converter now attached to ttyUSB2
Looks good so far. ttyS0 is my physical serial port and the ttyUSBx ports are the 3 USB-Serial cables. I’ll now configure ser2net to map TCP ports to my onboard port and my 3 USB ports.
darreno@CCIE:~$ sudo vi /etc/ser2net.conf
At the bottom of that file you’ll see this:
2000:telnet:600:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT banner 2001:telnet:600:/dev/ttyS1:9600 8DATABITS NONE 1STOPBIT banner 3000:telnet:600:/dev/ttyS0:19200 8DATABITS NONE 1STOPBIT banner 3001:telnet:600:/dev/ttyS1:19200 8DATABITS NONE 1STOPBIT banner
Let’s change it to this:
2000:telnet:600:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT banner 2001:telnet:600:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT banner 2002:telnet:600:/dev/ttyUSB1:9600 8DATABITS NONE 1STOPBIT banner 2003:telnet:600:/dev/ttyUSB2:9600 8DATABITS NONE 1STOPBIT banner
save and quit, then restart ser2net:
darreno@CCIE:~$ sudo /etc/init.d/ser2net restart * Restarting Serial port to network proxy ser2net [ OK ]
Now to test!
My dynamips box has an IP of 10.20.30.11. If I want to get to the physical serial port from my laptop, I only need to do this:
C:\Users\Darren>telnet 10.20.30.11 2000 ser2net port 2000 device /dev/ttyS0 [9600 N81] (Debian GNU/Linux) C3560# C3560#
What about a USB cable?
C:\Users\Darren>telnet 10.20.30.11 2003 ser2net port 2003 device /dev/ttyUSB2 [9600 N81] (Debian GNU/Linux) C3550# C3550#
I use a tabbed telnet/SSH app called ZOC. From there I can specify the telnet ports and which switch they map to. I can now console into all of them without the need of a terminal server. The actual USB-Serial cables only cost me £2 each, and you can have loads of them.
(2011/02/19) EDIT: Dariush below mentioned that you can get multiple serial adaptors through a single USB port. This is an example: http://www.amazon.co.uk/NEWLink-Serial-Quad-Cable-Adaptor/dp/B003DA5TG4
If you don’t want to go the USB hub root, this could certainly work. Serial cables aren’t exactly high bandwidth. I’ve even found an 8 port model here, but no price: http://www.delock.com/produkte/gruppen/USB+Adapter/Delock_Adapter_USB_8x_Serial_61519.html
So I’m putting my lab together, and I want to match INE’s topology as I’m HOPING to get those 4 workbooks. So far my home lab consists of my dynamips box and 2 3550 EMI’s. I wanted to borrow 2 3560′s from work, but we only have the 8 port models. Not a problem I first thought, but checking the INE topology, you need at least 11 ports on 1 switch, 12 ports on 2 and 13 ports on the fourth.
The 8 port 3560′s actually have 9 ports, as they have a dual-purpose “gig ethernet/SFP” port, but I’m still 2 ports short for even the less loaded switch. I now wish we used the 12 ports models here at work…
However, all is not lost. My assumption is that you do NOT need all 11 ports loaded at all times. It might require me to rewire things now and then, but it’s my only option right now. The 3550′s have 48 ports each, so I might be able to rework things here and there. It’s not 100% ideal, but it might make me learn more anyway, so what’s the loss?
I ordered and received another one. That now makes 2. I honestly think that it should be enough for now. Now I need to come up with some topologies and hook it up to dynamips.
At least things are moving on. Most of my time is still in the 4th edition of Cisco’s R&S certification guide. It’s mainly that stuff I need to know for the written. The hardware is all for lab practice.
I had a bit of a nightmare getting these things to actually work at first. There were a number of things that I learnt along the way that I can share with you so you don’t have the same hold-ups.
Point #1 – There are 2 different ‘models’ of IP330.
One has a white and blue front:
The other is plain white on the front:
The white one seems to be a later model, and actually has more problems than the older one.
Point #2 – The hard drives needed when doing the Olive need to be either Western Digital or Seagate and HAVE to be LESS than 32GB in size.
It seems the BIOS on these Nokia’s don’t like drivers bigger than 32GB.
The white ones come with 40GB drives, with a jumper setting limiting them to 32GB. The older Nokia’s have WD drives of around 8GB in size.
Point #3 – When installing FreeBSD 4.4 mini, ensure that the hard drive to be used in the Nokia is the primary master
Otherwise installing JUNOS won’t work.
Point #4 – Install JUNOS 7.0, 7.1 or 7.2 first.
I seemed to have problems with any other version. Starting with these 3 I always succeeded.
Point #5 – 8.4 is the latest you’ll EVER be able to install
JUNOS 8.5 no longer supports the CPU inside the IP330. This is true for both the older AND the newer IP330′s shown above. Even though the white one is newer, they use exactly the same CPU. JUNOS won’t actually tell you this when you try and upgrade though. JUNOS will happily allow you to upgrade, but when you reboot to use the new version, you’re left with this:
Booting [/kernel]... Olive CPU GDB: debug ports: sio GDB: current port: sio KDB: debugger backends: ddb gdb KDB: current backend: ddb Copyright (c) 1996-2008, Juniper Networks, Inc. All rights reserved. Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. JUNOS 8.5R2.10 #0: 2008-02-06 08:20:23 UTC firstname.lastname@example.org:/volume/build/junos/8.5/release/8.5R2.10/obj-i386/sys/compile/JUNIPER Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD-K6(tm) 3D processor (Unknown-class CPU) Origin = "AuthenticAMD" Id = 0x58c Stepping = 12 Features=0x8021bf
AMD Features=0x80000800 panic: CPU class not configured
You now have to start from scratch again. I could not recover.
Point #6 – If you can’t see anything through the serial port, maybe your cable is wrong.
You need a null modem cable. But maybe you have? The problem is that there is no null modem standard. This means you might have a bunch of null modem cables that all work differently. You can check the specs on wikipedia for null modem cables. I had a few and at first only 1 ever worked. I bought 1 of these: 2M Null Modem Cable and these worked just fine. When you boot up a Nokia, you should see ‘AT’ in your console application for a few minutes.
Another thing to add. When I bought my 5 IP330′s, 1 of then was a VPN220, but it looked identical inside and out to the older IP330. I turned this into and olive and it works just fine.
Other than that, everything else for me worked a treat!