H3C交換機配置基本命令

2023-02-06 03:42:03 字數 7076 閱讀 6416

1、system-view 進入系統檢視模式

2、sysname 為裝置命名

3、display current-configuration 當前配置情況

4、 language-mode chinese|english 中英文切換

5、inte***ce ethernet 1/0/1 進入乙太網埠檢視

6、 port link-type access|trunk|hybrid 設定埠訪問模式

7、 undo shutdown 開啟乙太網埠

8、 shutdown 關閉乙太網埠

9、 quit 退出當前檢視模式

10、 vlan 10 建立vlan 10並進入vlan 10的檢視模式

11、 port access vlan 10 在埠模式下將當前埠加入到vlan 10中

12、port e1/0/2 to e1/0/5 在vlan模式下將指定埠加入到當前vlan中

13、port trunk permit vlan all 允許所有的vlan通過

h3c路由器

1、system-view 進入系統檢視模式

2、sysname r1 為裝置命名為r1

3、display ip routing-table 顯示當前路由表

4、 language-mode chinese|english 中英文切換

5、inte***ce ethernet 0/0 進入乙太網埠檢視

6、 ip address 192.168.1.1 255.255.255.0 配置ip位址和子網掩碼

7、 undo shutdown 開啟乙太網埠

8、 shutdown 關閉乙太網埠

9、 quit 退出當前檢視模式

10、 ip route-static 192.168.2.

0 255.255.255.

0 192.168.12.

2 description 配置靜態路由

11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description 配置預設的路由

h3c s3100 switch

h3c s3600 switch

h3c msr 20-20 router

1、調整超級終端的顯示字型大小;

2、捕獲超級終端操作命令行,以備日後查對;

3、 language-mode chinese|english 中英文切換;

4、複製命令到超級終端命令列, 貼上到主機;

5、交換機清除配置 :reset s**e ;reboot ;

6、路由器、交換機配置時不能掉電,連通測試前一定要

檢查網路的連通性,不要犯最低階的錯誤。

7、192.168.1.

1/24 等同 192.168.1.

1 255.255.255.

0;在配置交換機和路由器時, 192.168.1.

1 255.255.255.

0 可以寫成:

192.168.1.1 24

8、裝置命名規則:地名-裝置名-系列號例:pinggu-r-s3600

h3c華為交換機埠繫結基本配置2008-01-22 13:40

1,埠 mac

a)am命令

使用特殊的am user-bind命令,來完成mac位址與埠之間的繫結。例如:

[switcha]am user-bind mac-address 00e0-fc22-f8d3 inte***ce ethernet 0/1

配置說明:由於使用了埠引數,則會以埠為參照物,即此時埠e0/1只允許pc1上網,而使用其他未繫結的mac位址的pc機則無法上網。但

是pc1使用該mac位址可以在其他埠上網。

b)mac-address命令

使用mac-address static命令,來完成mac位址與埠之間的繫結。例如:

[switcha]mac-address static 00e0-fc22-f8d3 inte***ce ethernet 0/1 vlan 1

[switcha]mac-address max-mac-count 0

配置說明:由於使用了埠學習功能,故靜態繫結mac後,需再設定該埠mac學習數為0,使其他pc接入此埠後其mac位址無法被學習。

2,ip mac

a)am命令

使用特殊的am user-bind命令,來完成ip位址與mac位址之間的繫結。例如:

[switcha]am user-bind ip-address 10.1.1.2 mac-address 00e0-fc22-f8d3

配置說明:以上配置完成對pc機的ip位址和mac位址的全域性繫結,即與繫結的ip位址或者mac位址不同的pc機,在任何埠都無法上網。

支援型號:s3026e/ef/c/g/t、s3026c-pwr、e026/e026t、s3050c、e050、s3526e/c/ef、s5012t/g、s5024g

b)arp命令

使用特殊的arp static命令,來完成ip位址與mac位址之間的繫結。例如:

[switcha]arp static 10.1.1.2 00e0-fc22-f8d3

配置說明:以上配置完成對pc機的ip位址和mac位址的全域性繫結。

3,埠 ip mac

使用特殊的am user-bind命令,來完成ip、mac位址與埠之間的繫結。例如:

[switcha]am user-bind ip-address 10.1.1.2 mac-address 00e0-fc22-f8d3 inte***ce ethernet 0/1

配置說明:可以完成將pc1的ip位址、mac位址與埠e0/1之間的繫結功能。由於使用了埠引數,則會以埠為參照物,即此時埠e0/1只允

許 pc1上網,而使用其他未繫結的ip位址、mac位址的pc機則無法上網。但是pc1使用該ip位址和mac位址可以在其他埠上網。

[s2016-e1-ethernet0/1]mac-address max-mac-count 0;

進入到埠,用命令mac max-mac-count 0(埠mac學習數設為0)

[s2016-e1]mac static 0000-9999-8888 int e0/1 vlan 10;

將0000-9999-8888繫結到e0/1埠上,此時只有繫結mac的pc可以通過此口上網,同時e0/1屬於vlan 10

就這樣,ok了,不過上面兩個命令順序不能弄反,除非埠下沒有接pc

dis vlan 顯示vlan

name text 指定當前vlan的名稱

undo name 取消

[h3c] vlan 2

[h3c-vlan2]name test vlan

dis users 顯示使用者

dis startup 顯示啟動配置檔案的資訊

dis user-inte***ce 顯示使用者介面的相關資訊

dis web users 顯示web使用者的相關資訊。

header login 配置登陸驗證是顯示資訊

header shell

undo header

lock 鎖住當前使用者介面

acl 訪問控制列表 acl number inbound/outbound

[h3c]user-inte***ce vty 0 4

[h3c-vty0-4] acl 2000 inbound

shutdown:關閉vlan介面

undo shutdown 開啟vlan介面

關閉vlan1 介面

[h3c] inte***ce vlan-inte***ce 1

[h3c-vlan-inte***ce] 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 檢視路由表的全部詳細資訊

inte***ce vlan-inte***ce vlan-id 進入valn

management-vlan vlan-id 定義管理vlan號

reset ip routing-table statistics protocol all 清除所有路由協議的路由資訊.

display garp statistics inte***ce 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 inte***ce gigabitethernet1/0/1 檢視埠資訊

display brief inte***ce gigabitethernet1/0/1 檢視埠簡要配置資訊

display loopback-detection 用來測試環路測試是否開啟

display transceiver-information inte***ce gigabitethernet1/0/50 顯示光口相關資訊

duplex auto/full/half

[h3c]inte***ce 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 inte***ce gigabitethernet1/0/1 清楚埠的統計資訊

speed auto 10/100/1000

display port-security 檢視埠安全配置資訊

am user-bind mac-addr 00e0-fc00-5101 ip-addr 10.153.1.

2 inte***ce 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 129.9.0.

0 0.0.255.

255 destination 202.38.160.

0 0.0.255.

255 destination-port eq 80 (

定義高階acl 3000,允許129.0.0/16網段的主機向202.38.160/24網段主機訪問埠80)

rule permit source 211.100.255.0 0.255.255.255

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-inte***ce 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]inte***ce 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

display cpu

display memory

display fan

display device

display power

CISCO交換機配置命令大全

1.在基於ios的交換機上設定主機名 系統名 switch config hostname hostname 在基於cli的交換機上設定主機名 系統名 switch enable set system name name string 2.在基於ios的交換機上設定登入口令 switch confi...

華為交換機配置命令大全

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

華為交換機配置命令大全

開始建立本地配置環境,將主機的串列埠通過配置電纜與乙太網交換機的console口連線。在主機上執行終端 程式 如windows的超級終端等 設定終端通訊引數為 波特率為9600bit s 8位資料位 1位停止位 無校驗和無流控,並選擇終端型別為vt100。乙太網交換機上電,終端上顯示乙太網交換機自檢...