注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 IB客座主编(四)美国西蒙公..
 帮助

Timeout login response 与 Exec-timeout


2007-08-14 18:28:57
 标签:line con   [推送到技术圈]

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://3layer.blog.51cto.com/57448/38307
switch(config-line)#timeout ?    
  login  Timeouts related to the login sequence
switch(config-line)#timeout login ?
  response  Timeout for any user input during login sequences
switch(config-line)#timeout login res
switch(config-line)#timeout login response ?
  <0-300>  Timeout in seconds
switch(config-line)#timeout login response 0
 
我本以为设置的时间为0.应该是没有时间限制的意思。
 
User Access Verification
Username:
% Username:  timeout expired!
Username:
% Username:  timeout expired!
Username:
% Username:  timeout expired!
 
switch con0 is now available
 
 
Press RETURN to get started.
可是不问怎么输入都是timeout。 看来这个0。还真是个0的意思。郁闷。只有利用破解密码的方式修改配置再登陆了。
 
 C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1)
Compiled Mon 22-Jul-02 17:18 by antonino
WS-C2950-24 starting...
Base ethernet MAC Address: 00:0b:5f:1b:4a:40
Xmodem file system is available.
The system has been interrupted prior to initializing the
flash filesystem.  The following commands will initialize
the flash filesystem, and finish loading the operating
system software:
    flash_init
    load_helper
    boot
switch: flash_init
Initializing Flash...
flashfs[0]: 18 files, 2 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 7741440
flashfs[0]: Bytes used: 3965440
flashfs[0]: Bytes available: 3776000
flashfs[0]: flashfs fsck took 7 seconds.
...done initializing flash.
Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4
switch: dir flash:
Directory of flash:/
2    -rwx  2664051   <date>               c2950-i6q4l2-mz.121-11.EA1.bin
3    -rwx  269       <date>               env_vars
4    -rwx  1096      <date>               vlan.dat
6    -rwx  3504      <date>               config.text
7    drwx  704       <date>               html
19   -rwx  109       <date>               info
20   -rwx  109       <date>               info.ver
21   -rwx  47        <date>               private-config.text
3776000 bytes available (3965440 bytes used)
switch: rename flash:config.text flash:config.old
switch: reset
Are you sure you want to reset the system (y/n)?y
System resetting...

C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1)
Compiled Mon 22-Jul-02 17:18 by antonino
WS-C2950-24 starting...
Base ethernet MAC Address: 00:0b:5f:1b:4a:40
Xmodem file system is available.
Initializing Flash...
flashfs[0]: 18 files, 2 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 7741440
flashfs[0]: Bytes used: 3965440
flashfs[0]: Bytes available: 3776000
flashfs[0]: flashfs fsck took 6 seconds.
...done initializing flash.
Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4
Loading "flash:/c2950-i6q4l2-mz.121-11.EA1.bin"...#########################################################################################################################################################################################################################################################################################
File "flash:/c2950-i6q4l2-mz.121-11.EA1.bin" uncompressed and installed, entry point: 0x80010000
executing...
              Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706
 
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(11)EA1, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Wed 28-Aug-02 10:25 by antonino
Image text-base: 0x80010000, data-base: 0x80528000

Initializing flashfs...
flashfs[1]: 18 files, 2 directories
flashfs[1]: 0 orphaned files, 0 orphaned directories
flashfs[1]: Total bytes: 7741440
flashfs[1]: Bytes used: 3965440
flashfs[1]: Bytes available: 3776000
flashfs[1]: flashfs fsck took 7 seconds.
flashfs[1]: Initialization complete.
Done initializing flashfs.
POST: System Board Test : Passed
POST: Ethernet Controller Test : Passed
ASIC Initialization Passed
POST: FRONT-END LOOPBACK TEST : Passed
cisco WS-C2950-24 (RC32300) processor (revision G0) with 20402K bytes of memory.
Processor board ID FOC0644Y1K1
Last reset from system-reset
Running Standard Image
24 FastEthernet/IEEE 802.3 interface(s)
32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 00:0B:5F:1B:4A:40
Motherboard assembly number: 73-5781-11
Power supply part number: 34-0965-01
Motherboard serial number: FOC06440CE4
Power supply serial number: DAB0642870Q
Model revision number: G0
Motherboard revision number: A0
Model number: WS-C2950-24
System serial number: FOC0644Y1K1
         --- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]:
00:00:14: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan
00:00:17: %SYS-5-RESTART: System restarted --
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(11)EA1, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Wed 28-Aug-02 10:25 by antonino
% Please answer 'yes' or 'no'.
Would you like to enter the initial configuration dialog? [yes/no]: n
 
Press RETURN to get started!

Switch>
Switch>
Switch>en
Switch#rename flash:config.old flash:config.text
Destination filename [config.text]?
Switch#copy flash:config.text system:running-config
Destination filename [running-config]?
3504 bytes copied in 3.20 secs (1168 bytes/sec)
Switch#
*Mar  1 08:04:40.779: %LINK-5-CHANGED: Interface FastEthernet0/11, changed state to administratively down
*Mar  1 08:04:40.851: %LINK-5-CHANGED: Interface FastEthernet0/12, changed state to administratively down
*Mar  1 08:04:40.915: %LINK-5-CHANGED: Interface FastEthernet0/13, changed state to administratively down
*Mar  1 08:04:40.979: %LINK-5-CHANGED: Interface FastEthernet0/14, changed state to administratively down
*Mar  1 08:04:41.043: %LINK-5-CHANGED: Interface FastEthernet0/15, changed state
FangshanNode#shto administratively down
*Mar  1 08:04:41.115: %LINK-5-CHANGED: Interface FastEthernet0/16, changed state to administratively down
*Mar  1 08:04:41.179: %LINK-5-CHANGED: Interface FastEthernet0/17, changed state to administratively down
*Mar  1 08:04:41.243: %LINK-5-CHANGED: Interface FastEthernet0/18, changed state to administratively down
*Mar  1 08:04:41.319: %LINK-5-CHANGED: Interface FastEthernet0/19, changed state to administratively down
*Mar  1 08:04:41.779: %LINEPROTO-5-UPDOWN: Line protocol
FangshanNode#shon Interface FastEthernet0/11, changed state to down
*Mar  1 08:04:41.851: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, changed state to down
*Mar  1 08:04:41.915: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/13, changed state to down
*Mar  1 08:04:41.979: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/14, changed state to down
*Mar  1 08:04:42.011: %LINK-5-CHANGED: Interface Vlan2, changed state to administratively down
*Mar  1 08:04:42.043: %LINEP
FangshanNode#shshoROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/15, changed state to down
*Mar  1 08:04:42.115: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/16, changed state to down
*Mar  1 08:04:42.179: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/17, changed state to down
*Mar  1 08:04:42.243: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/18, changed state to down
*Mar  1 08:04:42.319: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/19, changed
FangshanNode#shsho state to down
*Mar  1 08:04:43.011: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to down
 
Switch#show run  后看 line console 0  自己变成了20。应该是默认值。

line con 0
 timeout login response 20
 logging synchronous
line vty 0 4
 access-class 80 in
line vty 5 15
!
end
 
看来 timeout login response 命令的0 并不是没有时间限制的意思。最高可以设置为300 秒。不过真正对着密码窗口呆上5分钟不输入的人也是很少的。呵呵。看来这个命令使用默认值就可以了。
 
timeout login response 只是针对登录窗口的保活时间。而 exec-timeout 0 0 真对的是登陆到路由器后多少分钟多少秒在没有动作后退出console。
 
switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)#line con 0
switch(config-line)#exec-timeout ?
  <0-35791>  Timeout in minutes
switch(config-line)#exec-timeout 0 ?
  <0-2147483>  Timeout in seconds
  <cr>
switch(config-line)#exec-timeout 0 0
switch(config-line)#
 
 
line con 0
 exec-timeout 0 0
 timeout login response 20
 logging synchronous
 
exec-timeout 0 0 还是很有用的命令。可以防止因为短时间离开回来时还需要重新输入密码。特别是在密码很复杂的情况下。但是也是不安全的因素。所以还是需要按需配置。
 

本文出自 “人类一思考,上帝都发笑” 博客,请务必保留此出处http://3layer.blog.51cto.com/57448/38307





    文章评论
 <<   1   2   >>   页数 ( 1/2 )  
2007-08-14 22:05:00
真是开眼啦
小7的文章越来越有水准啦

2007-08-15 19:33:21
timeout login response 只是针对登录窗口的保活时间

如果超过了保活时间.是什么现象

2007-08-15 20:08:00
User Access Verification
Username:
% Username: timeout expired!
Username:
% Username: timeout expired!
Username:
% Username: timeout expired!

2007-08-15 20:11:45
  你是在这破交换机密码啊...

2007-08-15 20:27:40
User Access Verification
Username:
% Username: timeout expired!
Username:
% Username: timeout expired!
Username:
% Username: timeout expired!

高手
麻烦解释`下好吗?``

2007-08-16 09:01:47
当你写了

switch(config)#username xxxx passwrod xxxx

这句后。每次启动设备登陆的时候会问你用户名和密码。才能进入用户模式。如果将 timeout login response 0 。也就是说当你进入设备准备输入username的时间是0。你还怎么输用户名。不就报错了说输入用户名超时。


timeout login response 命令是设定输入登陆的超时时间。

比如你等设备。发现出现username 让你输入用户名。可是你根本不知道你去问网管。这个时间你用了60秒。如果timeout login response 59 。那么在第59秒就会退出。你只有再敲enter 才能再输入 username 。这是个登陆的延迟时间。

exec-timeout 是比如你在配命令突然有事。离开了10分钟。如果你exec-timeout 9 59 。那么在第9分钟59秒退出。你需要再重新登陆。

2007-08-16 11:53:57
switch(config)#username xxxx passwrod xxxx
这个是不要要重启生效啊``
exec-timeout 0 5 五秒后就输入
line con 0
exec-timeout 0 5
timeout login response 6
password cisco

我退出console出没提示要输入用户名

我是用的模拟器dynamips

2007-08-16 18:43:04
sorry 写的不够全面
username xxx password xxx
如果你想使用。就需要配置login local   本地用户名密码登陆方式。

比如dynamips 你用 console登陆

line con 0
login local

or line vty 0 4
login local

用你本地配置的用户名密码登陆。

2007-08-16 19:56:24
呵呵.知道了``谢谢``

2007-08-16 20:14:12
我晕了``我先建了一个用户和密码
username aaa password aaa

然后 我再把它
no username aaa password aaa

结果进不了
User Access Verification
Username:
用aaa不能进这咋办呢~~幸亏是模拟器

 <<   1   2   >>   页数 ( 1/2 )  

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: