Cisco IOS 小技巧

    1. 在每個 show 指令輸出結果前加上 CPU utilization 和時間

    C2821(config)#line vty 0 4
    C2821(config-line)#exec prompt timestamp
    C2821(config-line)#end
    C2821#show cdp
    Load for five secs: 1%/0%; one minute: 3%; five minutes: 3%
    Time source is NTP, 15:42:24.997 CST Tue Jan 18 2011

    Global CDP information:
    Sending CDP packets every 60 seconds
    Sending a holdtime value of 180 seconds
    Sending CDPv2 advertisements is  enabled
    C2821#

    2. 將逃脫字元由 Ctrl-Shift-6-6-x 改成其他組合
    如果覺得原來的 Ctrl-Shift-6-6-x 太麻煩,可以改掉(下面的例子改成 Ctrl-C):
     

    C2821#show terminal
    Line 515, Location: "", Type: "XTERM-COLOR"
    Length: 24 lines, Width: 80 columns
    Baud rate (TX/RX) is 9600/9600
    Status: PSI Enabled, Ready, Active, No Exit Banner, Automore On
    Capabilities: none
    Modem state: Ready
    Group codes:    0
    Special Chars: Escape  Hold  Stop  Start  Disconnect  Activation
              &#16
    0;    ^^x     none    -     -       none
    Timeouts:      Idle EXEC    Idle Session   Modem Answer  Session   Dispatch
    00:10:00        never                        none     not set
    Idle Session Disconnect Warning
    never
    Login-sequence User Response
    00:00:30
    Autoselect Initial Wait
    not set
    Modem type is unknown.
    Session limit is not set.
    Time since activation: 00:25:37
    Editing is enabled.
    History is enabled, history size is 20.
    DNS resolution in show commands is enabled
    Full user help is disabled
    Allowed input transports are telnet ssh.
    Allowed output transports are lat pad telnet rlogin lapb-ta mop v120 ssh.
    Preferred transport is lat.
    No output characters are padded
    No special data dispatching characters
     
     
    C2821#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    C2821(config)#line vty 0 4
    C2821(config-line)#escape-character 3
    C2821(config-line)#end
     
     
    C2821#show terminal
    Line 515, Location: "", Type: "XTERM-COLOR"
    Length: 24 lines, Width: 80 columns
    Baud rate (TX/RX) is 9600/9600
    Status: PSI Enabled, Ready, Active, No Exit Banner, Automore On
    Capabilities: none
    Modem state: Ready
    Group codes:    0
    Special Chars: Escape  Hold  Stop  Start  Disconnect  Activation
    ^Cx none   -     -       none
    Timeouts:      Idle EXEC    Idle Session   Modem Answer  Session   Dispatch
    00:10:00        never                        none     not set
    Idle Session Disconnect Warning
    never
    Login-sequence User Response
    00:00:30
    Autoselect Initial Wait
    not set
    Modem type is unknown.
    Session limit is not set.
    Time since activation: 00:25:49
    Editing is enabled.
    History is enabled, history size is 20.
    DNS resolution in show commands is enabled
    Full user help is disabled
    Allowed input transports are telnet ssh.
    Allowed output transports are lat pad telnet rlogin lapb-ta mop v120 ssh.
    Preferred transport is lat.
    No output characters are padded
    No special data dispatching characters
    C2821#

     
     
    "3" 是 Ctrl-C 的 ASCII 碼,其他組合的 ASCII 碼可以在這裡查詢。至於 "^Cx" 後面的 "x" 可以忽略,實際操作的時候按下 Ctrl-C 即可。

    發佈留言

    發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

    這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料