同學們學習華爲交換機技術,覺得難嗎?爲幫助大家更好深入學習華爲交換機基礎知識,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