Configuring the Terminal Server > CCNA Practical Studies: Gaining Access to Routers and Switches (2024)

Configuring the Terminal Server

This section demonstrates how to configure a terminal server to provideaccess to the rest of the routers in the lab. Once configured, you will be ableaccess 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. Portassignments 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 theterminal server to each individual lab router and then back to the terminalserver.

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-bandaccess that occurs over the network using telnet. Generally, a terminal serveris a router with multiple, asynchronous ports that are connected to otherdevices, such as the console port of other routers or switches, as shownpreviously 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.

Figure 4-12A Cisco 2511 to Be Configured as the Lab Terminal Server

Cabling

The Cisco 2511 series router uses a 68-pin connector and breakout cable (seeFigure 4-13).

Figure 4-13CAB-OCTAL-ASYNC Cable

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

Figure 4-14Terminal Server Connectivity to Lab Routers

NOTE

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-DCEdevices require a straight-through cable. Because the Octal cable is rolled, youcan 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 ofRJ-45. If so, remember that the 25-pin interface is a DCE, and you must use theRJ-45-to-25 pin adapter marked "modem" to reverse the roll andcomplete the connection.

The major benefit of a terminal server is that it allows you a single pointfrom which to access the console ports of many devices. This is helpfulinitially in the lab because the lab routers will not have any configurationsettings such as IP addresses or Telnet parameters. Without the terminal server,you would have the tedious process of manually switching between eachrouter's console port to gain access. A second benefit is that a terminalserver can provide fault tolerance in case the routers become inaccessiblebecause of a network failure. This is because you can configure a modem on theauxiliary or asynchronous port of the terminal server, allowing dialupconnectivity to the terminal server and thus to each router that the terminalserver is connected to.

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

Reverse Telnet

Most Telnet connections are considered forward connections, or connectionsaccepted into a line or interface. Reverse Telnet means that the Telnet sessionis initiated out of the line (like an asynchronous line) instead of accepting aconnection into the line. Thus, reverse Telnet allows you to Telnet out from adevice that you are Telnetting to, but on a different interface, such as anasynchronous port. For example, the terminal server has a LAN (Ethernet) IPaddress 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 IPaddress 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 demonstratehow this is done.

In the lab, you will do reverse Telnet using an IP address assigned to aloopback interface. Loopback addresses are preferred because they are virtualand thus always available. For reverse Telnet to work, the interface that isused must be up and the line protocol must be up. Because of this, using aloopback interface is advantageous because it never goes down, as opposed to anEthernet 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 physicallyconnected and how reverse Telnet functions, it's time to examine how toconfigure 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 hostname (such as R1, R2, and so on) to the asynchronous line it is connected to onthe terminal server (such as 2001, 2002, and so on).

Steps 1 and 2: Creating a Loopback Interface and Assigning an IPAddress

Begin by creating the loopback interface from global configuration mode.Going into interface configuration mode for the loopback 0 interface creates theloopback 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. Useloopback 0 and assign it an IP address of 192.168.10.10 with a mask of255.255.255.0, as shown in Example 4-10.

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

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

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

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

Termserver(config-if)#^ZTermserver#show running-configCurrent configuration:!version 11.2service password-encryptionno service udp-small-serversno service tcp-small-servers!hostname Termserver!enable password 7 0200055708090132!interface Loopback0 ip address 192.168.10.10 255.255.255.0! 

You can also do a show interface loopback0 to verify that theloopback interface is up and has the correct IP address, as in Example 4-12.

Example 4-12show interface loopback0 Command Output Verifies InterfaceStatus and IP Address

Termserver#show interface loopback0Loopback0 is up, line protocol is up Hardware is Loopback Internet address is 192.168.10.10/24 MTU 1514 bytes, BW 8000000 Kbit, DLY 5000 usec, rely 255/255, load 1/255 Encapsulation LOOPBACK, loopback not set, keepalive set (10 sec) Last input never, output never, output hang never Last clearing of "show interface" counters never Queueing strategy: fifo Output queue 0/0, 0 drops; input queue 0/75, 0 drops 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 0 packets output, 0 bytes, 0 underruns 0 output errors, 0 collisions, 0 interface resets 0 output buffer failures, 0 output buffers swapped outTermserver#

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

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

This is done using the transport input xcommand, where x is the protocol that you want toallow, such as Telnet. The command allows the granularity of permitting onlycertain protocols to cross the asynchronous lines. The allowed protocols areshown using context-sensitive help, as demonstrated in Example 4-13.

Example 4-13Available Protocols Configurable for Transport Across theAsynchronous Lines

Termserver(config)#line 1 16 Termserver(config-line)#transport input ? all All protocols lat DEC LAT protocol mop DEC MOP Remote Console Protocol nasi NASI protocol none No protocols pad X.3 PAD rlogin Unix rlogin protocol telnet TCP/IP Telnet protocol v120 Async over ISDNTermserver(config-line)#transport input

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

Enter line configuration mode for asynchronous lines 1 through 16. To dothis, 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 tothem. However, because a Cisco 2511 has two asynchronous interfaces, 16 linestotal are available (8 per asynchronous interface) for configuration.

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

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

Termserver(config)#line 1 16Termserver(config-line)#transport input telnet Termserver(config-line)#^Z

Step 4: Creating a Host Table That Maps a Router's Host Name to theAsynchronous 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 nameto the loopback 0 interface and then specify the asynchronous port out which toinitiate the reverse Telnet session. This is done using the ip hostcommand. The ip host command is a static DNS entry usedby the router. The router will translate "R1" to 192.168.10.10 port2001. When this host table is completed, you will access each router by typingthe host name of the router. For example, typing R1 initiates areverse Telnet session out asynchronous line 1 (2001). Create the table fromglobal configuration mode as shown in Example 4-15.

Example 4-15Creating IP Host Table for Reverse Telnet

Termserver#config tEnter configuration commands, one per line. End with CNTL/Z.Termserver(config)#ip host r1 2001 192.168.10.10Termserver(config)#ip host r2 2002 192.168.10.10Termserver(config)#ip host r3 2003 192.168.10.10Termserver(config)#ip host r4 2004 192.168.10.10Termserver(config)#ip host r5 2005 192.168.10.10Termserver(config)#ip host r6 2006 192.168.10.10Termserver(config)#ip host cat19 2007 192.168.10.10 Termserver(config)# 

Saving and Testing the Terminal Server Configuration

Exit back to global configuration mode by doing a CTRL-Z and then save theconfiguration. Next, test reverse Telnet functionality by typingr1 from user EXEC or privileged EXEC mode, as shown in Example4-16.

Example 4-16Successful Reverse Telnet to R1

Termserver#^Z Termserver#copy running startupBuilding configuration...[OK]Termserver#r1Trying r1 (192.168.10.10, 2001)... Open Hit enter keyRouter> 

You can see from Example 4-16 that the terminal server initiates a connectionto 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 areverse Telnet connection. Next, hit the Enter key to get theRouter> prompt. R1's console port is connected toasynchronous line 1 (port 2001) of the terminal server. By hitting the Enterkey, you are placed into R1's user EXEC mode. At this point, give therouter a host name of R1 to avoid confusion about which router you are connectedto. Change the host name to R1, and save the changes, as shown in Example 4-17.

Example 4-17Hostname Changed from Router to R1

Router>enableRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1R1(config)#^ZR1#copy running startupBuilding configuration...[OK]R1# 

To get back to the terminal server, type Ctrl-Shift-6, x fromR1, as in Example 4-18.

Example 4-18Return to the Terminal Server via the Escape Sequence

R1#Ctrl-Shift-6, xTermserver#

Upon doing the escape sequence (Ctrl-Shift-6, x), notice thatyou have been returned to the terminal server, as shown by the change from theR1# prompt to the Termserver# prompt in Example4-18.

Connecting, Disconnecting, and Verifying Reverse Telnet Sessions

From the terminal server, you can view active reverse Telnet connections bydoing show sessions, as in Example 4-19.

Example 4-19Established Sessions on the Terminal Server

Termserver#show sessionsConn Host Address Byte Idle Conn Name* 1 r1 192.168.10.10 0 3 R1Termserver# 

When a reverse Telnet session is established, the session is given aconnection number. The asterisk preceding the connection number indicates thatthe 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-20Resuming an Active Reverse Telnet Session Using the ConnectionNumber

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

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

Example 4-21Reverse Telnet Session Refused by Remote Host

Termserver#r1Trying r1 (192.168.10.10, 2001)...% Connection refused by remote hostTermserver# 

When the connection is refused, you need to clear the asynchronous line andattempt the reverse Telnet again. This is done by doing a clear line1, confirming the request by pressing Enter, and then enteringr1 to reinitiate the reverse Telnet connection, as shown inExample 4-22.

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

Termserver#r1Trying r1 (192.168.10.10, 2001)...% Connection refused by remote hostTermserver#clear line 1[confirm] [OK]Termserver#r1Trying r1 (192.168.10.10, 2001)... OpenR1> 

TIP

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 todisplay that connection 1 is an established reverse Telnet session to R1. Todisconnect a previously established reverse Telnet session, you can enterdisconnect and the connection number, and then hit Enter toconfirm the disconnect, as shown in Example 4-23.

Example 4-23Disconnecting an Established Reverse Telnet Session

R1>Termserver#show sessions Conn Host Address Byte Idle Conn Name* 1 r1 192.168.10.10 0 0 R1Termserver#disconnect 1Closing connection to r1 [confirm]Termserver# 

Now if you do a show sessions on the terminal server, asdemonstrated in Example 4-24, you can see that the reverse Telnet session to R1was disconnected.

Example 4-24No Active Reverse Telnet Session After Doing a Disconnect

Termserver#show sessions% No connections openTermserver# 

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

Example 4-25Setting Up a Reverse Telnet Session to Each Lab Router

Termserver#r1Trying r1 (192.168.10.10, 2001)... OpenR1>Termserver#r2Trying r2 (192.168.10.10, 2002)... OpenRouter>Termserver#r3Trying r3 (192.168.10.10, 2003)... OpenRouter>Termserver#r4Trying r4 (192.168.10.10, 2004)... OpenRouter>Termserver#r5Trying r5 (192.168.10.10, 2005)... OpenRouter>Termserver#r6Trying r6 (192.168.10.10, 2006)... OpenRouter>Termserver# 

Notice in Example 4-25 that the reverse Telnet session is successful becausethe connection shows Open and you are taken to the router promptof each respective device. R1 is the only router with a configured host namebecause 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 Chapter6, "General Router Configurations."

Reverse Telnetting to the Catalyst 1900 Switch

Next, establish a reverse Telnet session to the Catalyst 1900 switch byentering cat1900 and pressing Enter, as shown in Example4-26.

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

Termserver#cat1900Trying cat1900 (192.168.1.3, 2007)... Open-------------------------------------------------Catalyst 1900 Management ConsoleCopyright (c) Cisco Systems, Inc. 1993-1997All rights reserved.Ethernet address: 00-C0-1D-80-C7-5E-------------------------------------------------1 user(s) now active on Management Console.Enter password:Termserver#

Now from the terminal server, do a show sessions and noticethat each reverse Telnet session has been assigned a connection number (seeExample 4-27).

Example 4-27Connections Numbers Assigned to Each Lab Device

Termserver#show sessionsConn Host Address Byte Idle Conn Name 1 r1 192.168.10.10 0 0 R1 2 r2 192.168.10.10 0 0 r2 3 r3 192.168.10.10 0 0 r3 4 r4 192.168.10.10 0 0 r4 5 r5 192.168.10.10 0 0 r5 6 r6 192.168.10.10 0 0 r6 7 cat1900 192.168.10.10 0 0 cat1900

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

Configuring the Terminal Server > CCNA Practical Studies: Gaining Access to Routers and Switches (2024)
Top Articles
Latest Posts
Article information

Author: Greg O'Connell

Last Updated:

Views: 5673

Rating: 4.1 / 5 (62 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.