思科路由器配置命令

模式類型

  • switch>用戶模式
  • switch# 特權(quán)模式
  • switch(config)# 全局配置模式
  • switch(config-if)# 接口配置模式

基本命令

進(jìn)入特權(quán)模式 enable(en)

switch>en
switch#

進(jìn)入全局配置模式 configure terminal(conf t)

switch>en
switch#conf t
switch(config)#

交換機(jī)命名 hostname aptech2950 以aptech2950為例

switch>en
switch#con t
switch(config)#hostname aptch-2950
aptech-2950(config)#

配置使能口令

使能加密口令就是在進(jìn)入特權(quán)模式時(shí)使用的密碼
password傳輸時(shí)是使用的明文,而secret是用的密文

switch>enable
switch#configure terminal
switch(config)#hostname aptch-2950
aptech-2950(config)#en password cisco

設(shè)置虛擬局域網(wǎng)vlan 1 interface vlan 1

switch>en
switch#con t
switch(config)#hostname aptch2950
aptech2950(config)#interface vlan 1
aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交換機(jī)端口ip和子網(wǎng)掩碼
aptech2950(conf-if)#no shut 是配置處于運(yùn)行中
aptech2950(conf-if)#exit
aptech2950(conf)#ip default-gateway 192.168.3.1設(shè)置網(wǎng)關(guān)地址

進(jìn)入交換機(jī)某一端口 interface fastehernet 0/1 以1端口為例

switch>enable
switch#conf t
switch(conf)#hostname aptch-2950
aptech-2950(conf)#interface fastehernet 0/1
aptech-2950(conf-if)#

查看命令 show

switch>en
switch#show version 察看系統(tǒng)中的所有版本信息

show interface vlan 1 查看交換機(jī)有關(guān)ip 協(xié)議的配置信息
show running-configure 查看交換機(jī)當(dāng)前起作用的配置信息
show interface fastethernet 0/1 察看交換機(jī)1接口具體配置和統(tǒng)計(jì)信息
show mac-address-table 查看mac地址表
show mac-address-table aging-time 查看mac地址表自動(dòng)老化時(shí)間

交換機(jī)恢復(fù)出廠默認(rèn)恢復(fù)命令

switch>en
switch#erase startup-configure
switch#reload

雙工模式設(shè)置

switch>en
switch#conf t
switch(config)#hostname aptch-2950
aptech-2950(config)#interface fastehernet 0/1 以1端口為例
aptech-2950(conf-if)#duplexfull/half/auto //有full , half, auto 三個(gè)可選項(xiàng)

cdp相關(guān)命令

switch>enable
switch#show cdp 查看設(shè)備的cdp全局配置信息

show cdpinterface fastethernet 0/1查看1端口的cdp配置信息
show cdptraffic查看有關(guān)cdp包的統(tǒng)計(jì)信息
show cdpnerghbors列出與設(shè)備相連的cisco設(shè)備

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容