Roadmap for this tutorial: In this tutorial, the focus will be on the connectivity issues for attaching a serial console (if a switch is network-accessible, ssh is the preferred method). First, configuration issues around the console emulation software will be described. Then, the physical connectivity process will be discussed. Finally, commands for displaying switch configurations will be shown.
Day-to-day routine management of networking devices is handled through
ONA
for our networking switches and routers, or the
Netsrceen web interface
for the Juniper Netscreen firewalls.
However, for fine-grained management, or in situations where web connectivity is not available, you may need to access the switch software directly.
For switches, there are three possibilities for this, all of which are console-based (web access to the native web management software on our switches is routinely disabled):
The web interface on the Netscreen firewalls is usually available, so if the firewall is network-accessible, the web configuration software is a third alternative.
If the serial console of the device is connected to a Cyclades, the process of connecting consists of:
ts_menu
to start the menu-driven device selector, and follow the prompts.
The Cyclades emulates a direct physical connection. As such, the sections about terminal emulation software and physical connectivity are not relevant, but the section on configuration display is relevant.
To connect directly requires:
The cabling setup can be challenging. Each device manufacturer does things differently. As most CSCF switches are HP, that is what the discussion here will focus on -- others will be discussed on an "as known" basis.
"Hyperterm" is a standard utility program in Windows, usually located in the Programs--Accessories--Communications, that is appropriate as a console. The first time the program is started, it will prompt for various telephone/dialing settings. These must be provided, even though they are not needed for direct serial/USB communications. And, if you are using hyperterm without specifying a configuration file (see below for more information), you may be prompted for a "connection name". Anything will do here.
The port communications attributes likely will need to be set, as the defaults are not useful. This must be done when a session ("call", in hyperterm terminology) is not in progress: however, since hyperterm automatically starts a session, you will need to end the call before proceeding (Call--disconnect).
The communications attributes are set via the File--properties menu. On the dialog that appears, note the "Connect using" dropdown: it should be set to the appropriate physical device that will be used (as determined by the physical setup). To configure the details, press "Configure" and set the attributes according to the target device:
There is a "terminal to emulate" selection that is set to VT100/ANSI by default. This is appropriate and need not be changed.
If you have already established the physical connection, click Call--call to start a session. Press enter a couple of time to allow the software to sync with the device. If this doesn't produce and output, try generating a "break" signal (keyboard-dependent). If this doesn't work, see the debugging section.
There are many VT100/ANSI temrinal emulators available for Linux. The one discussed here is "minicom" which has been found to be adequate for the task. Minicom is not installed by default. Use the Synaptics package manager (System--Administration--Synaptics Package Manager) or a commandline:
`sudo apt-get install minicom`
In either case, the userid you are logged in as must be appropriately authorized.
To start minicom from the commandline, simply enter minicom
. You should not need to be root to do this, assuming that the physical devices are set up correctly on your system. Within minicom, all command functions are accessed by pressing the control-a key combination. To set communications parameters:
Press enter once or twice to confirm that the settings are correct and that you can communicate with the device.
Both hyperterm and minicom support the concept of saved configurations, to eliminate the need to re-specify parameters every time you use the program. In each case the method for saving a configuration is straightforward, although for minicom you need to be aware of the default locations for saving configurations and the file permissions associated therewith.
Over time, a library of configuration files will be developed, eliminating the need for experimentation with settings. Check with the owner of the laptop you are using to see what configurations are available, or look in the default locations:
/etc/minicom/minirc*
Anecdotally, the HP switches behave normally for the backspace character on most PC-class keyboards. However the Netscreens do not seem to recognize backspace. You must use a ctrl-h instead. This seems to apply regardless of the client OS or emulation software or connection path. No doubt there are clever ways to do keyboard mappings or emulator keystroke translations, but these have not been investigated for the purpose of this tutorial.
Once software is set up in a manner that should work, the next step is to establish the physical connection and confirm that the software and hardware actually do work together. Unfortunately, the physical connectivity also has some "configurability", so getting a connection to work the first time is generally an iterative process.
There are various bits and pieces of hardware that may be required to connect a laptop to a networking device, including:
It is important that you understand the differences between these, and understand what you have at your disposal.
There is additional complexity in the connector at the device. Our devices typically have either a DB9 connector or an RJ45 connector -- you need to know which.
If your laptop already has a DB9 serial connector, you simply need to determine its name. For Windows systems, this is probably COM1 or COM2. For Linux it will likely be /dev/ttyS0 or /dev/ttyS1. Note that laptops that have built-in modems often use the first port (COM1 or /dev/ttyS0) for the modem and make the external connection COM2. To help to determine which is which and what is available:
`dmesg | grep ttyS`
The most likely scenario is that your laptop has no external serial port. In this case you will need a USB-to-serial converter ("dongle"). CSCF has a supply of these, Startech-branded ICUSB232 that use the "Prolific" chipset.
Displaying the configuration of switch/device is inherently dependent on the device manufacturer. Each one has their own CLI (command-line interface) language. The information here will be organized by manufacturer, with per-model differences noted as required.
Passwords: in all cases, the userid to use it "root". Passwords vary depending on the device. The edge switches share a common password, as do the core switches. The Netscreens have a distinct password. In all cases, the passwords are recorded in the password file in the key vault.
The HP switches support two styles of console interaction: menu-driven, or strict command-driven. This discussion with focus on the command-driven processes.
When you log into an HP switch as "root", you will normally be put into the "manager" context. You can confirm this by typing a ?
at the prompt. If you are in the manager context, you will see summaries of commands like "boot", "clear", "configure", etc. If, however, you see a short description of commands describing "enable", "exit", "link-test" etc you must enter the manager context with the "enable" command.
The basic command to show aspects of the configuration is show
. You can get a list of the attributes that can be shown by typing show ?
. To show the entire configuration, type show config
. The output will be paused after each screenful: press the spacebar to advance to the next page, or press "Enter" to advance one line.
For reference manuals and details on each model, see: http://www.procurve.com/customercare/support/manuals/index.htm.
Reference manual for the Baystack 5510: http://www116.nortel.com/docs/bvdoc/baystack/doc_pdf/215080-C_NNCLI_Reference_Guide_for_BoSS_4.1.pdf.
The basic command is "get". "?" can be used to determine valid options at any point. Typical things to display are interfaces, policies and addresses. The entire configuration can be displayed with "config":
Output does not seem to pause automatically, so make sure you have a large scrollback buffer on your terminal emulator software. You can interrupt the output of a "get" with a ctrl-c.
You can filter output from "get" with a grep-like pipeline called "include". The syntax is:
where pattern is a literal string that must be present in the output. For example:
For reference manuals, see: http://www.juniper.net/techpubs/software/screenos/.
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
![]() |
Prolific-USB-to-Serial.zip | r1 | manage | 3178.8 K | 2009-06-22 - 18:46 | TrevorGrove | Contains drivers for Windows & Mac |