同學們學習華為交換機技術,覺得難嗎?為幫助大家更好深入學習華為交換機基礎知識,yjbys小編為大家帶來最新華為交換機常用命令,希望對大家學習有幫助!
vlan 顯示vlan
name text 指定當前vlan的名稱
undo name 取消
[h3c] vlan 2
[h3c-vlan2]name test vlan
dis users 顯示使用者
dis startup 顯示啟動配置檔案的資訊
dis user-interface 顯示使用者介面的相關資訊
dis web users 顯示web使用者的相關資訊。
header login 配置登陸驗證是顯示資訊
header shell
undo header
lock 鎖住當前使用者介面
acl 訪問控制列表 acl number inbound/outbound
[h3c]user-interface vty 0 4
[h3c-vty0-4] acl 2000 inbound
shutdown:關閉vlan介面
undo shutdown 開啟vlan介面
關閉vlan1 介面
[h3c] interface vlan-interface 1
[h3c-vlan-interface] shutdown
vlan vlan-id 定義vlan
undo valn vlan-id
display ip routing-table
display ip routing-table protocol static
display ip routing-table statistics
display ip routing-table verbose 檢視路由表的全部詳細資訊
interface vlan-interface vlan-id 進入valn
management-vlan vlan-id 定義管理vlan號
reset ip routing-table statistics protocol all 清除所有路由協議的路由資訊.
display garp statistics interface GigabitEthernet 1/0/1 顯示乙太網埠上的garp統計資訊
display voice vlan status 檢視語音vlan狀態
[h3c-GigabitEthernet1/0/1] broadcast-suppression 20 允許接受的最大廣播流量為該埠傳輸能力的20%.超出部分丟棄.
[h3c-GigabitEthernet1/0/1] broadcast-suppression pps 1000 每秒允許接受的最大廣播資料包為1000傳輸能力的20%.超出部分丟棄.
display interface GigabitEthernet1/0/1 檢視埠資訊
display brief interface GigabitEthernet1/0/1 檢視埠簡要配置資訊
display loopback-detection 用來測試環路測試是否開啟
display transceiver-information interface GigabitEthernet1/0/50 顯示光口相關資訊
duplex auto/full/half
[h3c]interface GigabitEthernet1/0/1
[h3c-GigabitEthernet1/0/1]duplux auto 設定埠雙工屬性為自協商
port link-type access/hybrid/trunk 預設為access
port trunk permit vlan all 將trunk扣加入所有vlan中
reset counters interface GigabitEthernet1/0/1 清楚埠的統計資訊
speed auto 10/100/1000
display port-security 檢視埠安全配置資訊
am user-bind mac-addr 00e0-fc00-5101 ip-addr interface GigabitEthernet1/0/1 埠ip繫結
display arp 顯示arp
display am user-bind 顯示埠繫結的配置資訊
display mac-address 顯示交換機學習到的mac地址
display stp 顯示生成樹狀態與統計資訊
[h3c-GigabitEthernet1/0/1]stp instance 0 cost 200 設定生成樹例項0上路徑開銷為200
stp cost 設定當前埠在指定生成樹例項上路徑開銷。instance-id 為0-16 0表cist 取值範圍1-200000
display system-guard ip-record 顯示防攻擊記錄資訊.
system-guard enable 啟用系統防攻擊功能
display icmp statistics icmp流量統計
display ip socket
display ip statistics
display acl all
acl number acl-number match-order auto/config
acl-number (2000-2999 是基本acl 3000-3999是高階acl為管理員預留的編號)
rule deny/permit protocal
訪問控制
[h3c] acl number 3000
[h3c-acl-adv-3000]rule permit tcp source destination destination-port eq 80 (
定義高階acl 3000,允許129.0.0/16網段的主機向202.38.160/24網段主機訪問埠80)
rule permit source
rule deny cos 3 souce 00de-bbef-adse ffff-ffff-fff dest 0011-4301-9912 ffff-ffff-ffff
(禁止mac地址00de-bbef-adse傳送到mac地址0011-4301-9912且802.1p優先順序為3的報文通過)
display qos-interface GigabitEthernet1/0/1 traffic-limit 檢視埠上流量
埠速率限制
line-rate inbound/outbound target-rate
inbound:對埠接收報文進行速率限制
outbound: 對埠傳送報文進行速率限制
target-rate 對報文限制速率,單位kbps 千兆口 inbound範圍1-1000000 outbound範圍20-1000000
undo line-rate取消限速.
[h3c]interface GigabitEthernet1/0/1
[h3c-GigabitEthernet1/0/1]line-rate outbound 128 限制出去速率為128kbps
display arp | include 77
display arp count 計算arp表的記錄數
display ndp 顯示交換機埠的詳細配置資訊。
display ntdp device-list verbose 收集裝置詳細資訊
display lock
display users