當前位置:才華齋>計算機>網路技術>

cisco路由器常用命令

網路技術 閱讀(1.03W)

cisco路由器常用命令有哪些?下面內容由小編為大家介紹cisco路由器常用命令,供大家參考!

cisco路由器常用命令

1、Switch> 使用者模式

2、Switch>enable 進入特權模式

Switch#

3、Switch#config terminal 進入全域性模式

Switch(config)#

4、Switch(config)#interface f0/1 進入介面模式

Switch(config-if)#

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

Switch(config-line)#

exit 退回上層

end 結束所有操作

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

7、switch#show running-config 檢視配置情況

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

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

Switch(config)#line console 0 設定console密碼

Switch(config-line)#password 333

Switch(config-line)#login

10、Switch(config)#interface vlan1

Switch(config-if)#ip address 設定IP地址

Switch(config-if)#no shutdown

11、Switch(config)#ip default-gateway 設定閘道器

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鄰居詳細資訊

Switch#show cdp neighbors entry

18、Switch#copy running-config startup-config

19、Switch#erase startup-config 恢復出廠資訊

Switch#reload 重新載入

20、交換機密碼恢復

*斷開電源

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

*switch:出現此符號

*switch:flash_init 初始化flash

*switch:dir flash: (檢視檔案,可省去)

*switch:rename 改名

*switch:boot 重啟

*switch>enable 進入特權

*switch#dir flash: (檢視檔案,可省去)

*switch#rename 改名

*switch#copy flash: running-config 複製到系統內

*switch#confit terminal 進入全域性模式

*switch(config)#enable password 222 設定新密碼

21、switch#show vlan-sw brief 檢視vlan

22、switch#vlan database 進入vlan模式

switch(vlan)#vlan 20 name bbb 建立vlan並命名

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

24、新增埠到vlan(單個)

switch(config)#interface f0/1 進入介面模式

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 進入介面

switch(config-if)#switchport mode trunk 設定為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

Switch#write 儲存交換機配置資訊