CISCO交換機配置命令大全

2021-03-04 03:00:06 字數 5021 閱讀 6655

1.在基於ios的交換機上設定主機名/系統名:

switch(config)# hostname hostname

在基於cli的交換機上設定主機名/系統名:

switch(enable) set system name name-string

2.在基於ios的交換機上設定登入口令:

switch(config)# enable password level 1 password

在基於cli的交換機上設定登入口令:

switch(enable) set password

switch(enable) set enalbepass

3.在基於ios的交換機上設定遠端訪問:

switch(config)# inte***ce vlan 1

switch(config-if)# ip address ip-address ***mask

switch(config-if)# ip default-gateway ip-address

在基於cli的交換機上設定遠端訪問:

switch(enable) set inte***ce sc0 ip-address ***mask broadcast-address

switch(enable) set inte***ce sc0 vlan

switch(enable) set ip route default gateway

4.在基於ios的交換機上啟用和瀏覽cdp資訊:

switch(config-if)# cdp enable

switch(config-if)# no cdp enable

為了檢視cisco鄰接裝置的cdp通告資訊:

switch# show cdp inte***ce [type modle/port]

switch# show cdp neighbors [type module/port] [detail]

在基於cli的交換機上啟用和瀏覽cdp資訊:

switch(enable) set cdp module/port

為了檢視cisco鄰接裝置的cdp通告資訊:

switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]

5.基於ios的交換機的埠描述:

switch(config-if)# description description-string

基於cli的交換機的埠描述:

switch(enable)set port name module/number description-string

6.在基於ios的交換機上設定埠速度:

switch(config-if)# speed

在基於cli的交換機上設定埠速度:

switch(enable) set port speed moudle/number

switch(enable) set port speed moudle/number

7.在基於ios的交換機上設定乙太網的鏈路模式:

switch(config-if)# duplex

在基於cli的交換機上設定乙太網的鏈路模式:

switch(enable) set port duplex module/number

8.在基於ios的交換機上配置靜態vlan:

switch# vlan database

switch(vlan)# vlan vlan-num name vla

switch(vlan)# exit

switch# configure teriminal

switch(config)# inte***ce inte***ce module/number

switch(config-if)# switchport mode access

switch(config-if)# switchport access vlan vlan-num

switch(config-if)# end

在基於cli的交換機上配置靜態vlan:

switch(enable) set vlan vlan-num [name name]

switch(enable) set vlan vlan-num mod-num/port-list

9. 在基於ios的交換機上配置vlan中繼線:

switch(config)# inte***ce inte***ce mod/port

switch(config-if)# switchport mode trunk

switch(config-if)# switchport trunk encapsulation

switch(config-if)# switchport trunk allowed vlan remove vlan-list

switch(config-if)# switchport trunk allowed vlan add vlan-list

在基於cli的交換機上配置vlan中繼線:

switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]

vlan-range [isl|dotlq|dotl0|lane|negotiate]

10.在基於ios的交換機上配置vtp管理域:

switch# vlan database

switch(vlan)# vtp domain domain-name

在基於cli的交換機上配置vtp管理域:

switch(enable) set vtp [domain domain-name]

11.在基於ios的交換機上配置vtp 模式:

switch# vlan database

switch(vlan)# vtp domain domain-name

switch(vlan)# vtp

switch(vlan)# vtp password password

在基於cli的交換機上配置vtp 模式:

switch(enable) set vtp [domain domain-name] [mode][password password]

12. 在基於ios的交換機上配置vtp版本:

switch# vlan database

switch(vlan)# vtp v2-mode

在基於cli的交換機上配置vtp版本:

switch(enable) set vtp v2 enable

13. 在基於ios的交換機上啟動vtp剪裁:

switch# vlan database

switch(vlan)# vtp pruning

在基於cl i 的交換機上啟動vtp剪裁:

switch(enable) set vtp pruning enable

14.在基於ios的交換機上配置以太通道:

switch(config-if)# port group group-number [distribution ]

在基於cli的交換機上配置以太通道:

switch(enable) set port channel moudle/port-range mode

15.在基於ios的交換機上調整根路徑成本:

switch(config-if)# spanning-tree [vlan vlan-list] cost cost

在基於cli的交換機上調整根路徑成本:

switch(enable) set spantree portcost moudle/port cost

switch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]

16.在基於ios的交換機上調整埠id:

switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority

在基於cli的交換機上調整埠id:

switch(enable) set spantree portpri priority

switch(enable) set spantree portvlanpri priority [vlans]

17. 在基於ios的交換機上修改stp時鐘:

switch(config)# spanning-tree [vlan vlan-list] hello-time seconds

switch(config)# spanning-tree [vlan vlan-list] forward-time seconds

` switch(config)# spanning-tree [vlan vlan-list] max-age seconds

在基於cli的交換機上修改stp時鐘:

switch(enable) set spantree hello interval[vlan]

switch(enable) set spantree fwddelay delay [vlan]

switch(enable) set spantree maxage agingtiame[vlan]

18. 在基於ios的交換機埠上啟用或禁用port fast 特徵:

switch(config-if)#spanning-tree portfast

在基於cli的交換機埠上啟用或禁用port fast 特徵:

switch(enable) set spantree portfast

19. 在基於ios的交換機埠上啟用或禁用uplinkfast 特徵:

switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]

在基於cli的交換機埠上啟用或禁用uplinkfast 特徵:

switch(enable) set spantree uplinkfast [rate update-rate] [all-protocols off|on]

CISCO交換機配置命令大全總結

全新的cisco配置命令 配置使能密碼enable secret ciscolab 以cicsolab 為例 switch enable switch c onfigure terminal switch conf hostname aptch2950 aptech2950 conf enable ...

Cisco交換機常用配置命令總結

1 配置vlan 理解vlan 乙個vlan就是乙個交換網,其邏輯上按功能 專案 應用來分而不必考慮 使用者的物理位置。任何交換口都可以屬於某一vlan,ip包 廣播包及組播包均可以傳送或廣播給在此vlan內的終端使用者。每乙個vlan均可看成是乙個邏輯網路,發往另一vlan 的資料報必須由路由器或...

華為交換機配置命令大全

第1章產品介紹 1.1 產品簡介 隨著internet 網際網路 的高速發展,人們對通訊的需求已逐漸從傳統的 傳真 電報等低速業務向高速的internet接入 可視 點播等寬頻業務領域延伸,使用者對上網速率的需求也越來越高。在這種需求條件下,乙太網接入因其成本低 速度高 使用簡單而倍受市場的關注。面...