天天看點

cisco交換機常用指令

switch> 使用者模式

1:進入特權模式 enable

switch> enable

switch#

2:進入全局配置模式 configure terminal

switch#configure terminal

switch(conf)#

switch(conf)#hostname aptch-2950

aptech2950(conf)#

4:配置使能密碼 enable password cisco 以cisco為例

switch(conf)#hostname aptch2950

aptech2950(conf)# enable password cisco

5:配置使能密碼 enable secret ciscolab 以cicsolab為例

aptech2950(conf)# enable secret ciscolab

8:檢視指令 show

switch# show version 察看系統中的所有版本資訊

show running-configure 檢視交換機目前起作用的配置資訊

show interface fastethernet 0/1 察看交換機1接口具體配置和統計資訊

show mac-address-table 檢視mac位址表

show mac-address-table aging-time 檢視mac位址表自動老化時間

9:交換機恢複出廠預設恢複指令

switch# erase startup-configure

switch# reload

10:雙工模式設定

switch2950(conf)#hostname aptch-2950

aptech2950(conf)# interface fastehernet 0/17 以17端口為例

aptech2950(conf-if)#duplex full/half/auto 有full , half, auto 三個可選項

11:cdp相關指令

switch# show cdp 檢視裝置的cdp全局配置資訊

show cdp interface fastethernet 0/17 檢視17端口的cdp配置資訊

show cdp traffic 檢視有關cdp包的統計資訊

show cdp nerghbors 列出與裝置相連的cisco裝置

12:csico2950的密碼恢複

拔下交換機電源線。

用手按着交換機的MODE鍵,插上電源線

在switch:後執行flash_ini指令:switch: flash_ini

檢視flash中的檔案: switch: dir flash:

把“config.text”檔案改名為“config.old”: switch: rename flash: config.text flash: config.old

執行boot: switch: boot

交換機進入是否進入配置的對話,執行no :

進入特權模式察看flash裡的檔案: show flash :

把“config.old”檔案改名為 “config.text”: switch: rename flash: config.old flash: config.text

把“config.text”拷入系統的“running-configure”: copy flash: config.text system : running-configure

把配置模式重新設定密碼存盤,密碼恢複成功。

本文轉自 yhw85 51CTO部落格,原文連結:http://blog.51cto.com/yanghuawu/662386,如需轉載請自行聯系原作者

繼續閱讀