Hardware Reference
In-Depth Information
Chapter 9
Serial Server
By now, many of you may have guessed that I spend a lot of time at the command line. After all, it's my day-to-day
work and my pastime at home. Given that I spend a lot of time at the command line, I don't like to open a web browser
to access some device's management interface. I am much more at home configuring devices via the command-line
tool. Even if this is not your preference, a lot of enterprise-grade equipment must have its initial configuration set up
via a serial console, which does not require Ethernet.
Having serial access to the Raspberry Pi may be a good idea for the security sensor in Chapter 5: this way you
can access and communicate with the system without the need for an SSH connection over Ethernet that may lead to
a security issue. You also may want to use the Raspberry Pi as a temperature display by using the LCD from Chapter
4 and a sensor from Chapter 3; this system would not need to have an Ethernet connection to operate. The serial
console would give you a quick and easy way to perform maintenance on the system.
So in this chapter I'll explain what a serial console is, how to configure the Pi's serial ports, and how to access
your Pi using this approach.
What Exactly Is a Serial Console Anyway?
When you turn on your home machine the first thing you notice is the boot messages on your monitor. You then
sit down and enter text with your keyboard. You then need to access a remote system via SSH, so you open up a
command-line console and connect to your remote server. This is all well and good if your remote server is up
and running. What would happen if the machine had hung at the grub boot menu? Well, you don't have a screen
or a keyboard to look at, so now what? This is where your serial console will come in to play. With a serial console all
the boot messages and the grub menu will be redirected to the serial port instead of a physical screen. You can then
use an application to connect to the serial port and interact with the serial console in a similar manner as you would
with the SSH command console.
It's not just computers that can benefit from a serial console: a lot of enterprise devices extensively rely on serial
consoles. Cisco switches come to mind as good examples. Or maybe it's the Raspberry Pi itself you wish to access
via a serial line as discussed in the introduction.
In a lot of large organizations you will come across a device that can be known as a serial server, console server,
or terminal server. These devices normally have many serial ports that are often accessed via a breakout cable or fan
out cable. Their sole purpose in life is to connect you to the serial port of some remote device. Most often this will be
a switch or router in the same data center. The logic behind this is that you can fully manage your equipment, no
matter its state. For example, if your switches accidentally lose their configuration, you won't be able to access them
via the IP address you configured. This is where the serial console in the back of the switch will save the day.
No matter what state the switch is in, you will always be able to find a way to configure or fix the remote device.
Given that most data centers have a lot of devices, you need an efficient way to provide access to each one of these serial
ports. The best way is to have some form of access over TCP/IP; this will allow you or others to remotely connect to
the serial console of a device in a different location. It's quite common to see a Cisco device with an async card or two,
 
Search WWH ::




Custom Search