cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
68122
Views
40
Helpful
2
Replies

What is difference between session-timeout and exec-timeout ?

henrybb
Level 1
Level 1

Hi,

I know exec-timeout is used to control user exec timeout. And I test it , it will disconnect my telnet session when time reached.

I don't know what is the function of session-timeout,I read command reference about session-timeout and don't understand .

can u tell me how to use session-timeout and what is difference between the two command ?

thanks!

2 Replies 2

milan.kulik
Level 10
Level 10

Hi,

try following test:

Telnet to your router from your PC.

Configure

line vty 0

exec-timeout 0 0

line vty 1

session-timeout 1

exec-timeout 5

Then connect to the router again from another Telnet window.

Issue sh user in the first telnet window.

You should see something like:

sh user

Line User Host(s) Idle Location

* 18 vty 0 kulik idle 00:00:00 10.1.1.1

19 vty 1 kulik idle 00:00:14 10.1.1.1

Wait 4 minutes, repeat the command, you'll see

sh user

Line User Host(s) Idle Location

* 18 vty 0 kulik idle 00:00:00 10.1.1.1

19 vty 1 kulik idle 00:04:14 10.1.1.1

After another minute:

sh user

Line User Host(s) Idle Location

* 18 vty 0 kulik idle 00:00:00 10.1.1.1

I.e., your second telnet connection was closed by exec-timeout (5 minutes for VTY 1) atfer 5 minutes of no input to the Exec process.

Connect to the router again from a new telnet window and issue a Telnet a.b.c.d command in enable mode.

sh users in the first window should show you

Line User Host(s) Idle Location

* 18 vty 0 kulik idle 00:00:00 10.1.1.1

19 vty 1 kulik a.b.c.d 00:00:11 10.1.1.1

After one minute you should get

[Connection to a.b.c.d idle too long; timed out]

error message in the second window and the telnet connection from the router to a.b.c.d should be disconnected.

The session-timeout 1 minute configured for VTY 1 has disconnected the session.

sh users in the first window still shows

Line User Host(s) Idle Location

* 18 vty 0 kulik idle 00:00:00 10.1.1.1

19 vty 1 kulik idle 00:02:18 10.1.1.1

and you have still the second telnet connection to your router open (until the exec-timeout closes it after another 4 minutes).

I hope this helps to explain the difference between these two timeouts.

Regards,

Milan

thanks.I got it.