2511 tty disconect

Answered Question

Hi All,

I'm sure many of you have a 2511 connecting to your Cisco gear & you simply reverse telnet to your equipment.

Now I'm trying to tweak it a bit, I've been searching & reading for hours on how to clear the tty sessions automatically after a specific amount of time (preferably idle time, for testing 1 minute) to free up the port for others to use, rather than having to telnet in to the 2500 & having to clear the line

Many of the settings below are not part of my normal config, but it's an example of settings I've tried. I'm baffled, I have no problem disconnecting consol or telnet sessions after a specified timeout, so I'm assuming there's something different about either reverse telnet or with async ports, but then again it could be a IOS bug, I?m running Version 12.1(5)T4

Any help would be greatly appreciated, thanks

line 1 16

session-timeout 60

exec-timeout 1 0

timeout login response 60

absolute-timeout 1

login authentication linmethod

modem InOut

transport preferred none

transport input all

stopbits 1.5

login authentication linmethod

modem InOut

transport preferred none

transport input all

stopbits 1.5

I have this problem too.
0 votes
Correct Answer by sundar.palaniappan about 9 years 7 months ago

That should work. At the least, it had worked in my lab in the past.

Can you configure 'no exec' under the tty lines and see if that makes any difference.

I don't know if you looked at this document. Have a look at it.

http://www.cisco.com/en/US/tech/tk801/tk36/technologies_configuration_example09186a008014f8e7.shtml#configs

HTH

Sundar

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (2 ratings)
Loading.

Thanks for the response, I'm not quite sure exactly you meant by "menu" though. Every time I need to clear the connection I execute the following

TS009# clear line tty 2

[confirm]

[OK]

But what I actually want is for it to be cleared automatically after say 10 minutes of inactivity. For example, the following config is used to clear VTY sessions after 5 minutes of inactivity & I am looking for something similar for TTY, in my mind this should be a simple task, but yet the answer eludes me :-( I?ve tried everything I can think of & spent so much time searching I thought someone here might have had a similar experience

line vty 0 4

access-class 1600 in

exec-timeout 5 0

login authentication vtymethod

transport input telnet

transport output telnet

!

Thanks,

Gary

ahmednaas Mon, 02/26/2007 - 11:22

Gary,

Take a look at this config for a 2509. When you telnet into the access-server you get a menu to select which port/device you want to telnet to. If it is not available, you can clear the session from the menu. It is not as automated as what you want but it is quite handy.

========

! If you go in on the console port then you must issue

! "menu cserver" to start the menu up.

!

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname console-server

!

enable secret cisco

!

enable password cisco

!

ip subnet-zero

no ip domain-lookup

!

ip host c1 2001 10.1.0.1

ip host c2 2002 10.1.0.1

ip host c3 2003 10.1.0.1

ip host c4 2004 10.1.0.1

ip host c5 2005 10.1.0.1

ip host c6 2006 10.1.0.1

ip host c7 2007 10.1.0.1

ip host c8 2008 10.1.0.1

!

process-max-time 200

!

interface Loopback20

ip address 10.1.0.1 255.255.255.255

no ip directed-broadcast

!

interface Ethernet0

ip address 10.1.1.2 255.255.255.0

no ip directed-broadcast

no ip route-cache

no ip mroute-cache

!

interface Serial0

no ip address

no ip directed-broadcast

no ip route-cache

no ip mroute-cache

shutdown

!

interface Serial1

no ip address

no ip directed-broadcast

no ip route-cache

no ip mroute-cache

no shutdown

!

!

ip classless

no ip http server

!

menu cserver title $If you have problems connecting to your device

clear the connection via cl+# (ie:cl1) and try again.

To exit back out to the menu press "CTRL+SHIFT+6"

then "X". You must then clear the connection and

begin a new console session to re-connect to

that device.

--------------------------------------------------------

1 - Connect to console1

2 - Connect to console2

3 - Connect to console3

4 - Connect to console4

5 - Connect to console5

6 - Connect to console6

7 - Connect to console7

8 - Connect to console8

--------------------------------------------------------

show - show lines in use | menuexit - exit menu

Exit - logout | $

!

menu cserver prompt $Please enter command or selection:$

!

menu cserver command 1 tn c1

menu cserver command 2 tn c2

menu cserver command 3 tn c3

menu cserver command 4 tn c4

menu cserver command 5 tn c5

menu cserver command 6 tn c6

menu cserver command 7 tn c7

menu cserver command 8 tn c8

menu cserver command cl1 cl1

menu cserver command cl2 cl2

menu cserver command cl3 cl3

menu cserver command cl4 cl4

menu cserver command cl5 cl5

menu cserver command cl6 cl6

menu cserver command cl7 cl7

menu cserver command cl8 cl8

menu cserver command menuexit menu-exit

menu cserver command exit exit

menu cserver command show show line tty 1 8

menu cserver options show pause

menu cserver clear-screen

menu cserver single-space

!

alias exec cl1 clear line 1

alias exec cl2 clear line 2

alias exec cl3 clear line 3

alias exec cl4 clear line 4

alias exec cl5 clear line 5

alias exec cl6 clear line 6

alias exec cl7 clear line 7

alias exec cl8 clear line 8

alias exec tn telnet

privilege exec level 0 clear line

privilege exec level 1 clear

!

line con 0

exec-timeout 0 0

transport input none

!

line 1 8

no exec

exec-timeout 0 0

transport input all

telnet break-on-ip

telnet sync-on-break

telnet ip-on-break

flowcontrol hardware

!

line aux 0

transport input all

!

line vty 0 4

exec-timeout 0 0

password cisco

login

autocommand menu cserver

!

end

sundar.palaniappan Mon, 02/26/2007 - 11:39

You have the session timeout set to 60 minutes and not 60 seconds. Can you change the syntax under 'line 0 16' to 'session-timeout 1' and test? This should disconnect the idle reverse telnet session after 1 minute of inactivity.

HTH

Sundar

Hi Sundar,

thanks for the reply, I have corrected that, but still without success. I even tried to use the absolute timeout to at least see if I'm on the right track, but nothing...

line 1 16

session-timeout 1 output

exec-timeout 1 0

timeout login response 60

absolute-timeout 1

login authentication linmethod

transport preferred none

transport input all

stopbits 1.5

sundar.palaniappan Mon, 02/26/2007 - 13:43

Glad that helped!

I remember having an issue with the 'exec', which I believe is the default setting, once and turning it off did the trick. It looks like that may cause spurious signals to be sent and the router may interpret this as valid traffic and keeps resetting the timer and the connection never drops.

HTH

Sundar

Actions

This Discussion