Cisco Terminal Server Configuration Example
Cisco Terminal Server Configuration Example
Example
1vote
InthistutorialIllshowyouhowtoconfigureyourownCiscoTerminalServer.Thisisagreatsolutionforyour
homeorremotelabwhenyouwanttohaveaccesstotheconsoleofmultipledevices.Thereareacoupleof
hardwareproductsthatwecanuseforthis,belowisanexampleoftheCisco2511-RJ:
Cisco2511RJTerminalServer
Thisrouterhas16built-inconnectorsthatcanbeusedforconsoleaccess.Thisisagreatall-in-onerouter
touseasaterminalserverbuttheycanbeexpensivesometimes.AnotheroptionistheNM16-AorNM32-A
AsyncNetworkModule,theylooklikethis:
Youcanusethismoduleinarouteranditcomeswithaconvenientcabletoconnecttoyourconsoleports.
Whateveryoupick,theconfigurationwillbeprettymuchthesame.
IllwalkyouthroughtheconfigurationandIllexplainwhyyourequirecertaincommands.
Configuration
Makingaconnectionfromtheroutertooneoftheconsoleportsiscalledreversetelnet.Inordertodothis,we
requireanIPaddresstoconnectto.WecandothisbycreatingaloopbackinterfacewithanIPaddressonit:
Router(config)#interfaceLoopback0
Router(config-if)#ipaddress10.10.10.10255.255.255.0
JustpickanyIPaddressyoulike,itsonlyusedlocallyonyourrouter.
Yourterminal-server-to-becomeswithsomelinesthatrefertotheportsthatithas.Youcanusetheshowline
commandtoseewhatlinenumbersituses:
Router#showline
TtyTypTx/RxAModemRotyAccOAccIUsesNoiseOverruns
Int
0CTY-----000/0
-
1TTY9600/9600-----000/0
-
2TTY9600/9600-----000/0
-
3TTY9600/9600-----000/0
-
4TTY9600/9600-----000/0
-
5TTY9600/9600-----000/0
-
6TTY9600/9600-----000/0
-
7TTY9600/9600-----000/0
-
8TTY9600/9600-----000/0
-
9TTY9600/9600-----000/0
-
10TTY9600/9600-----000/0
-
11TTY9600/9600-----000/0
-
12TTY9600/9600-----000/0
-
13TTY9600/9600-----000/0
-
14TTY9600/9600-----000/0
-
15TTY9600/9600-----000/0
-
16TTY9600/9600-----000/0
-
17AUX9600/9600-----000/0
-
[outputomitted]
Myrouter(2511-RJ)has16portswhichtranslatetoTTYline1-16,youcanseethemabove.Totestourlines
wecantelnettoourIPaddressontheloopbackinterfaceandspecifyingtheportnumber.Theportnumberis
2000+linenumber,soforline1Ineedtotelnettoport2001:
Router#telnet10.10.10.102001
Trying10.10.10.10,2001...Open
Thisseemstobeworking,itsaysOpenwhichmeansitsconnected.Youshouldbeabletoseetheconsole
ofwhateverdeviceyouareconnectedtonow.Ifyouwanttoreturntoyourterminalserveryouneedtopress
CTRL+SHIFT+6andthenX.Thisdoesntkilltheconnnectionbutputsitinthebackground,ifyouwantto
terminateityoullhavetousetheclearlinecommand:
Router#clearline1
[confirm]
[OK]
Insteadoftypingthesecommandswecanusesomeshortcuts,wealsorequiretheseforourmenu:
Router(config)#iphostR1200110.10.10.10
Router(config)#aliasexecclr1clearline1
TheiphostcommandtellstherouterthatwheneverwetypeR1thatithastotelnetto10.10.10.10port
2001.Thealiasexeccommandmeansthatwheneverwetypeclr1thatithastoperformclearline1.
Heresademonstrationofthesetwocommands:
Router#R1
Translating"R1"
TryingR1(10.10.10.10,2001)...Open
WearenowconnectedtoR1andafterdoingSHIFT+CTRL+6,Xtoreturntotherouterwellcleartheline:
Router#clr1
[confirm]
[OK]
Sofarsogood,nowitstimetocreateamenuthatshowstheseoptionstoourlabusers.Illaddsome
commandsforR2andR3sowellhaveanicemenuwith3routerstoconnectto:
Router(config)#iphostR2200210.10.10.10
Router(config)#iphostR3200310.10.10.10
Router(config)#aliasexecclr2clearline2
Router(config)#aliasexecclr3clearline3
Nowitstimetoconfigurethemenu:
Router(config)#
menuMYMENUtitle^
************************TERMINALSERVER**************************
************************MENU**************************
Toexitsshsessionandreturntothemenupress
<CTRL>+<SHFT>+<6>then<X>.Toclearaconnectiontobegin
anewconsolesessiontypecls#(where#=themenuitemnumber)
Type"exit"toreturntomainmenu.
*****************************************************************
ITEM#DEVICENAME
-----------------------------------------------------------------^C
menuMYMENUprompt^Pleaseenteryourselection:^C
menuMYMENUtext1R1
menuMYMENUcommand1resumeR1/connecttelnetR1
menuMYMENUtext2R2
menuMYMENUcommand2resumeR2/connecttelnetR2
menuMYMENUtext3R3
menuMYMENUcommand3resumeR3/connecttelnetR3
menuMYMENUtext4Exit
menuMYMENUcommand4hangup
menuMYMENUcommandcls1clr1
menuMYMENUcommandcls2clr2
menuMYMENUcommandcls3clr3
ThemenuiscalledMYMENUandfirstitwillshowtheuseranintroductionhowtousethemenu.Itwillthen
showanoptiontoconnecttoR1,R2orR3,quitthemenuorclearthelines.
Wecantestthismenubyrunningitfromtheconsole:
Router#menuMYMENU
************************TERMINALSERVER**************************
************************MENU**************************
Toexitsshsessionandreturntothemenupress
<CTRL>+<SHFT>+<6>then<X>.Toclearaconnectiontobegin
anewconsolesessiontypecls#(where#=themenuitemnumber)
Type"exit"toreturntomainmenu.
*****************************************************************
ITEM#DEVICENAME
-----------------------------------------------------------------
1R1
2R2
3R3
4Exit
Pleaseenteryourselection:
That'swhatthemenulookslike...cleanandsimple!Youprobablydon'twantyouruserstoconnecttoyour
routerandstartingthemenumanuallysowe'llcreateauserthatautomaticallylaunchesthismenuwhen
loggedin:
Router(config)#usernamelabuserprivilege2passwordcisco123
Router(config)#usernamelabuserautocommandmenuMYMENU
Thisusercalled"labuser"withhaveaprivilegelevelof2andwheneverhe/shelogsinthecommand"menu
MYMENU"isautomaticallylaunched.Auserwithaprivilegelevelof2doesn'thavepermissiontoclearthe
linesofyourroutersowe'llhavetoaddthis:
Router(config)#privilegeexeclevel2clear
Router(config)#privilegeexeclevel2clearline
Thisusernowhaspermissiontoclearthelines.Lastbutnotleast,we'llconfigureourVTYlinestouselocal
authentication:
Router(config)#linevty015
Router(config-line)#loginlocal
Router(config-line)#exec-timeout00
That'sallwehavetoconfigure.Useanydevicetoconnecttoyourterminalserverandyouwillseethemenu
whenloggedin:
#telnet192.168.12.1
Trying192.168.12.1...Open
UserAccessVerification
Username:labuser
Password:cisco123
************************TERMINALSERVER**************************
************************MENU**************************
Toexitsshsessionandreturntothemenupress
<CTRL>+<SHFT>+<6>then<X>.Toclearaconnectiontobegin
anewconsolesessiontypecls#(where#=themenuitemnumber)
Type"exit"toreturntomainmenu.
*****************************************************************
ITEM#DEVICENAME
-----------------------------------------------------------------
1R1
2R2
3R3
4Exit
Pleaseenteryourselection:
Afterlogginginweseethemenuanditsoptions.That'sallthereistoit!Ihopethistutorialhasbeenhelpfulto
you,ifyouhaveanyquestionsfeelfreetoleaveacomment.