學(xué)習(xí)啦>學(xué)習(xí)電腦>網(wǎng)絡(luò)知識>路由器>路由器設(shè)置>cisco思科>

cisco路由器常用命令大全

時間: 權(quán)威724 分享

  思科cisco制造的路由器設(shè)備、交換機(jī)和其他設(shè)備承載了全球80%的互聯(lián)網(wǎng)通信,成為硅谷中新經(jīng)濟(jì)的傳奇,那么你知道cisco常用命令有哪些嗎?下面是學(xué)習(xí)啦小編整理的一些關(guān)于cisco常用命令的相關(guān)資料,供你參考。

  cisco常用命令

  1、Switch> 用戶模式

  2、Switch>enable 進(jìn)入特權(quán)模式

  Switch#

  3、Switch#config terminal 進(jìn)入全局模式

  Switch(config)#

  4、Switch(config)#interface f0/1 進(jìn)入接口模式

  Switch(config-if)#

  5、Switch(config)#line console 0 進(jìn)入line模式

  Switch(config-line)#

  exit 退回上層

  end 結(jié)束所有操作

  6、Switch(config)#hostname aaa 配置主機(jī)名

  7、switch#show running-config 查看配置情況

  8、Switch(config)#enable password 111 設(shè)置使能密碼(明文)

  9、Switch(config)#enable secret 111 設(shè)置使能密碼(密文)

  Switch(config)#line console 0 設(shè)置console密碼

  Switch(config-line)#password 333

  Switch(config-line)#login

  10、Switch(config)#interface vlan1

  Switch(config-if)#ip address 192.168.1.1 255.255.255.0 設(shè)置IP地址

  Switch(config-if)#no shutdown

  11、Switch(config)#ip default-gateway 192.168.1.10 設(shè)置網(wǎng)關(guān)

  12、Switch#show mac-address-table 查看MAC地址表

  13、Switch#show cdp cdp全局配置信息

  14、Switch#show cdp interface f0/1 cdp接口配置信息

  15、Switch#show cdp traffic cdp包的配置信息

  16、Switch#show cdp neighbors cdp鄰居基本信息

  17、Switch#show cdp neighbors detail cdp鄰居詳細(xì)信息

  Switch#show cdp neighbors entry

  18、Switch#copy running-config startup-config

  Switch#write 保存交換機(jī)配置信息

  19、Switch#erase startup-config 恢復(fù)出廠信息

  Switch#reload 重新加載

  20、交換機(jī)密碼恢復(fù)

  *斷開電源

  *按住MODE鍵,加電(等待數(shù)秒)

  *switch:出現(xiàn)此符號

  *switch:flash_init 初始化flash

  *switch:dir flash: (查看文件,可省去)

  *switch:rename config.text config.old 改名

  *switch:boot 重啟

  *switch>enable 進(jìn)入特權(quán)

  *switch#dir flash: (查看文件,可省去)

  *switch#rename config.old config.text改名

  *switch#copy flash:config.text running-config 復(fù)制到系統(tǒng)內(nèi)

  *switch#confit terminal 進(jìn)入全局模式

  *switch(config)#enable password 222 設(shè)置新密碼

  21、switch#show vlan-sw brief 查看vlan

  22、switch#vlan database 進(jìn)入vlan模式

  switch(vlan)#vlan 20 name bbb 創(chuàng)建vlan并命名

  23、switch(vlan)#no vlan 20 刪除vlan

  24、添加端口到vlan(單個)

  switch(config)#interface f0/1 進(jìn)入接口模式

  switch(config-if)#switchport access vlan 10 添加至vlan10

  switch(config-if)#end 退出

  switch#show vlan brief (id) 驗證vlan

  switch(config)#show running-config interface f0/1(查看某接口)

  25、添加端口到vlan(批量)

  switch(config)#interface range f0/1 - 5

  switch(config-if-range)#switchport access vlan 10

  26、switch(config)#interface f0/1 進(jìn)入接口

  switch(config-if)#switchport mode trunk 設(shè)置為trunk(永久)

  switch(config-if)#switchport mode dynamic desirable/auto(其它trunk)

  switch(config-if)#switchport trunk allowed vlan remove 10 移除vlan10)

  switch(config-if)#switchport trunk allowed vlan add 20 添加vlan20

  27、switch#show interface f0/1 switchport 查看接口模式

  show ip interface brief

  看過文章“cisco常用命令”的人還看了:

  1.CISCO路由器的配置與調(diào)試

  2.Cisco路由器常用配置命令

  3.Cisco路由器配置命令全攻略

  4.如何查看Cisco路由器的配置信息

  5.思科Cisco路由器的基礎(chǔ)配置知識

  6.思科路由器怎么進(jìn)入 思科路由器怎么設(shè)置

565361