2016最新思科常用學習命令

才智咖 人氣:6.27K

本文為正在備考思科認證的考生們準備的是思科交換機的`常用操作項基本命令,希望以下命令內容能幫助大家更好通過考試!

2016最新思科常用學習命令

1、 更改主機名

switch(config)#hostname sw1

2、 設定進入特權模式的密碼

switch(config)#enable password 1234

switch(config)#enable secret cisco

3、 設定console口密碼

switch(config)#line console 0

switch(config-line)#password 123

switch(config-line)#login

4、 檢視mac地址列表

switch#show mac-address-table

5、 檢視mac地址列表重新整理時間

switch#show mac-address-table aging-time

6、 更改mac地址列表重新整理時間

switch(config)#mac-address-table aging-time 200

7、 檢視當前配置(RAM)

switch#show running-config

8、 檢視交換機的配置(NVRAM)

switch#show startup-config

9、 儲存配置

switch#copy running-config startup-config

switch#write

10、恢復出廠預設設定

switch#erase startup-config

switch#reload

11、檢視cdp的全域性資訊

switch#show cdp

12、檢視介面的cdp配置資訊

switch#show cdp interface f0/2

13、檢視有關cdp包的統計資訊

switch#show cdp traffic

14、檢視鄰居資訊

switch#show cdp neighbors

15、檢視所有入口項的詳細資訊

switch#show cdp neighbors detail

switch#show cdp entry *

16、新增介面的描述資訊

switch(config-if)# description connection to routerA

17、設定交換機的閘道器

switch(config)#ip default-gateway

18、關掉DNS解析

switch(config)# no ip domain-lookup

19、實現交換機的遠端管理

switch(config)#enable secret cisco

switch(config)#interface vlan 1

switch(config-if)#ip address

switch(config-if)#no shutdown

switch(config)#line vty 0 4

switch(config-line)#password 123

switch(config-line)#login

c:>telnet

20、交換機的密碼恢復

(1)將交換機的電源拔下

(2)按mode鍵將電源插上,當出現switch:時將手鬆開

(3)switch:flash_init //載入到flash中

(4)switch:dir flash: //檢視flash中的檔案

(5)rename flash: flash: //更改檔名

(6)boot //重新啟動交換機

(7)rename flash: flash: //將檔名改回

(8)copy flash: running-config

(9)enable password cisco //重新設定密碼

(10)write //儲存

21、建立vlan方法一

switch#vlan database

switch(vlan)#vlan 10 name sc

switch(vlan)#exit

22、建立vlan方法二

switch(config)#vlan 10

switch(config-vlan)#name sc

23、刪除vlan方法一

switch(vlan)#no vlan 10

switch(vlan)#exit

24、刪除vlan方法二

switch(config)#no vlan 10

25、刪除vlan方法三

switch#delete

26、將埠加入到vlan中

switch(config-if)#switchport access vlan 10

27、將一組連續的埠加入到vlan中

switch(config)# interface range f0/1 – 5 埠範圍管理

switch(config-if-range)#switchport access vlan 10 埠範圍管理模式