㈠ 交換機的常用配置命令
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設備
㈡ 交換機的命令具體怎麼使用
交換機的命令非常多,主要是用來配置交換機的,只有可網管的交換機(有console口的交換機)才能進行配置。
不同廠家、不同型號的交換機的配置命令也不大一樣。
舉個CISCO的命令例子吧:
hostname是給交換機命名的命令,如交換機本來的名字是Switch,使用(config)#hostname
JIAOHUANJI,就可以把交換機的名字改成JIAOHUANJI了。
交換機配置時還分很多種模式,每種模式下的配置命令也都有很大區別,具體的真不是三兩句說得清的,你只有買些教材看看了。
㈢ 交換機的基本命令
交換機的啟動及基本配置
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
查看生成樹信息
㈣ 華為交換機中 這個命令speed {10|100|auto} 什麼意思
控制網路埠的速度,分別是10兆,100兆,自適應
㈤ 求交換機命令大全
每個廠家的 產品命令也是不一樣的
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]
㈥ 有什麼辦法降低華為強制散熱企業交換機的風扇轉速
進入埠視圖然後speed1000不過有些埠是沒有這個命令的,比如XFP的萬兆埠,以及所有的100M埠
㈦ 交換機中有溫度、風扇轉速、各個網口狀態等參數信息嗎有的話,怎樣提取出來呢
我們單位用的交換機是7萬多元的,功能很豐富,就有溫度,風扇轉數,數據總量,各埠連接IP,流量等信息。查看這些信息,我看他們是通過IE,輸入了一個IP地址進去的,多少沒有注意,感覺有點像進路由器那樣,。但絕對不是192.168.1.1這樣的,要復雜一些。
㈧ CISCO2960-S交換機風扇能不能用命令關閉
風扇是必須的,所以系統不會提供關閉功能。聲音大是因為該換新的了,我們的環境導致各類設備的風扇消耗巨大。