⑴ 華三交換機配置命令
華三交換機配置命令如下:
<H3C>system-view
[H3C]super password H3C:設置用戶分級密碼
[H3C]undo super password:刪除用戶分級密碼
[H3C]localuser bigheap 123456 1:Web網管用戶設置,1(預設)為管理級用戶,缺admin,admin
[H3C]undo localuser bigheap:刪除Web網管用戶
[H3C]user-interface aux 0:只支持0
[H3C-Aux]idle-timeout 2 50:設置超時為2分50秒,若為0則表示不超時,默認為5分鍾
[H3C-Aux]undo idle-timeout:恢復默認值
[H3C]user-interface vty 0:只支持0和1
[H3C-vty]idle-timeout 2 50:設置超時為2分50秒,若為0則表示不超時,默認為5分鍾
[H3C-vty]undo idle-timeout:恢復默認值
[H3C-vty]set authentication password 123456:設置telnet密碼,必須設置
[H3C-vty]undo set authentication password:取消密碼
[H3C]display users:顯示用戶
[H3C]display user-interface:顯示用戶界面狀態
(1)交換機命令詳解擴展閱讀:
H3C Switch命令:
一、模式命令:
1、用戶模式:Switch>
2、特權模式:Switch>enable
Switch#
3、全局配置模式:Switch#config terminal
Switch(config)#
4、介面配置模式:Switch(config)#interface fastethernet0/1
Switch(config-if)#
5、Line模式:Switch(config)#line console 0
Switch(config-line)#
二、特權模式下的命令:
1、查看機MAC地址:Switch#show mac-address-table
2、發現(CDP):
Switch#show cdp
Switch#show cdp interface fastethernet0/1
Switch#show cdp neighbors
Switch#show cdp neighbors detail
Switch#show cdp entry
工作原理:
交換機工作於OSI參考模型的第二層,即數據鏈路層。交換機內部的CPU會在每個埠成功連接時,通過將MAC地址和埠對應,形成一張MAC表。
在今後的通訊中,發往該MAC地址的數據包將僅送往其對應的埠,而不是所有的埠。因此,交換機可用於劃分數據鏈路層廣播,即沖突域;但它不能劃分網路層廣播,即廣播域。
參考資料:網路—交換機
參考資料:網路—交換機命令
⑵ 交換機的基本命令是什麼
「Switch>」
⑶ 交換機配置命令
1、交換機配置命令,英文名Switchboard Command,是一種計算機語言,用來控制交換機的語言。
⑷ 交換機的命令具體怎麼使用
交換機的命令非常多,主要是用來配置交換機的,只有可網管的交換機(有console口的交換機)才能進行配置。
不同廠家、不同型號的交換機的配置命令也不大一樣。
舉個CISCO的命令例子吧:
hostname是給交換機命名的命令,如交換機本來的名字是Switch,使用(config)#hostname
JIAOHUANJI,就可以把交換機的名字改成JIAOHUANJI了。
交換機配置時還分很多種模式,每種模式下的配置命令也都有很大區別,具體的真不是三兩句說得清的,你只有買些教材看看了。
⑸ 交換機的常用配置命令
a、更改遠程TELNNET密碼
Switch#configure terminal
Switch(config)#line vty 0 4
Switch(config-line)#password qycx123
Switch(config-line)#login
Switch(config-line)#exit
b、更改進入全局配置模式時的密碼
Switch#configure terminal
Switch(config)#enable secret qycx123
思科交換機常用命令——創建並劃分VLAN
a、創建VLAN
Switch#vlan database
Switch(vlan)#vlan 99 name office (創建vlan 99 並命名為office)
b、將埠劃分至vlan
Switch(config)#interface fastEthernet 0/8
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 99 (將8號快速以太口劃分至vlan 99)
思科交換機常用命令——調試命令
a、顯示所有配置命令:Switch#show run
b、顯示所有介面狀態:Switch#show ip int brief
c、顯示所有VLAN的信息:Switch#show vlan brief
cisco交換機還是比較常用的,於是我研究了一下Cisco交換機命令的大總結,在這里拿出來和大家分享一下,希望對大家有用。我所針對的都是Cisco的設備而言的,華為的可以跟據手冊來查,配置都是差不多的,這里華子就不多寫華為的設備了,了解的也不是很多。
Cisco交換機命令之使用Telnet遠程式管理
switch(config)#interface vlan 1 進入vlan 1
switch(config-if)#ip address 設置IP地址
switch(config-if)#ip default-gateway 設置默認網關
switch(config)#line vty 0 4 進入虛擬終端
switch(config-line)#login 允許登錄
switch(config-line)#password xx 設置登錄口令
switch#exit 返回命令
Cisco交換機命令之控制台口令
switch(config)#line console 0 進入控制台口
switch(config-line)#login 允許登錄
switch(config-line)#password xx 設置登錄口令
switch#exit 返回命令
Cisco交換機命令之基本介面配置
switch(config)#interface f0/1 進入f0/1介面
switch(config-if)#plex full 配置全雙工模式
switch(config-if)#speed 100 配置速率
switch(config-if)#description to ***** 介面描述
switch(config)#ip domain-name ***.com 設置或名伺服器
switch(config)#mac-address-table aging-time 設置mac表超時時間
switch#write 保存配置信息
switch# running-config startup-config 保存當前配置nvram
switch#erase startup-config 清除配置文件
Cisco交換機命令之交換機VLAN設置:
switch#vlan database 進入VLAN設置
switch(vlan)#vlan 2 建VLAN 2
switch(vlan)#name 名字 建VLAN 2的名稱
switch(vlan)#no vlan 2 刪vlan 2
注:刪除vlan時原屬於此vlan的埠處於非激活狀態,直到重新分配為止。
switch(config)#int f0/1 進入埠1
switch(config-if)#switchport mode access 當前埠工作莫試
switch(config-if)#switchport access vlan 2 當前埠加入vlan 2
switch(config-if)#switchport mode trunk 設置為干線
switch(config-if)#switchport trunk encapsulation dot1q 設置vlan 中繼協議
switch(config-if)#no switchport mode 或 ( switchport mode access) 禁用干線
switch(config-if)#switchport trunk allowed vlan add 1,2 ; 從Trunk中添加vlans
switch(config-if)#switchport trunk allowed vlan remove 1,2 ;從Trunk中刪除vlans
switch(config-if)#switchport trunk pruning vlan remove 1,2 ;從Trunk中關閉局部修剪
Cisco交換機命令之乙太網通道配置
switch(config)#interface range fasternet0/1 - 2 將fasternet0/1和0/2 口捆綁
switch(config-if)#channel-group 1 mode on 配置以太通道模式
switch(config-if)#port-channel load-balance {dst-mac | src-mac}在鏈路間實現負載均衡
switch#show etherchannel 1 summary 查看通道信息
switch#show etherchannel load-balance 查看通道信息
Cisco交換機命令之vtp配置
switch(config)#vtp domain 設置vtp域名
switch(config)#vtp password 設置vtp密碼
switch(config)#vtp mode server 設置vtp伺服器模式
switch(config)#vtp mode client 設置vtp客戶機模式
switch(config)#vtp mode transparent 設置vtp 透明模式
switch(config)#vtp version 設置vtp版本
switch(config)#vtp pruning 啟用vtp修解
switch(config)#no vtp pruning 關閉vtp修解
注:要想從vtp中減少一台交換機只需將該交換機vtp 名更改
Cisco交換機命令之生成樹stp:
switch(config)#spanning-tree vlan 啟用stp生成樹(基於vlan)
switch(config)#spanning-tree vlan root primary 指定根交換機(基於vlan)
switch(config)#spanning-tree vlan root secondary 指定備用根交換機(基於vlan)
switch(config)#spanning-tree vlan priority 指定交換機優先順序(基於vlan)
switch(config)#no spanning-tree vlan priority 將交換機的優先順序恢復默認值(基於vlan)
switch(config-if)#spanning-tree vlan cost 指定埠成本(起用trunk的埠模式下)
switch(config-if)#spanning-tree vlan port-prioty 指定交換機埠優先順序(基於vlan)
switch(config-if)#spanning-tree portfast 配置速埠(連接終端設備的埠狀態)如pc機
switch(config)#spanning-tree uplinkfast 配置上行速埠
switch(config)#spanning-tree vlan hello-time 配置交換機hello時間(基於vlan)
switch(config)#spanning-tree vlan forward-time 修改轉發延遲計時器(基於vlan)
switch(config)#spanning-tree vlan max-time 修改最大老化時間(基於vlan)
switch#show spanning-tree summery 檢測vlan生成樹配置
switch#show spanning-tree vlan detail 瀏覽詳細生成樹配置信息
switch#show spanning-tree interface detail 瀏覽詳細生成樹埠配置信息
Cisco交換機命令之交換機顯示命令:
switch#show vtp status 查看vtp配置信息
switch#show running-config 查看當前配置信息
switch#show vlan 查看vlan配置信息
switch#show interface 查看埠信息
switch#show int f0/0 查看指定埠信息
switch#dir flash: 查看快閃記憶體
switch#show version 查看當前版本信息
switch#show mac-address-table aging-time 查看mac超時時間
switch#show cdp cisco設備發現協議 (可以查看聆接設備)
switch#show cdp traffic 杳看接收和發送的cdp包統計信息
switch#show cdp neighbors 查看與該設備相鄰的cisco設備
switch#show interface f0/1 switchport 查看有關switchport的配置
switch#show cdp neighbors 查看與該設備相鄰的cisco設備
⑹ 交換機命令是什麼意思!
switchport
allowed
vlan
使用這個命令在選定的介面上配置vlan組,使用no的形式恢復默認值。
語法
switchport
allowed
vlan
{add
vlan
[tagged
|
untagged]
|
remove
vlan}
no
switchport
allowed
vlan
1
add
vlan--所要添加的vlan標識符
2
remove
vlan--所要刪除的vlan標識符
默認設置
所有的埠被分配到vlan
1
幀類型未加標記
命令模式
介面配置
命令的使用
1
如果交換機埠模式設置為trunk,那麼你只能分配一個介面到vlan組作為未加標記的成員。
2
幀總是在交換機中被加標記。加標記和未加標記的參數用於告知交換機是否從進口處的幀保留或除去標記。
3
如果鏈接的另一端所有媒質網路設備和主機都不支持vlan,那麼應該添加介面到這些vlan作為未加標記的成員。否則,有必要最多隻添加一個vlan作為未加標記的成員,這應該符合本地vlan。
4
如果手動添加禁用列中的vlan
到那個介面,那麼vlan自動從列中被刪除。
switchport
native
vlan
使用這個命令為一個埠配置pvid,使用no的形式恢復默認值。
語法
switchport
native
vlan
vlan-id
no
switchport
native
vlan
vlan-id--一個埠的默認vlan
id。(范圍:1-4094)
默認設置
vlan
1
命令模式
介面配置
命令的使用
1
如果介面不是vlan
1的成員,且你分配了它的pvid到這個vlan,那麼介面將自動添加到vlan
1作為一個未加標記的成員。對於其他vlan,在你分配介面的pvid到那個組之前,介面必須先配置為未加標記的成員。
2
如故可接受的幀類型被設為all(所有),或交換機埠模式被設為hybrid(混合),那麼pvid將被插入到所有未加標記的幀,流入進入埠。
第三個是一個基於交換機的命令
untagged
是一個埠的模式
⑺ 思科交換機詳細配置方法和命令
思科交換機的基本配置命令學習
一、交換機口令設置:
switch>enable ;進入特權模式
switch#config terminal ;進入全局配置模式
switch(config)#hostname csico ;設置交換機的主機名
switch(config)#enable secret
csico1 ;設置特權加密口令
switch(config)#enable password csico8 ;設置特權非密口令
switch(config)#line console 0 ;進入控制台口
switch(config-line)#line vty 0 4
;進入虛擬終端
switch(config-line)#login ;虛擬終端允許登錄
switch(config-line)#password
csico6 ;設置虛擬終端登錄口令csico6
switch#exit ;返回命令
二、交換機顯示命令:
switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息
switch#show run ;查看當前配置信息
switch#show
vlan ;查看vlan配置信息
switch#show interface ;查看埠信息
switch#show int f0/0
;查看指定埠信息
switch#show int f0/0 status;查看指定埠狀態
switch#dir flash: ;查看快閃記憶體
Cisco路由器配置命令大全網路 2010-06-26 06:43:44 閱讀657 評論0 字型大小:大中小 訂閱 .
(1)模式轉換命令
用戶模式----特權模式,使用命令"enable"
特權模式----全局配置模式,使用命令"config
t"
全局配置模式----介面模式,使用命令"interface+介面類型+介面號"
全局配置模式----線控模式,使用命令"line+介面類型+介面號"
注:
用戶模式:查看初始化的信息.
特權模式:查看所有信息、調試、保存配置信息
全局模式:配置所有信息、針對整個路由器或交換機的所有介面
介面模式:針對某一個介面的配置
線控模式:對路由器進行控制的介面配置
(2)配置命令
show running config 顯示所有的配置
show
versin 顯示版本號和寄存器值
shut down 關閉介面
no shutdown 打開介面
ip add +ip地址
配置IP地址
secondary+IP地址 為介面配置第二個IP地址
show interface+介面類型+介面號 查看介面管理性
show controllers interface 查看介面是否有DCE電纜
show history 查看歷史記錄
show
terminal 查看終端記錄大小
hostname+主機名 配置路由器或交換機的標識
config memory
修改保存在NVRAM中的啟動配置
exec timeout 0 0 設置控制台會話超時為0
service password-encryptin
手工加密所有密碼
enable password +密碼 配置明文密碼
ena sec +密碼 配置密文密碼
line vty 0
4/15 進入telnet介面
password +密碼 配置telnet密碼
line aux 0 進入AUX介面
password
+密碼 配置密碼
line con 0 進入CON介面
password +密碼 配置密碼
bandwidth+數字 配置帶寬
no ip address 刪除已配置的IP地址
show startup config 查看NVRAM中的配置信息
run-config atartup config 保存信息到NVRAM
write 保存信息到NVRAM
erase
startup-config 清除NVRAM中的配置信息
show ip interface brief 查看介面的謫要信息
banner
motd # +信息 + # 配置路由器或交換機的描素信息
description+信息 配置介面聽描素信息
vlan database
進入VLAN資料庫模式
vlan +vlan號+ 名稱 創建VLAN
switchport access vlan +vlan號
為VLAN為配介面
interface vlan +vlan號 進入VLAN介面模式
ip add +ip地址 為VLAN配置管理IP地址
vtp+service/tracsparent/client 配置SW的VTP工作模式
vtp +domain+域名 配置SW的VTP域名
vtp +password +密碼 配置SW的密碼
switchport mode trunk 啟用中繼
no vlan +vlan號
刪除VLAN
show spamming-tree vlan +vlan號 查看VLA怕生成樹議
三. 路由器配置命令
ip
route+非直連網段+子網掩碼+下一跳地址 配置靜態/默認路由
show ip route 查看路由表
show protocols
顯示出所有的被動路由協議和介面上哪些協議被設置
show ip protocols 顯示了被配置在路由器上的路由選擇協議,同時給出了在路由選擇協議中使用
的定時器
等信息
router rip 激活RIP協議
network +直連網段 發布直連網段
interface lookback 0 激活邏輯介面
passive-interface +介面類型+介面號 配置介面為被動模式
debug ip +協議 動態查看路由更新信息
undebug all 關閉所有DEBUG信息
router eigrp +as號
激活EIGRP路由協議
network +網段+子網掩碼 發布直連網段
show ip eigrp neighbors 查看鄰居表
show ip eigrp topology 查看拓撲表
show ip eigrp traffic 查看發送包數量
router
ospf +process-ID 激活OSPF協議
network+直連網段+area+區域號 發布直連網段
show ip ospf
顯示OSPF的進程號和ROUTER-ID
encapsulation+封裝格式 更改封裝格式
no ip admain-lookup
關閉路由器的域名查找
ip routing 在三層交換機上啟用路由功能
show user 查看SW的在線用戶
clear line
+線路號 清除線路
四. 三層交換機配置命令
配置一組二層埠
configure terminal 進入配置狀態
nterface range {port-range} 進入組配置狀態
配置三層埠
configure terminal 進入配置狀態
interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} |
{port-
channel port-channel-number} 進入埠配置狀態
no switchport
把物理埠變成三層口
ip address ip_address subnet_mask 配置IP地址和掩碼
no shutdown 激活埠
例:
Switch(config)# interface gigabitethernet0/2
Switch(config-if)#
no switchport
Switch(config-if)# ip address 192.20.135.21 255.255.255.0
Switch(config-if)# no shutdown
配置VLAN
configure terminal 進入配置狀態
vlan vlan-id 輸入一個VLAN號, 然後進入vlan配態,可以輸入一個新的VLAN號或舊的來進行修改
⑻ 求交換機命令大全
每個廠家的 產品命令也是不一樣的
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)# interface vlan 1
switch(config-if)# ip address ip-address netmask
switch(config-if)# ip default-gateway ip-address
在基於CLI的交換機上設置遠程訪問:
switch(enable) set interface sc0 ip-address netmask broadcast-address
switch(enable) set interface 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 interface [type modle/port]
switch# show cdp neighbors [type mole/port] [detail]
在基於CLI的交換機上啟用和瀏覽CDP信息:
switch(enable) set cdp {enable|disable} mole/port
為了查看Cisco鄰接設備的CDP通告信息:
switch(enable) show cdp neighbors[mole/port] [vlan|plex|capabilities|detail]
5.基於IOS的交換機的埠描述:
switch(config-if)# description description-string
基於CLI的交換機的埠描述:
switch(enable)set port name mole/number description-string
6.在基於IOS的交換機上設置埠速度:
switch(config-if)# speed{10|100|auto}
在基於CLI的交換機上設置埠速度:
switch(enable) set port speed moudle/number {10|100|auto}
switch(enable) set port speed moudle/number {4|16|auto}
7.在基於IOS的交換機上設置乙太網的鏈路模式:
switch(config-if)# plex {auto|full|half}
在基於CLI的交換機上設置乙太網的鏈路模式:
switch(enable) set port plex mole/number {full|half}
8.在基於IOS的交換機上配置靜態VLAN:
switch# vlan database
switch(vlan)# vlan vlan-num name vla
switch(vlan)# exit
switch# configure teriminal
switch(config)# interface interface mole/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)# interface interface mod/port
switch(config-if)# switchport mode trunk
switch(config-if)# switchport trunk encapsulation {isl|dotlq}
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 mole/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 {sever|cilent|transparent}
switch(vlan)# vtp password password
在基於CLI的交換機上配置VTP 模式:
switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]
⑼ 交換機的基本命令
交換機的啟動及基本配置
1924交換機上配置
sw1924_b#delete nvram
全部清除交換機的所有配置
sw1924_b#reload
重新啟動交換機(初始提示符為> )
sw1924_b#hostname sw1924
設置交換機的主機名
sw1924_b#enable secret cisco
設置加密密碼
sw1924_b#enable password level 1 cisco1
設置等級密碼(1最低)
sw1924_b#enable password level 15 cisco15
設置等級密碼(15最高)
sw1924_b#ip address 192.168.14.1 255.255.255.0
設置交換機的管理IP地址
sw1924_b#ip default-gateway 192.168.198.2
設置交換機的網關地址
sw1924_b#ip domain-name pctc.com.cn
設置交換機所連域的域名
sw1924_b#ip name-server 218.87.18.230
設置交換機所連域的域名伺服器IP
sw1924_b#show ip
查看上述設置環境
sw1924_b#show version
查看交換機的版本等信息
sw1924_b#show running-config
查看交換機的當前運行配置等全部信息
sw1924_b#show int e0/1
查看交換機的第1個埠信息
1924交換機配置埠屬性
sw1924_b#conf t
sw1924_b#interface ethernet 0/1
進入第1個埠
sw1924_b#description sw1924_b-e0/1-pc1
給埠寫入注釋信息
sw1924_b#plex auto/full/full-flow-control/half
設置埠的工作模式
sw1924_b#port secure
啟用埠安全性
sw1924_b#port secure max-mac-count 1
設置該埠允許對應的MAC地址數(默認132個)
sw1924_b#sh mac-address-table security
查看埠安全性
sw1912_a#conf t
進入全局配置模式
sw1912_a#interface fastethernet 0/1
進入第1個埠
sw1912_a#description sw2912_a-f0/1-pc1
給埠寫入注釋信息
sw1912_a#plex auto/full/half
設置埠的工作模式
sw1912_a#port security
啟用埠安全性
sw1912_a#port security max-mac-count 1
設置該埠允許對應的MAC地址數(默認132個)
sw1912_a#end
返回特權模式
sw1912_a#sh port security
查看埠安全性
配置和查看MAC地址表
1924交換機配置MAC地址表
sw1924_b#mac-address-table aging-time 600
設置動態地址超時時間
sw1924_b#mac-address-table permanent 0000.0cdd.5a4d e0/3
定義永久MAC地址(綁定MAC地址)
sw1924_b#mac-address-table restricted static 0000.0cdd.aaed e0/6 e0/7
定義受限MAC地址
sw1924_b#address-violation disable/ignore/suspend
定義地址安全違規
sw1924_b#show mac-address-table
查看上述配置
sw1924_b#clear mac-addr restric static
清除受限MAC地址表項
2912交換機配置MAC地址表
sw2912_a#mac-address-table aging-time 700
設置動態地址超時時間
sw2912_a#mac-address-table static 0000.0cdd.5a4d e0/3
定義永久MAC地址(綁定MAC地址)
sw2912_a#mac-address-table secure 00d0.f80d.3333 f0/3 vlan 1
定義受限MAC地址
sw2912_a#port security action shutdown/trap
定義地址安全違規
sw2912_a#show port security
查看上述配置
配置VTP、VLAN、VLAN Trunk和STP
配置VTP
sw1924_a#conf t
sw1924_a#vtp server
定義VTP的工作模式
sw1924_a#vtp domain cisco
定義VTP的域名
sw1924_a#trunk on
啟用幹道
sw1924_b#vtp domain cisco
加入VTP域
sw1924_b#vtp client
定義VTP的工作模式
sw1924_b#trunk on
啟用幹道
sw1924_a#show trunk b
sw1924_a#show trunk b allowed-vlans
查看幹道信息
配置VLAN
sw1924_a#vlan 10 dept1
sw1924_a#vlan 20 dept2
sw1924_a#vlan 30 dept3
sw1924_a#vlan 40 dept4
定義所需VLAN
sw1924_a#show vlan
查看VLAN信息
sw1924_b#show vlan
sw1924_b#show vtp
查看VTP的信息
sw1924_b#int e0/1
sw1924_b#vlan-membership static 10
sw1924_b#int e0/2
sw1924_b#vlan-membership static 20
sw1924_b#int e0/3
sw1924_b#vlan-membership static 30
sw1924_b#int e0/4
sw1924_b#vlan-membership static 40
把介面劃入各自VLAN
配置spanning tree
sw1924_b#spantree 1
啟用生成樹協議
sw1924_b#sh spantree 1
查看生成樹信息
sw1924_b#no spantree 1
關閉生成樹協議
sw1924_b#sh spantree 1
查看生成樹信息
⑽ 交換機全部命令和漢語翻譯,高分送上!
交換機配置命令詳解 1. 交換機支持的命令: 交換機基本狀態: switch: ;ROM狀態, 路由器是rommon hostname ;用戶模式 hostname# ;特權模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;介面狀態 交換機口令設置: switchenable ;進入特權模式 switch#config terminal ;進入全局配置模式 switch(config)#hostname ;設置交換機的主機名 switch(config)#enable secret xxx ;設置特權加密口令 switch(config)#enable password xxa ;設置特權非密口令 switch(config)#line console 0 ;進入控制台口 switch(config-line)#line vty 0 4 ;進入虛擬終端 switch(config-line)#login ;允許登錄 switch(config-line)#password xx ;設置登錄口令xx switch#exit ;返回命令 交換機VLAN設置: switch#vlan database ;進入VLAN設置 switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#no vlan 2 ;刪vlan 2 switch(config)#int f0/1 ;進入埠1 switch(config-if)#switchport access vlan 2 ;當前埠加入vlan 2 switch(config-if)#switchport mode trunk ;設置為干線 switch(config-if)#switchport trunk allowed vlan 1,2 ;設置允許的vlan switch(config-if)#switchport trunk encap dot1q ;設置vlan 中繼 switch(config)#vtp domain ;設置發vtp域名 switch(config)#vtp password ;設置發vtp密碼 switch(config)#vtp mode server ;設置發vtp模式 switch(config)#vtp mode client ;設置發vtp模式 交換機設置IP地址: switch(config)#interface vlan 1 ;進入vlan 1 switch(config-if)#ip address ;設置IP地址 switch(config)#ip default-gateway ;設置默認網關 switch#dir flash: ;查看快閃記憶體 交換機顯示命令: switch#write ;保存配置信息 switch#show vtp ;查看vtp配置信息 switch#show run ;查看當前配置信息 switch#show vlan ;查看vlan配置信息 switch#show interface ;查看埠信息 switch#show int f0/0 ;查看指定埠信息