Monday, December 3, 2012

Cheap Remote Console Server

My CCNP lab required me to console into 3 switches. I didn't want to buy a router with a NM-8A/S to be my terminal server, I'm a cheap bastard when it comes to buying extra hardware like that.

Thankfully I didn't have to buy much at all. There is slick Linux tool to turn a older PC with a couple of USB serial ports into a very cheap terminal server.

All you need is a couple of USB ports, some Cisco console cables and a few of these which I found on ebay for about $2 bucks a pop!



The tool I used is called ser2net. If you're using Ubuntu it is very easy to install.

brentc@apollo:~$ sudo apt-get install ser2net

Once it is installed you need to make some minor config changes. We need to find your USB serial adapters.

brentc@apollo:~$ dmesg | grep ttyU [11932926.888294] usb 5-1: pl2303 converter now attached to ttyUSB0 [11932935.248634] usb 5-2: pl2303 converter now attached to ttyUSB1

Looks good so far. Now let's make the changes to the config file.

brentc@apollo:~$ sudo vi /etc/ser2net.conf

Go to the bottom of the config file and make these changes.

BANNER:banner1:\r\nDLS2 port \p device \d [\s] \r\n\r\n BANNER:banner2:\r\nALS1 port \p device \d [\s] \r\n\r\n BANNER:banner3:\r\nDLS1 port \p device \d [\s] \r\n\r\n

2001:telnet:600:/dev/ttyUSB1:9600 8DATABITS NONE 1STOPBIT banner3 2002:telnet:600:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT banner1 2003:telnet:600:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT banner2

I made custom banners for each of my serial ports. you can do that if you want. It's really optional.

Now we need to restart the service.

brentc@apollo:~$ sudo /etc/init.d/ser2net restart

Now go ahead and telnet to the port.

brentc@hades:~$ telnet 192.168.10.11 2001 Trying 192.168.10.11... Connected to 192.168.10.11. Escape character is '^]'.

DLS1 port 2001 device /dev/ttyUSB1 [9600 N81]

Now enjoy your cheap remote console server!