09-GVRP命令
本章節下載: 09-GVRP命令 (156.40 KB)
【命令】
display garp statistics [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]
【視圖】
任意視圖
【缺省級別】
1:監控級
【參數】
interface interface-list:顯示指定端口上GARP的統計信息。interface-list為端口列表,表示方式為interface-list={ interface-type interface-number [ to interface-type interface-number ] }&<1-10>。其中,interface-type為端口類型,interface-number為端口編號。&<1-10>表示前麵的參數最多可以輸入10次。如果未指定該參數,則顯示所有端口上GARP的統計信息。
|:使用正則表達式對顯示信息進行過濾。有關正則表達式的詳細介紹,請參見“基礎配置指導”中的“CLI”。
begin:從包含指定正則表達式的行開始顯示。
exclude:隻顯示不包含指定正則表達式的行。
include:隻顯示包含指定正則表達式的行。
regular-expression:表示正則表達式,為1~256個字符的字符串,區分大小寫。
【描述】
display garp statistics命令用來顯示端口上GARP的統計信息。
當端口的GVRP功能使能後,係統會自動記錄該端口發送、接收或丟棄的GVRP協議報文的統計信息,當係統重啟或使用reset garp statistics命令後,這些統計信息將被自動清除並重新開始記錄。用戶可以通過查看統計信息來判斷端口的GVRP功能是否工作正常:
· 如果本設備端口上收、發的GVRP協議報文數分別與對端設備端口上發、收的GVRP協議報文數相等,則表示兩端的GVRP協議報文收發正常,沒有丟失VLAN注冊信息。
· 如果端口上丟棄的GVRP協議報文數量不為0,則表示本端口的注冊模式有可能為Fixed或Forbidden模式,即不能注冊動態VLAN,從而導致GVRP協議報文被端口丟棄。
相關配置可參考命令reset garp statistics。
【舉例】
# 顯示端口Ethernet1/0/1到Ethernet1/0/2上GARP的統計信息。
<Sysname> display garp statistics interface ethernet 1/0/1 to ethernet 1/0/2
GARP statistics on port Ethernet1/0/1
Number of GVRP Frames Received : 5
Number of GVRP Frames Transmitted : 2
Number of Frames Discarded : 1
GARP statistics on port Ethernet1/0/2
Number of GVRP Frames Received : 3
Number of GVRP Frames Transmitted : 4
Number of Frames Discarded : 2
表1-1 display garp statistics命令顯示信息描述表
字段 |
描述 |
GARP statistics on port Ethernet1/0/1 |
端口Ethernet1/0/1上GARP的統計信息 |
Number of GVRP Frames Received |
收到的GVRP協議報文數 |
Number of GVRP Frames Transmitted |
發出的GVRP協議報文數 |
Number of Frames Discarded |
丟棄的GVRP協議報文數 |
【命令】
display garp timer [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]
【視圖】
任意視圖
【缺省級別】
1:監控級
【參數】
interface interface-list:顯示指定端口上各GARP定時器的取值。interface-list為端口列表,表示方式為interface-list={ interface-type interface-number [ to interface-type interface-number ] }&<1-10>。其中,interface-type為端口類型,interface-number為端口編號。&<1-10>表示前麵的參數最多可以輸入10次。如果未指定該參數,則顯示所有端口上各GARP定時器的取值。
|:使用正則表達式對顯示信息進行過濾。有關正則表達式的詳細介紹,請參見“基礎配置指導”中的“CLI”。
begin:從包含指定正則表達式的行開始顯示。
exclude:隻顯示不包含指定正則表達式的行。
include:隻顯示包含指定正則表達式的行。
regular-expression:表示正則表達式,為1~256個字符的字符串,區分大小寫。
【描述】
display garp timer命令用來顯示端口上各GARP定時器的取值。
相關配置可參考命令garp timer hold、garp timer join、garp timer leave和garp timer leaveall。
【舉例】
# 顯示端口Ethernet1/0/1上各GARP定時器的值。
<Sysname> display garp timer interface ethernet 1/0/1
GARP timers on port Ethernet1/0/1
Garp Join Time : 20 centiseconds
Garp Leave Time : 60 centiseconds
Garp LeaveAll Time : 1000 centiseconds
Garp Hold Time : 10 centiseconds
表1-2 display garp timer命令顯示信息描述表
字段 |
描述 |
GARP timers on port Ethernet1/0/1 |
端口Ethernet1/0/1上各GARP定時器的取值 |
Garp Join Time |
Join定時器的取值(單位為厘秒,100厘秒=1秒) |
Garp Leave Time |
Leave定時器的取值(單位為厘秒,100厘秒=1秒) |
Garp LeaveAll Time |
LeaveAll定時器的取值(單位為厘秒,100厘秒=1秒) |
Garp Hold Time |
Hold定時器的取值(單位為厘秒,100厘秒=1秒) |
【命令】
display gvrp local-vlan interface interface-type interface-number [ | { begin | exclude | include } regular-expression ]
【視圖】
任意視圖
【缺省級別】
0:訪問級
【參數】
interface interface-type interface-number:顯示指定端口上GVRP本地VLAN的信息。其中,interface-type為端口類型,interface-number為端口編號。
|:使用正則表達式對顯示信息進行過濾。有關正則表達式的詳細介紹,請參見“基礎配置指導”中的“CLI”。
begin:從包含指定正則表達式的行開始顯示。
exclude:隻顯示不包含指定正則表達式的行。
include:隻顯示包含指定正則表達式的行。
regular-expression:表示正則表達式,為1~256個字符的字符串,區分大小寫。
【描述】
display gvrp local-vlan命令用來顯示端口上GVRP本地VLAN的信息。
【舉例】
# 顯示端口Ethernet1/0/1上GVRP本地VLAN的信息。
<Sysname> display gvrp local-vlan interface ethernet 1/0/1
Following VLANs exist in GVRP local database:
1(default),2-500
表1-3 display gvrp local-vlan命令顯示信息描述表
字段 |
描述 |
Following VLANs exist in GVRP local database |
下列VLAN存在於GVRP的本地數據庫中 |
【命令】
display gvrp state interface interface-type interface-number vlan vlan-id [ | { begin | exclude | include } regular-expression ]
【視圖】
任意視圖
【缺省級別】
0:訪問級
【參數】
interface interface-type interface-number:顯示指定端口上各GVRP狀態機信息。其中,interface-type為端口類型,interface-number為端口編號。
vlan vlan-id:顯示指定VLAN內各GVRP狀態機信息。其中,vlan-id為指定VLAN的ID號,取值範圍為1~4094。
|:使用正則表達式對顯示信息進行過濾。有關正則表達式的詳細介紹,請參見“基礎配置指導”中的“CLI”。
begin:從包含指定正則表達式的行開始顯示。
exclude:隻顯示不包含指定正則表達式的行。
include:隻顯示包含指定正則表達式的行。
regular-expression:表示正則表達式,為1~256個字符的字符串,區分大小寫。
【描述】
display gvrp state命令用來顯示端口上指定VLAN內各GVRP狀態機的信息。
【舉例】
# 顯示端口Ethernet1/0/1上VLAN 2內的GVRP狀態機信息。
<Sysname> display gvrp state interface ethernet 1/0/1 vlan 2
GVRP state of VLAN 2 on port Ethernet1/0/1
Applicant state machine : VP
Registrar state machine : MTR
表1-4 display gvrp state命令顯示信息描述表
字段 |
描述 |
GVRP state of VLAN 2 on port Ethernet1/0/1 |
端口Ethernet1/0/1上對應VLAN 2內各GARP狀態機的信息 |
Applicant state machine |
申請狀態機,用來完成屬性的聲明。其狀態包括:VA、AA、QA、LA、VP、AP、QP、VO、AO、QO、LO、VON、AON和QON,每個狀態都由2或3個字母組成,各字母含義如下: · 第一個字母表示狀態:V代表Very anxious,A代表Anxious,Q代表Quiet,L代表Leaving · 第二個字母表示成員類型:A代表Active member(主動成員),P代表Passive member(被動成員),O代表Observer(觀察者) · 第三個字母(如果有):N代表Non-participant(非參與實體) 譬如,VP代表“Very anxious,Passive member”,表示Very anxious狀態下的被動成員 |
Registrar state machine |
注冊狀態機,用來記錄其他實體所聲明屬性的注冊情況。其狀態包括:INN、LV、L3、L2、L1、MT、INR、LVR、L3R、L2R、L1R、MTR、INF、LVF、L3F、L2F、L1F和MTF,每個狀態都由2或3個字母/數字組成,各字母/數字含義如下: · 第一、二個字母/數字表示狀態:IN代表In;LV、L3、L2和L1都代表Leaving,L3、L2和L1是LV的三個子狀態;MT代表Empty · 第三個字母表示注冊模式:沒有或N都代表Normal registration(Normal模式),R代表Registration fixed(Fixed模式),F代表Registration forbidden(Forbidden模式) 譬如,MTR代表“Empty,Registration fixed”,表示Empty狀態下的Fixed注冊模式 |
【命令】
display gvrp statistics [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]
【視圖】
任意視圖
【缺省級別】
1:監控級
【參數】
interface interface-list:顯示指定Trunk端口上GVRP的統計信息。interface-list為端口列表,表示方式為interface-list={ interface-type interface-number [ to interface-type interface-number ] }&<1-10>。其中,interface-type為端口類型,interface-number為端口編號。&<1-10>表示前麵的參數最多可以輸入10次。如果未指定該參數,則顯示所有Trunk端口上GVRP的統計信息。
|:使用正則表達式對顯示信息進行過濾。有關正則表達式的詳細介紹,請參見“基礎配置指導”中的“CLI”。
begin:從包含指定正則表達式的行開始顯示。
exclude:隻顯示不包含指定正則表達式的行。
include:隻顯示包含指定正則表達式的行。
regular-expression:表示正則表達式,為1~256個字符的字符串,區分大小寫。
【描述】
display gvrp statistics命令用來顯示Trunk端口上GVRP的統計信息。
【舉例】
# 顯示Trunk端口Ethernet1/0/1上GVRP的統計信息。
<Sysname> display gvrp statistics interface ethernet1/0/1
GVRP statistics on port Ethernet1/0/1
GVRP Status : Enabled
GVRP Running : YES
GVRP Failed Registrations : 0
GVRP Last Pdu Origin : 0000-0000-0000
GVRP Registration Type : Normal
表1-5 display gvrp statistics命令顯示信息描述表
字段 |
描述 |
GVRP statistics on port Ethernet1/0/1 |
Trunk端口Ethernet1/0/1上GVRP的統計信息 |
GVRP Status |
GVRP的使能狀態: · Enabled:表示GVRP已使能 · Disabled:表示GVRP已關閉 |
GVRP Running |
GVRP是否正在運行: · YES:表示GVRP正在運行 · NO:表示GVRP沒有運行 |
GVRP Failed Registrations |
GVRP注冊失敗的次數 |
GVRP Last Pdu Origin |
上一個GVRP PDU的源MAC地址 |
GVRP Registration Type |
GVRP的注冊模式: · Fixed:表示Fixed模式 · Forbidden:表示Forbidden模式 · Normal:表示Normal模式 |
【命令】
display gvrp status [ | { begin | exclude | include } regular-expression ]
【視圖】
任意視圖
【缺省級別】
1:監控級
【參數】
|:使用正則表達式對顯示信息進行過濾。有關正則表達式的詳細介紹,請參見“基礎配置指導”中的“CLI”。
begin:從包含指定正則表達式的行開始顯示。
exclude:隻顯示不包含指定正則表達式的行。
include:隻顯示包含指定正則表達式的行。
regular-expression:表示正則表達式,為1~256個字符的字符串,區分大小寫。
【描述】
display gvrp status命令用來顯示GVRP的全局狀態信息。
【舉例】
# 顯示GVRP的全局狀態信息。
<Sysname> display gvrp status
GVRP is enabled
表1-6 display gvrp status命令顯示信息描述表
字段 |
描述 |
GVRP is enabled |
全局GVRP已使能 |
GVRP is disabled |
全局GVRP已關閉 |
【命令】
display gvrp vlan-operation interface interface-type interface-number [ | { begin | exclude | include } regular-expression ]
【視圖】
任意視圖
【缺省級別】
0:訪問級
【參數】
interface interface-type interface-number:顯示指定端口上當前的動態VLAN操作信息。其中,interface-type為端口類型,interface-number為端口編號。
|:使用正則表達式對顯示信息進行過濾。有關正則表達式的詳細介紹,請參見“基礎配置指導”中的“CLI”。
begin:從包含指定正則表達式的行開始顯示。
exclude:隻顯示不包含指定正則表達式的行。
include:隻顯示包含指定正則表達式的行。
regular-expression:表示正則表達式,為1~256個字符的字符串,區分大小寫。
【描述】
display gvrp vlan-operation命令用來顯示端口上當前的動態VLAN操作信息。
【舉例】
# 顯示端口Ethernet1/0/1上當前的動態VLAN操作信息。
<Sysname> display gvrp vlan-operation interface ethernet 1/0/1
Dynamic VLAN operations on port Ethernet1/0/1
Operations of creating VLAN : 2-100
Operations of deleting VLAN : none
Operations of adding VLAN to TRUNK : 2-100
Operations of deleting VLAN from TRUNK : none
表1-7 display gvrp vlan-operation命令顯示信息描述表
字段 |
描述 |
Dynamic VLAN operations on port Ethernet1/0/1 |
端口Ethernet1/0/1上當前的動態VLAN操作信息 |
Operations of creating VLAN |
創建下列VLAN的操作 |
Operations of deleting VLAN |
刪除下列VLAN的操作 |
Operations of adding VLAN to TRUNK |
添加下列VLAN到TRUNK端口的操作 |
Operations of deleting VLAN from TRUNK |
從TRUNK端口刪除下列VLAN的操作 |
【命令】
garp timer hold timer-value
undo garp timer hold
【視圖】
二層以太網端口視圖/二層聚合接口視圖/端口組視圖
【缺省級別】
2:係統級
【參數】
timer-value:Hold定時器的值,單位為厘秒(100厘秒=1秒)。其取值應大於等於10厘秒、小於等於Join定時器值的一半,且必須是5厘秒的倍數。
【描述】
garp timer hold命令用來配置Hold定時器的值。undo garp timer hold命令用來恢複缺省情況,但若Hold定時器當前有效的取值範圍內不包含其缺省值,則執行本命令無效。
缺省情況下,Hold定時器的值為10厘秒。
相關配置可參考命令display garp timer和garp timer join。
【舉例】
# 配置Hold定時器的值為10厘秒(假設此時Join定時器的值為20厘秒)。
<Sysname> system-view
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] garp timer hold 10
【命令】
garp timer join timer-value
undo garp timer join
【視圖】
二層以太網端口視圖/二層聚合接口視圖/端口組視圖
【缺省級別】
2:係統級
【參數】
timer-value:Join定時器的值,單位為厘秒(100厘秒=1秒)。其取值應大於等於Hold定時器值的兩倍、小於Leave定時器值的一半,且必須是5厘秒的倍數。
【描述】
garp timer join命令用來配置Join定時器的值。undo garp timer join命令用來恢複缺省情況,但若Join定時器當前有效的取值範圍內不包含其缺省值,則執行本命令無效。
缺省情況下,Join定時器的值為20厘秒。
相關配置可參考命令display garp timer、garp timer hold和garp timer leave。
【舉例】
# 配置Join定時器的值為25厘秒(假設此時Hold和Leave定時器均為缺省值)。
<Sysname> system-view
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] garp timer join 25
【命令】
garp timer leave timer-value
undo garp timer leave
【視圖】
二層以太網端口視圖/二層聚合接口視圖/端口組視圖
【缺省級別】
2:係統級
【參數】
timer-value:Leave定時器的值,單位為厘秒(100厘秒=1秒)。其取值應大於Join定時器值的兩倍、小於LeaveAll定時器的值,且必須是5厘秒的倍數。
【描述】
garp timer leave命令用來配置Leave定時器的值。undo garp timer leave命令用來恢複缺省情況,但若Leave定時器當前有效的取值範圍內不包含其缺省值,則執行本命令無效。
缺省情況下,Leave定時器的值為60厘秒。
相關配置可參考命令display garp timer、garp timer join和garp timer leaveall。
【舉例】
# 配置Leave定時器的值為100厘秒(假設此時Join和LeaveAll定時器均為缺省值)。
<Sysname> system-view
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] garp timer leave 100
【命令】
garp timer leaveall timer-value
undo garp timer leaveall
【視圖】
係統視圖
【缺省級別】
2:係統級
【參數】
timer-value:LeaveAll定時器的值,單位為厘秒(100厘秒=1秒)。其取值應大於所有端口上Leave定時器的值、小於等於32765厘秒,且必須是5厘秒的倍數。
【描述】
garp timer leaveall命令用來配置LeaveAll定時器的值。undo garp timer leaveall命令用來恢複缺省情況,但若LeaveAll定時器當前有效的取值範圍內不包含其缺省值,則執行本命令無效。
缺省情況下,LeaveAll定時器的值為1000厘秒。
需要注意的是,過小的LeaveAll定時器值可能會影響通過GVRP學習到的動態VLAN的穩定性,因此建議用戶配置的LeaveAll定時器值不要小於其缺省值。
相關配置可參考命令display garp timer和garp timer leave。
【舉例】
# 配置LeaveAll定時器的值為2000厘秒(假設此時所有端口上Leave定時器均為缺省值)。
<Sysname> system-view
[Sysname] garp timer leaveall 2000
【命令】
gvrp
undo gvrp
【視圖】
係統視圖/二層以太網端口視圖/二層聚合接口視圖/端口組視圖
【缺省級別】
2:係統級
【參數】
無
【描述】
gvrp命令用來使能全局或端口上的GVRP功能。undo gvrp命令用來關閉全局或端口上的GVRP功能。
缺省情況下,全局和端口上的GVRP功能均處於關閉狀態。
需要注意的是:
· 在係統視圖下執行本命令,用來使能/關閉全局的GVRP功能;而在二層以太網端口視圖、二層聚合接口視圖或端口組視圖下執行本命令,則用來使能/關閉端口上的GVRP功能。
· 要使能端口的GVRP功能,必須先使能全局的GVRP功能,再使能端口上的GVRP功能。
· 本命令在端口視圖下執行時,隻能在Trunk端口上執行。
· 若某Trunk端口上已使能了GVRP功能,在關閉GVRP功能之前不能更改此端口的鏈路類型。
相關配置可參考命令display gvrp status。
【舉例】
# 使能全局的GVRP功能。
<Sysname> system-view
[Sysname] gvrp
GVRP is enabled globally.
【命令】
gvrp registration { fixed | forbidden | normal }
undo gvrp registration
【視圖】
二層以太網端口視圖/二層聚合接口視圖/端口組視圖
【缺省級別】
2:係統級
【參數】
fixed:表示Fixed注冊模式。
forbidden:表示Forbidden注冊模式。
normal:表示Normal注冊模式。
【描述】
gvrp registration命令用來配置GVRP端口的注冊模式。undo gvrp registration命令用來恢複缺省情況。
缺省情況下,GVRP端口的注冊模式為Normal模式。
需要注意的是,本命令隻能在Trunk端口上執行。
相關配置可參考命令display gvrp statistics。
【舉例】
# 將端口Ethernet1/0/1的GVRP注冊模式設置為Fixed。
<Sysname> system-view
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] port link-type trunk
[Sysname-Ethernet1/0/1] gvrp registration fixed
【命令】
reset garp statistics [ interface interface-list ]
【視圖】
用戶視圖
【缺省級別】
2:係統級
【參數】
interface interface-list:清除指定端口上GARP的統計信息。interface-list為端口列表,表示方式為interface-list={ interface-type interface-number [ to interface-type interface-number ] }&<1-10>。其中,interface-type為端口類型,interface-number為端口編號。&<1-10>表示前麵的參數最多可以輸入10次。如果未指定該參數,則清除所有端口上GARP的統計信息。
【描述】
reset garp statistics命令用來清除端口上GARP的統計信息,包括端口發送、接收或丟棄的GVRP協議報文的統計信息。
相關配置可參考命令display garp statistics。
【舉例】
# 清除所有端口上GARP的統計信息。
<Sysname> reset garp statistics
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!