交換機命令

交換機命令 switch>         用戶模式 1:進入特權模式 switch> enable switch# 2:進入全局配置模式 switch> enable switch#config terminal switch(conf)# 3:交換機命名 (以aptech2950爲例) switch#config terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 以cisco爲例 switch> enable switch#config terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密碼  (以123456爲例) switch> enable switch#config terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret 123456 6:設置虛擬局域網vlan 1 switch> enable switch#config terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface vlan 1 aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0      配置交換機端口ip和子網掩碼 aptech2950(conf-if)#no shut   使配置處於運行中 aptech2950(conf-if)#exit 7:進入交換機某一端口(以17端口爲例) switch> enable switch#config terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface fastethernet 0/17 aptech2950(conf-if)# 8:查看命令show switch> enable switch# show version  察看系統中的全部版本信息 show interface vlan 1  查看交換機有關ip 協議的配置信息 show running-config 查看交換機當前起做用的配置信息 show interface fastethernet 0/1  察看交換機1接口具體配置和統計信息 show mac-address-table        查看mac地址表 show mac-address-table aging-time  查看mac地址表自動老化時間 9:查找直連cisco設備show cdp switch#show cdp 查看CDP全局配置 switch#show cdp interface f0/17 查某端口直連設備 switch#show cdp neighbors 查鄰居設備摘要信息 switch#show cdp neighbors detail 查鄰居詳細信息 switch#show cdp entry * 查鄰居詳細信息 switch#show cdp traffic 查看CDP包統計信息 10:保存交換機配置 switch#copy running-config startup-config 或者 switch#write 11:交換機恢復出廠默認恢復命令  switch> enable switch# erase startup-config switch# reload 12:雙工模式設置(以17端口爲例) switch> enable switch#config terminal switch2950(conf)#hostname aptch-2950 aptech2950(conf)# interface fastethernet 0/17                 aptech2950(conf-if)#speed 10/100/auto 有十、100、auto 三個可選項 aptech2950(conf-if)#duplex full/half/auto                    有full , half, auto 三個可選項 13:csico2950的密碼恢復  書175頁 拔下交換機電源線。 用手按着交換機的MODE鍵,插上電源線 在switch:後執行flash_init命令: switch: flash_init 查看flash中的文件: switch: dir flash: 把「config.text」文件更名爲「config.old」:   switch: rename flash: config.text flash: config.old 執行boot:   switch: boot 交換機進入是否進入配置的對話,執行no : 進入特權模式察看flash裏的文件: switch#show flash : 把「config.old」文件更名爲 「config.text」:   switch# rename flash: config.old flash: config.text 把「config.text」拷入系統的「running-config」: #copy flash: config.text system : running-config 把配置模式從新設置密碼存盤,  switch#config terminal switch (conf)# enable secret 123456 密碼恢復成功。
相關文章
相關標籤/搜索