Networking

Setting up a Cisco Access Server

Build a lab access server from a Cisco 2511 or NM-32A. Finding the line numbers, reverse telnet host entries, and moving between console sessions.

Tony Mattke · 2011.01.24 · 5 min read

Whether your networking lab has 3 devices or 30 an access server, also commonly called a terminal server, is the vital connection between you and those devices. For this purpose most engineers use routers with asynchronous serial ports to connect to console (serial) ports on other devices. There are a couple of ways this can be accomplished as these ports can be found on a few devices and line cards. One of the popular methods is to use older Cisco 2509/2511 routers with either asynchronous RJ45 ports, or a 68 pin SCSI II interface that uses a cable called a cab-octal, giving you 8 ports per interface. Another popular method seems to be the NM-32A network module which offers 32 async interfaces. See the following images for a depiction of each.

How does all of this work?

Our Cisco router assigns port numbers to each serial interface connected to it. We can use these to communicate directly with each line. For example, on the 16 port Cisco 2511, these port numbers are 2001 – 2016. We reference these on the router using a static host configuration. The IP address specified can either be an interface IP, or a loopback address. When using other hardware, such as the NM-32a, your port numbers may change depending on which slot you use on the router. One method of determining your port numbers is to issue a show line command on your access server. As you can see below, the lines may not always be 1-32, or 1-16. As shown below, this server uses lines 33-65, or port numbers 2033 through 2065.

text
AccessServer#show line
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int
* 0 CTY - - - - - 0 0 0/0 -
33 TTY 9600/9600 - - 1 - - 2 0 0/0 -
34 TTY 9600/9600 - - 2 - - 1 37 0/0 -
35 TTY 9600/9600 - - 3 - - 0 148 0/0 -
36 TTY 9600/9600 - - 4 - - 0 149 0/0 -
37 TTY 9600/9600 - - 5 - - 0 172 0/0 -
38 TTY 9600/9600 - - 6 - - 0 199 0/0 -
< .... SNIP .... >
61 TTY 9600/9600 - - 29 - - 0 0 0/0 -
62 TTY 9600/9600 - - 30 - - 0 0 0/0 -
63 TTY 9600/9600 - - 31 - - 0 0 0/0 -
64 TTY 9600/9600 - - 32 - - 0 0 0/0 -
65 AUX 9600/9600 - - - - - 0 0 0/0 -
66 VTY - - - - - 2 0 0/0 -
67 VTY - - - - - 0 0 0/0 -
68 VTY - - - - - 0 0 0/0 -
69 VTY - - - - - 0 0 0/0 -
70 VTY - - - - - 0 0 0/0 -

Line(s) not in async mode -or- with no hardware support:
1-32

Configuration

After figuring ouch which ports are going to go to which device we can start generating a configuration. First we’re going to configure our serial lines to allow us to connect to them via telnet, then configure the no exec option (While far from being mandatory, it will certainly help you from becoming locked out of a line). We’re also going to use exec-timeout 0 0 to prevent our sessions from disconnecting us when idle.

text
AS(config)#line 1 16
AS(config-line)#transport input telnet
AS(config-line)#no exec
AS(config-line)#exec-timeout 0 0

Now we can move on to our host configuration. In this case we’re going to use a loopback interface on the device to “talk” with.

text
AS(config)#interface lo0
AS(config-if)#ip address 10.0.0.1 255.255.255.255
AS(config-if)#exit
AS(config)#ip host r1 2001 10.0.0.1
AS(config)#ip host r2 2002 10.0.0.1
AS(config)#ip host r3 2003 10.0.0.1
AS(config)#ip host r4 2004 10.0.0.1
AS(config)#ip host r5 2005 10.0.0.1
AS(config)#ip host r6 2006 10.0.0.1
AS(config)#ip host sw1 2007 10.0.0.1
AS(config)#ip host sw2 2008 10.0.0.1
A complete, working example configuration.

 

text
AS#sh run
Building configuration...

Current configuration:
!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname AS
!
!
ip subnet-zero
ip host r1 2001 10.0.0.1
ip host r2 2002 10.0.0.1
ip host r3 2003 10.0.0.1
ip host r4 2004 10.0.0.1
ip host r5 2005 10.0.0.1
ip host r6 2006 10.0.0.1
ip host sw1 2007 10.0.0.1
ip host sw2 2008 10.0.0.1
!
!
!
interface Loopback0
 ip address 10.0.0.1 255.255.255.0
 no ip directed-broadcast
!
interface Ethernet0
 ip address 192.168.88.23 255.255.255.0
 no ip directed-broadcast
 shutdown
!
interface Serial0
 no ip address
 no ip directed-broadcast
 no ip mroute-cache
 shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.88.1
!
!
line con 0
 transport input none
line 1 16
 no exec
 exec-timeout 0 0
 transport input telnet
line aux 0
line vty 0 4
 login
!
end

Using the Access Server

Now that we’ve got things up and running, lets go over some of the basics of using our access server. The first thing you need to know is how to connect to your devices, right? Well, simply type in the name of the host we configured and you’ll be connected to that line.

text
AS#r1
Trying r1 (10.0.0.1, 2001)... Open

% Please answer ‘yes’ or ‘no’.

Would you like to enter the initial configuration dialog? [yes/no]:

To get back to your access server, use the Cisco escape sequence. Ctrl + Shift + 6 then X Now you’re able to clear that line. Use the command show sessions to see which lines are open, to clear them simply type clear line [line number]. ( You can also use the command disconnect [session number] to clear any open sessions. )

text
AS#show sessions
Conn Host                Address             Byte  Idle Conn Name
*  1 r1                  10.0.0.1               0     0 r1

AS#clear line 1
[confirm]
 [OK]

If you simply wish to switch back to that session, just type the connection number (at left) displayed in the show sessions output. ( Pressing enter on an empty line also resumes your most recent session. )

text
AS#show sessions
Conn Host                Address             Byte  Idle Conn Name
*  1 r1                  10.0.0.1               0     0 r1

AS#1
[Resuming connection 1 to r1 ... ]
Topics

Related Posts

Everything Else · 2 min read

Working on My New Lab Setup

2009.05.19

So, I purchased a couple extra routers, and a second layer3 switch from @usedciscoguy. He gave me a really good deal and I plan on purchasing a 6500 series switch from him as soon as I can afford it.

Networking · 5 min read

More IOS Tips

2010.06.09

Learning the particulars of Cisco IOS is one of the most valuable things a network engineer can do. These skills will be the basis of everything you do on the lab and on your network.

Security · 8 min read

Best Practices and Securing Cisco IOS

2011.09.06

Everyone has different views on hardening IOS, and while I do not claim to be an expert, these are the practices that I commonly use when bringing up a new device.

Comments

11 archived comments from Disqus 2011–2016
Tom
Great post, helped a lot!
sharmith
How is the physical connectivity done for this? What configuration is required at client devices?
Keith
Great post. Thanks. I intend to upgrade from using a old 2511 and reverse telnet, to a 2811 with a NM-32A and reverse SSH. I would appreciate some help in the configuration on my 2811 (acting as the access server) and any configuration I need to add to my other routers and my switches. One other question I had was.. Should I use a Program called “Putty” to run SSH to the 2811 or is there a better program to use? Appreciate your posts on this. Thanks in advance.
Andy
Awesome..But can we use 2600 series or 2800 series as an access server?
dipen
i am unable to use my 2611xm for both routing and access server purpose. i works fine till i use it a a dedicated access server . but hangs up as soon as i configure ip routing on it. i have nm-16 as installed on my 2611xm router
Rana

Hello

I am using NM-32AS in 2600xm I can connect from my access-server to every device but i can not return to access server I used Tab CTRL + SHIFT + 6 + X but connection will stay where i first connected, any help appreciated.

ceresness

did any of these comments get a response?

try CTRL + SHIFT + 6 release then x

ammar
please how to change or remove asynchronous line from the access server ?
Schaeffer
Have you found a way to log all activity / commands that are issued over these async lines? The only thing I have found so far is the “monitor traffic line line number in” command that monitors the async lines directly. I would like to dump everything into a log file some way some how.
Giantkiller
Good process but I would want to assume everyone reading this really might be everyone. This would include those not well versed. Write it out so your grandmother could do it. The part for configuring the host name is missing on the term server. The subnet of the loop back address is 255.255.255.255 but the show run shows 255.255.255.0
Rich Douglas
Nice post, but I need a guide from start to end. Still was very informative. Thanks to guys like you that helps guys like me.