- How do I enable a serial console on Windows (2008 and/or 2012) such that I can log into it like the Good Old Days of Real Servers and issue provisioning commands, ideally via PowerShell?
- A console server (also referred to as console access server, console management server, serial concentrator, or serial console server) is a device or service that provides access to the system console of a computing device via networking technologies.
- With the exception of its local console port, all of your Opengear device's RS-232 and USB serial ports are set to Disabled Mode by default. To allow network connections to console ports, you must configure at least these settings at a minimum: Set the Common Settings to match the connected device (not generally required for USB); Set the port to Console Server Mode (aka portmanager mode).
- Serial console. Its functions are more basic. Go to the servers status page in your account 2. Click on KVM/IP: 3. Create a session to get the credentials: Now you can access the serial console of your server: You can now interact with the server, even if you have locked out yourself by a malicious network configuration, for example.
- There are some windows programs that can access it - but the easiest way to access it is to configure two virtual machines to point to the same named pipe. Then it will function like a null-modem cable between the virtual machines.
Perle Systems Technical Notes
For the average user a serial console has no advantage over a console offered by a directly attached keyboard and screen. Serial consoles are much slower, taking up to a second to fill a 80 column by 24 line screen. Serial consoles generally only support non-proportional ASCII text, with limited support for languages other than English.
The Emergency Management Services (EMS), available in Windows Server Operating Systems provides “headless” support for today enterprise servers. It enables management services without the need for a keyboard, mouse, local monitor, and video adapter. A server administrator interacts with EMS through a Special Administration Console (SAC) to perform management and recovery tasks, even when the system’s operational status is questionable.
In this scenario, a Windows server can be managed through the server’s console port using a text-based command-line interface. Microsoft recommends using a 'terminal server' or 'console server' to connect multiple servers to a single point of contact for remote management. The benefits include:
- managing the servers without having to be physically located at the serial port,
- more than one administrator can access the servers, and
- multiple servers can be monitored from one location.
This “Out-of- Band” operation provides the best method for recovery of Windows Servers in remote locations today.
As stated by Microsoft some scenarios where access to SAC is the best way to recovery are;
- The server is not functioning properly due to a Stop message event.
- The server is very low on resources, which causes the network driver to be exceptionally slow or unable to respond to requests.
- The network stack is malfunctioning or has failed.
- A Windows Server component is running that does not support in-band communication, such as the loader or the Recovery Console.
- The server is not yet fully initialized.
Example for Setting Up a Windows Server Port for SAC
bootcfg /ems ON /port COM1 /baud 9600 /id 1
In this example we are specifying COM1 as the port to redirect console SAC traffic to. Please refer to Microsoft’s documentation for specific information on the SAC feature.
Simple SAC Web Interface
Using Microsoft’s EMS - SAC tool can be a daunting task for some Windows administrators who are more comfortable with a graphical interface.
Windows EMS – SAC’s text-based command line interface
Perle has addressed this issue on its IOLAN Terminal Servers by providing a simple browser-based graphical user interface tool that speeds up system recovery time specifically for Windows Servers administrators. All of the EMS/SAC functions are available to the user such as;
- Reboot
- Shutdown
- Set/Change IP address
- View and kill processes
- View system uptime and date
- View system performance
- View log of messages from the SAC serial port
IOLAN Console / Terminal Servers
Perle offers a complete line of products that consolidate serial console access using strong security and data encryption and providing fault-tolerant models with dual Ethernet and dual power supplies for ultimate reliability. Serial and USB port densities up to 50 ports are available giving customers the ability to connect all of their Windows, Linux, Solaris and Unix servers, network and infrastructure equipment by using the same console management system.
Customers who want a single solution for all of their Windows and non-Windows network and telecom equipment can upgrade their Windows servers to take advantage of the EMS features. Using a Perle Console Server, they can reduce equipment and operating costs, minimize network downtime, and add secure remote access to all systems for remote console management.
Introduction
I have had a Raspberry Pi model B sitting on the corner of my desk for about 6 months now, gathering dust and waiting for an application. I don’t need an XBMC box – I have one of those that’s more powerful (and also tiny enough) already with a Lenovo Q180 – and the actual I/O stuff looks mostly harder than it would be with an Arduino, so I’ve skipped that too.
Yesterday I was talking with a customer who had installed a network device in their DC racks that wasn’t talking to the outside world anymore. It’s management is either by SSH or serial port. The SSH was part of the problem, so serial needed to be the solution.
A small, easy to install box to allow network connectivity to a serial port? This did seem like a job for the RPi. I grabbed the latest Debian Wheezy SD image from the RPi website, and the USB-serial adapter from my bag, and got to work.
Azure Serial Console Windows
Booting the RPi with the serial adapter installed Just Worked, like USB stuff is supposed to. It’s an FTDI-chipset adapter and it just comes up as /dev/ttyUSB0 in Linux.
To get access to the serial port remotely, I could have just installed minicom on the RPi and then SSH to a shell before running it, but I was interested in how this might scale to more serial ports. You can get the USB serial gizmos for £2 each on ebay if you hunt around, and a couple of 8 port powered hubs would run to perhaps £15 each. That makes an ugly but usable 16-port console server for under £100. If you are building a lab environment for Cisco CCNP SWITCH or CCIE study, then this is a pretty decent deal.
The alternatives are Cisco’s NM-16A and NM-32A modules, plus the special cables to connect them, plus the router to put them in, or the ancient Cisco 2509 (so old it doesn’t have 10BaseT ethernet), or other random ebay scrap. I currently have a Lantronix 8 port device, but it was made before Cisco completely dominated the network world, and everyone else took up their console pinout – that means making up special cables to use it in my rack, which is kind of a pain. NM-16A modules go for around £150-200 on ebay, and you still need a pair of £50 cables to connect all the ports, and a router to put the module in.
The RPi has the added bonus that it’s still a linux box – so if you want to have an NTP server, or TFTP server or DNS, or RADIUS, then it’ll do that for your lab network too!
ser2net is a small application that listens for incoming telnet connections and connects them to serial ports. You configure a TCP port per serial port, so that ‘telnet rpi-ip-address 2001’ goes to /dev/ttyUSB01. You can preset the speed and other settings of the serial port, and you can also change them on the fly using the control interface (on a different TCP port). It also understands RFC2217, an extension to the telnet protocol that allows a client to control serial port settings with special codes. You can also get software like Serial Port Redirector which makes the remote serial port available as a local one under Windows, complete with port control. ser2net compiles simply on RPi Debian, and a single line added to the ser2net.conf has you up and running with your new serial console server.
Howto
First, grab the Debian Wheezy SD image from the Raspberry Pi Foundation’s Download Page and write it to a fresh 2GB SD card as described on their website.
Boot the RPi from the card, while connected to a monitor and network – Linux is preconfigured to use DHCP to get an IP address, so you’ll need to know that somehow to get access to the system. It tells you at the end of the boot process. Once booted for the first time, you’ll get the configurator utility, which allows you to enable SSH access. That should be the last time you need the monitor.
Download the latest ser2net distribution using wget.
wget http://downloads.sourceforge.net/project/ser2net/ser2net/ser2net-2.8.tar.gz
Untar, configure, make && make install.
Check what device name your serial adapter has:
(ttyUSB0 in my case)
Now create a config file in /etc/ser2net.conf
And test by running the server:
With that running, you should be able to open another window, telnet to port 3001 on the RPi and get a welcome banner. If you have something connected to the serial port, you should be able to talk to it.
The final step is to make sure that the ser2net service starts when the RPi boots. Simply add the following line to the bottom of /etc/rc.local, just before the ‘exit 0’ line:
and it will be started automatically on boot.
You can add additional lines to /etc/ser2net.conf for multiple serial devices.
Extra Cheese
For an added bonus in a shared environment, you can log all output from the serial devices (while someone is connected). You get a file per session, with a timestamp for the start and finish, and the source IP. This is another couple of config lines in ser2net.conf
i.e. add tr=tr1 and timestamp to the end of end of each telnet line. Then create the /var/log/ser2net directory and you are off and running.
Now it’s time to figure out how to ‘package’ this into less of a mess. A 1U box with 16 serial ports in Cisco pinout and a simple IEC power connector would be very handy! I think it’s do-able for about £200.