Chapter Description

From the Book

Configuring the Terminal Server

This section demonstrates how to configure a terminal server to provide
access to the rest of the routers in the lab. Once configured, you will be able
access each lab router's console port through reverse Telnet.

Lab Objective

In this chapter, you will accomplish the following lab objective:

Configure the Cisco 2511 router to be the terminal server for this lab.
The terminal server is connected to each device's console port. Port
assignments are as follows:

R12001

R22002

R32003

R42004

R52005

R62006

Catalyst Switch2007

After completing this objective, you will learn how to maneuver from the
terminal server to each individual lab router and then back to the terminal
server.

Terminal Server Overview

A terminal server provides out-of-band access for several devices.
Out-of-band access is through a router's console or aux port versus in-band
access that occurs over the network using telnet. Generally, a terminal server
is a router with multiple, asynchronous ports that are connected to other
devices, such as the console port of other routers or switches, as shown
previously in Figure 4-8. To get a better idea of what the ports look like on the back of a terminal server, see Figure 4-12, which shows the back of a Cisco 2511.

Cabling

This cable is referred to as a CAB-OCTAL-ASYNC cable or just
OCTAL cable.It provides eight RJ-45 rolled
cable asynchronous (async) ports on each 68-pin connector. The 68-pin connector
is attached to Interface Async 1 of the terminal server. Each RJ-45 rolled cable
is connected to the console port of each router in the lab. For configuration
purposes, each rolled cable is referred to as an asynchronous
line in the configuration. Each line is numbered beginning with 2001 to
2008. So, R1 is attached to async 2001, R2 is connected to 2002, and so on up to
2007, which is connected to the Catalyst 1900 switch, leaving 2008 unused. See
Figure 4-14 for an example.

The async ports from the 68-pin connector are data terminal equipment (DTE)
devices. DTE-to-DTE connections require a rolled (null modem) cable. DTE-to-DCE
devices require a straight-through cable. Because the Octal cable is rolled, you
can connect each cable directly to the RJ-45 console port of each lab router.
However, some routers have console ports that are 25-pin interfaces instead of
RJ-45. If so, remember that the 25-pin interface is a DCE, and you must use the
RJ-45-to-25 pin adapter marked "modem" to reverse the roll and
complete the connection.

The major benefit of a terminal server is that it allows you a single point
from which to access the console ports of many devices. This is helpful
initially in the lab because the lab routers will not have any configuration
settings such as IP addresses or Telnet parameters. Without the terminal server,
you would have the tedious process of manually switching between each
router's console port to gain access. A second benefit is that a terminal
server can provide fault tolerance in case the routers become inaccessible
because of a network failure. This is because you can configure a modem on the
auxiliary or asynchronous port of the terminal server, allowing dialup
connectivity to the terminal server and thus to each router that the terminal
server is connected to.

In the lab, the terminal server will be the single point from which you may
access all other lab routers through reverse telnet.

Reverse Telnet

Most Telnet connections are considered forward connections, or connections
accepted into a line or interface. Reverse Telnet means that the Telnet session
is initiated out of the line (like an asynchronous line) instead of accepting a
connection into the line. Thus, reverse Telnet allows you to Telnet out from a
device that you are Telnetting to, but on a different interface, such as an
asynchronous port. For example, the terminal server has a LAN (Ethernet) IP
address of 10.160.8.1. If you want to connect to R1 on asynchronous line 2001,
you would issue the following command from the terminal server:

Termserver#telnet 10.160.8.1 2001

Essentially, you are telling the router to connect to its own Ethernet 0 IP
address of 10.160.8.1 via Telnet but to initiate the connection out line 2001.
This will be a fundamental part of the lab exercises, so let's demonstrate
how this is done.

In the lab, you will do reverse Telnet using an IP address assigned to a
loopback interface. Loopback addresses are preferred because they are virtual
and thus always available. For reverse Telnet to work, the interface that is
used must be up and the line protocol must be up. Because of this, using a
loopback interface is advantageous because it never goes down, as opposed to an
Ethernet interface, which might go down and prevent reverse Telnet from working.

Terminal Server Configuration

Now that you have an understanding of how the terminal server is physically
connected and how reverse Telnet functions, it's time to examine how to
configure the terminal server.

The steps to configure the terminal server are as follows:

Step 1

Create a loopback interface.

Step 2

Assign an IP address to the loopback interface.

Step 3

Allow Telnet as a transport across asynchronous lines 1 to 16.

Step 4

Create a host table that maps a router's host
name (such as R1, R2, and so on) to the asynchronous line it is connected to on
the terminal server (such as 2001, 2002, and so on).

Steps 1 and 2: Creating a Loopback Interface and Assigning an IP
Address

Begin by creating the loopback interface from global configuration mode.
Going into interface configuration mode for the loopback 0 interface creates the
loopback interface and brings up the interface, as highlighted in Example 4-11.
You can assign the interface any number in the range of 0 to 2147483647. Use
loopback 0 and assign it an IP address of 192.168.10.10 with a mask of
255.255.255.0, as shown in Example 4-10.

Example 4-10 Creating loopback 0 and Assigning It an IP Address

Termserver(config)#
Termserver(config)#interface loopback0
Termserver(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
Termserver(config-if)#
%LINK-3-UPDOWN: Interface Loopback0, changed state to up
Termserver(config-if)#ip address 192.168.10.10 255.255.255.0

Exit interface configuration mode by doing a CTRL-Z and do a show
running-config to show how this interface now appears in the output in
Example 4-11.

Example 4-11 loopback0 Interface as It Appears in Running-Config After
Creation

Step 3: Allowing Telnet as a Transport Across Asynchronous Lines 1 to
16

Now that the loopback 0 interface is created, you need to ensure that the
asynchronous lines allow Telnet to traverse the lines.

This is done using the transport inputx
command, where x is the protocol that you want to
allow, such as Telnet. The command allows the granularity of permitting only
certain protocols to cross the asynchronous lines. The allowed protocols are
shown using context-sensitive help, as demonstrated in Example 4-13.

Example 4-13 Available Protocols Configurable for Transport Across the
Asynchronous Lines

In the lab, you will do a transport input telnet to allow
Telnet to cross the lines.

Enter line configuration mode for asynchronous lines 1 through 16. To do
this, type line 1 16 from privileged EXEC mode.

NOTE

In the lab, you are really concerned with only Lines 1 to 7 (2001 to 2007)
because they are the only asynchronous lines that have routers connected to
them. However, because a Cisco 2511 has two asynchronous interfaces, 16 lines
total are available (8 per asynchronous interface) for configuration.

Upon entering line configuration mode, allow all protocols to be transported
across the lines, as shown in Example 4-15.

Example 4-14 Allow All Protocols to Cross the Asynchronous Lines

Step 4: Creating a Host Table That Maps a Router's Host Name to the
Asynchronous Line to Which It Is Connected on the Terminal Server

At this point, the terminal server is configured and should be functional;
however, as a timesaver, you will create a host table that maps the router name
to the loopback 0 interface and then specify the asynchronous port out which to
initiate the reverse Telnet session. This is done using the ip host
command. The ip host command is a static DNS entry used
by the router. The router will translate "R1" to 192.168.10.10 port
2001. When this host table is completed, you will access each router by typing
the host name of the router. For example, typing R1 initiates a
reverse Telnet session out asynchronous line 1 (2001). Create the table from
global configuration mode as shown in Example 4-15.

Saving and Testing the Terminal Server Configuration

Exit back to global configuration mode by doing a CTRL-Z and then save the
configuration. Next, test reverse Telnet functionality by typing
r1 from user EXEC or privileged EXEC mode, as shown in Example
4-16.

Example 4-16 Successful Reverse Telnet to R1

You can see from Example 4-16 that the terminal server initiates a connection
to R1. It does this by connecting to its own loopback 0 address of 192.168.10.10
(via Telnet) and then redirecting the connection out asynchronous port 2001.
Because the Telnet connection is "redirected," it is referred to a
reverse Telnet connection. Next, hit the Enter key to get the
Router> prompt. R1's console port is connected to
asynchronous line 1 (port 2001) of the terminal server. By hitting the Enter
key, you are placed into R1's user EXEC mode. At this point, give the
router a host name of R1 to avoid confusion about which router you are connected
to. Change the host name to R1, and save the changes, as shown in Example 4-17.

Example 4-19 Established Sessions on the Terminal Server

When a reverse Telnet session is established, the session is given a
connection number. The asterisk preceding the connection number indicates that
the session is active, as highlighted in Example 4-19.

To return to an active session, you can simply enter the connection number.
Upon seeing the message [Resuming connection 1 to R1 ... ],
press the Enter key and you are taken to R1, as demonstrated in Example 4-20.

Example 4-20 Resuming an Active Reverse Telnet Session Using the Connection
Number

Termserver#1
[Resuming connection 1 to r1 ... ]
Hit Enter key
R1#

Occasionally, when initiating the reverse Telnet session, the connection
might be refused and you will not be able to get into a router; you will see a
message as shown in Example 4-21.

Example 4-21 Reverse Telnet Session Refused by Remote Host

When the connection is refused, you need to clear the asynchronous line and
attempt the reverse Telnet again. This is done by doing a clear line
1, confirming the request by pressing Enter, and then entering
r1 to reinitiate the reverse Telnet connection, as shown in
Example 4-22.

Example 4-22 Clearing the Asynchronous Line 1 After a Connection Is Refused
and Reinitiating the Reverse Telnet Connection

You might need to clear the line a few times before it completely clears.

You have now successfully connected to R1 through reverse Telnet.

Return to the terminal server from R1 using Ctrl-Shift-6, x.
Execute a show sessions command on the terminal server to
display that connection 1 is an established reverse Telnet session to R1. To
disconnect a previously established reverse Telnet session, you can enter
disconnect and the connection number, and then hit Enter to
confirm the disconnect, as shown in Example 4-23.

To finish, set up a reverse Telnet connection to each ofthe
lab devices, R1 through R6. First, you'll connect to each router by typing
the router's host name, hitting Enter, and then entering the escape
sequence Ctrl-Shift-6, x to get back to the terminal server to
repeat the process for the next router (see Example 4-25).

Notice in Example 4-25 that the reverse Telnet session is successful because
the connection shows Open and you are taken to the router prompt
of each respective device. R1 is the only router with a configured host name
because it is the only router that you have configured with a host name so far.
Thus, the remaining routers take you to the Router> prompt.

NOTE

Individual host names for the remaining routers will be configured in Chapter
6, "General Router Configurations."

Reverse Telnetting to the Catalyst 1900 Switch

Next, establish a reverse Telnet session to the Catalyst 1900 switch by
entering cat1900 and pressing Enter, as shown in Example
4-26.

Example 4-26 Setting Up a Reverse Telnet Session to the Catalyst 1900
Switch

From this point on, when configuring lab devices, you can access each device
by simply entering the connection number associated with the device from the
terminal server (that is, 1 to access R1, 2 to
access R2, and so on).