• 產品與解決方案
  • 行業解決方案
  • 服務
  • 支持
  • 合作夥伴
  • 關於我們

04-二層技術-以太網交換配置指導

目錄

14-MVRP配置

本章節下載 14-MVRP配置  (301.39 KB)

14-MVRP配置


1 MVRP

1.1  MVRP簡介

MRP(Multiple Register Protocol,多屬性注冊協議)作為一個屬性注冊協議的載體,可以用來傳播屬性消息。遵循MRP協議的應用實體稱為MRP應用,MVRP(Multiple VLAN Register Protocol,多VLAN注冊協議)就是MRP的應用之一。MRP和MVRP分別是GARP(Generic Attribute Registration Protocol,通用屬性注冊協議)及GVRP(GARP VLAN Registration Protocol,GARP VLAN注冊協議)的升級版本,提高了屬性聲明效率,用於替代GARP和GVRP協議。MVRP用於在設備間發布並學習VLAN配置信息,使得設備能夠自動同步VLAN配置,減少網管人員的配置工作。在網絡拓撲變化後,MVRP根據新的拓撲重新發布及學習VLAN,做到實時與網絡拓撲同步更新。有關GVRP的詳細介紹,請參見“二層技術-以太網交換配置指導”中的“GVRP”。

1.1.1  MRP簡介

與GARP提供的機製不同,MRP支持在基於MSTI(Multiple Spanning Tree Instance,多生成樹實例)的基礎上,用於協助同一局域網內各成員之間聲明、傳播和注冊某種信息(如VLAN)。

1. MRP實現機製

設備上每一個參與協議的端口都可以視為一個應用實體,當MRP應用(如MVRP)在端口上啟動之後,該端口就可視為一個MRP應用實體。

通過MRP機製,一個MRP應用實體上的配置信息會迅速傳遍整個局域網。如圖1-1所示,MRP應用實體通過發送兩種協議報文:聲明或回收聲明,來通知其它MRP應用實體來注冊或注銷自己的屬性信息,並根據其它MRP實體發來的聲明或回收聲明來注冊或注銷對方的屬性信息。

圖1-1 MRP實現機製示意圖

 

2. MRP消息

MRP應用實體之間的信息交換借助於傳遞各種消息來完成,主要包括Join消息、New消息、Leave消息和LeaveAll消息,它們通過互相配合來確保信息的注冊或注銷。由於MVRP基於MRP實現,因此,MVRP也是通過MRP消息進行信息交互的。

(1)     Join消息

當一個MRP應用實體希望其它MRP實體注冊自己的屬性信息時,它會發送Join消息;當收到來自其它實體的Join消息或由於本實體靜態配置了某些屬性而需要其它實體進行注冊時, 它也會發送Join消息。Join消息又分為JoinEmpty和JoinIn兩種,二者的區別如下:

·     JoinEmpty:用於聲明一個本身沒有注冊的屬性。

·     JoinIn:用於聲明一個本身已經注冊的屬性。

(2)     New消息

MSTP(Multiple Spanning Tree Protocol,多生成樹協議)拓撲變化(這裏指檢測到MSTP的TcDetected事件)時,MRP應用實體需要向外發送New消息。當收到來自其它實體的New消息時,它也會發送New消息。New消息的作用和Join消息比較類似,都是為了實現屬性的注冊。

(3)     Leave消息

當一個MRP應用實體收到來自其它實體的Leave消息或由於本實體注銷了某些屬性而需要其它實體進行注銷時,它也會發送Leave消息。

(4)     LeaveAll消息

每個MRP應用實體啟動時都會啟動各自的LeaveAll定時器,當該定時器超時後,該MRP實體就會對外發送LeaveAll消息。LeaveAll消息用來注銷所有的屬性,以使其它MRP實體重新注冊本實體上所有的屬性信息,從而周期性地清除網絡中的垃圾屬性;當收到來自其它實體的LeaveAll消息時,該MRP實體會根據其屬性狀態決定是否發送Join消息要求發送LeaveAll的實體重新注冊。在發送LeaveAll消息同時MRP實體重新啟動LeaveAll定時器,開始新的一輪循環。

3. MRP定時器

MRP定義了四種定時器,用於控製各種MRP消息的發送。

(1)     Periodic定時器

每個MRP應用實體啟動時都會啟動各自的Periodic定時器,來控製MRP消息的發送。該定時器超時前,MRP應用實體需要發送MRP消息時,不會立即將該消息發送出去,而是在該定時器超時後,將此時間間隔內待發送的所有MRP消息封裝成盡可能少的報文發送出去,這樣減少了報文發送數量,同時可以定期發送報文。隨後再重新啟動Periodic定時器,開始新一輪的循環。

說明

Periodic定時器允許用戶通過命令行開啟或關閉。如果關閉Periodic定時器,則不再周期發送MRP消息。

 

(2)     Join定時器

Join定時器用來控製消息的發送。為了保證消息能夠可靠地傳輸到其它實體,MRP應用實體在發出Join消息後將等待一個Join定時器的時間間隔。如果在該定時器超時前收到了其它實體發來的JoinIn消息,便不再重發該Join消息。在該定時器超時後,如果此時Periodic定時器也超時,它將重發一次該Join消息;否則不發送該Join消息。

(3)     Leave定時器

Leave定時器用來控製屬性的注銷。當MRP應用實體希望其它實體注銷自己的某屬性信息時會發送Leave消息,收到該消息的實體將啟動Leave定時器,隻有在該定時器超時前沒有收到該屬性信息的Join消息,該屬性信息才會被注銷。

(4)     LeaveAll定時器

每個MRP應用實體啟動時都會啟動各自的LeaveAll定時器,當該定時器超時後,該MRP實體就會對外發送LeaveAll消息,以使其它實體重新注冊本實體上所有的屬性信息。隨後再重新啟動LeaveAll定時器,開始新一輪的循環。收到LeaveAll消息的實體將重新啟動LeaveAll定時器。

說明

盡管全網各設備上LeaveAll定時器的值有可能不同,但這些設備都將以相鄰端口的LeaveAll定時器的最小值為周期來發送LeaveAll消息,並且,下次重啟後,各個端口的LeaveAll定時器的值都將在一定範圍內隨機變動。

 

4. MRP協議報文封裝格式

圖1-1 MRP協議報文封裝格式

 

圖1-1所示,MRP協議報文采用IEEE 802.3 Ethernet封裝格式,其中主要字段的說明如表1-1所示。

表1-1 MRP協議報文主要字段說明

字段

說明

MRPDU

封裝在MRP協議報文中的MRPDU(Protocol Data Unit,協議數據單元)

Protocol Version

協議版本號,目前為0

Message

屬性消息,每個消息都由Attribute Type,Attribute Length和Attribute List三個字段構成

End Mark

屬性及消息的結束標記,取值為0x00

Attribute Type

屬性類型,目前使用的是VID Vector屬性類型,取值為1

Attribute Length

FirstValue字段的長度取值,在MVRP中規定其取值為2

Attribute List

屬性列表,由多個屬性構成

Vector Attribute

屬性,每個屬性都由VectorHeader,FirstValue和Vector這三個字段構成

Vector Header

向量頭域,每個向量頭域由LeaveAllEvent和NumberOfValues這兩個字段構成

First Value

起始屬性值,長度為2字節

Vector

屬性數據,每個字節代表3個屬性的動作值,動作值分別定義為:

·     0x00: New operator

·     0x01: JoinIn operator

·     0x02: In operator

·     0x03: JoinMt operator

·     0x04: Mt operator

·     0x05: Lv operator

設共用同一個字節的3個屬性的動作值分別為A1、 A2和A3,則A1A2A3對應的字節值應該為:((A1 * 6 + A2) * 6) + A3,取值範圍在[0, 255]

LeaveAll Event

是否為LeaveAll操作:

·     0表示非LeaveAll操作

·     1表示LeaveAll操作

Number of Values

Vector字段中包含的屬性值數量,長度為13bits

 

MRP協議報文以特定組播MAC地址為目的MAC,如MVRP的目的MAC地址為01-80-C2-00-00-21,Type為88F5。當設備在收到MRP應用實體的報文後,會根據其目的MAC地址分發給不同的MRP應用進行處理。

1.1.2  MVRP實現

1. MVRP概述

MVRP是MRP應用的一種,它基於MRP的工作機製來維護設備中的VLAN動態注冊信息,並將該信息向其它設備傳播:當設備啟動了MVRP之後,就能夠接收來自其它設備的VLAN注冊信息,並動態更新本地的VLAN注冊信息,包括當前的VLAN成員及這些VLAN成員可通過哪個端口到達等;此外,設備還能夠將本地的VLAN注冊信息向其它設備傳播,從而使同一局域網內所有設備的VLAN信息都達成一致。

MVRP傳播的VLAN注冊信息既包括本地手工配置的靜態注冊信息,也包括來自其它設備的動態注冊信息。

2. MVRP實現機製

MVRP協議實現VLAN屬性注冊和注銷的方式如下:

l     當端口收到一個VLAN屬性的聲明時,該端口將注冊該聲明中所包含的VLAN屬性(即,該端口加入到該VLAN中)。

l     當端口收到一個VLAN屬性的回收聲明時,該端口將注銷該聲明中所包含的VLAN屬性 (即,該端口退出該VLAN)。

說明

圖1-1可以看作是MVRP協議在某一個MSTI上的實現機製,屬於比較簡單的一種情況,在實際應用的複雜組網情況下,可能存在多個MSTI,而VLAN的注冊和注銷隻會在各自的MSTI上進行。有關MSTI的詳細介紹,請參見“二層技術-以太網交換配置指導”中的“生成樹”。

 

3. MVRP的注冊模式

我們將通過手工創建的VLAN稱為靜態VLAN,通過MVRP協議創建的VLAN稱為動態VLAN。MVRP有三種注冊模式,不同注冊模式對靜態VLAN和動態VLAN的處理方式也不同。

(1)     Normal模式

該模式下的接口允許進行動態VLAN的注冊或注銷,並允許發送動態和靜態VLAN的聲明。

(2)     Fixed模式

該模式下的接口禁止動態VLAN的注銷,但允許發送動態和靜態VLAN的聲明,收到的MVRP報文會被忽略丟棄。也就是說,該模式下的Trunk接口,學習到的動態VLAN是不會被注銷的,同時也不會學習到新的動態VLAN。

(3)     Forbidden模式

該模式下的接口禁止進行動態VLAN的注冊,但允許發送動態和靜態VLAN的聲明,收到的MVRP報文會被忽略丟棄。也就是說,該模式下的Trunk接口,不允許進行動態VLAN的注冊,一旦學習到的動態VLAN被注銷後,不會重新進行學習。

1.1.3  協議規範

與MVRP相關的協議規範有:

·     IEEE 802.1ak:IEEE Standard for Local and Metropolitan Area Networks: Virtual Bridged Local Area Networks – Amendment 07:Multiple Registration Protocol

1.2  MVRP配置任務簡介

表1-2 MVRP配置任務簡介

配置任務

說明

詳細配置

配置MVRP功能

必選

1.3 

配置MRP定時器

可選

1.4 

配置兼容GVRP功能

可選

1.5 

 

說明

對於MVRP的相關配置來說:

l     以太網接口視圖下的配置或二層聚合接口視圖下的配置隻對當前接口有效;端口組視圖下的配置對當前端口組中的所有端口有效。

l     聚合成員端口上的配置隻有當該端口退出聚合組後才會生效。

 

1.3  配置MVRP功能

在使能端口的MVRP功能之前,必須先全局使能MVRP功能。此外,MVRP功能隻能配置在Trunk端口上,並且需要通過配置來保證所有動態注冊的VLAN都能夠從該端口通過。

注意

l     MVRP功能與業務環回功能互斥,兩者不可以同時應用。

l     MVRP功能隻能與STP、RSTP或MSTP配合使用,而無法與其它二層網絡拓撲協議(如PVST、RRPP和Smart Link)配合使用。MVRP報文的收發不受STP/RSTP/MSTP阻塞端口影響。有關STP、RSTP、MSTP和PVST的詳細介紹,請參見“二層技術-以太網交換配置指導”中的“生成樹”;有關RRPP和Smart Link的詳細介紹,請參見“可靠性配置指導”中的“RRPP”和“Smart Link”。

l     建議不要同時啟用遠程端口鏡像功能和MVRP功能,否則MVRP可能將遠程鏡像VLAN注冊到不希望的端口上,導致鏡像目的端口會收到很多不必要的報文。有關遠程端口鏡像的詳細介紹,請參見“網絡管理和監控配置指導”中的“鏡像”。

l     在二層聚合接口上啟用了MVRP功能後,會同時在二層聚合接口和對應的所有選中成員端口上進行動態VLAN的注冊或注銷。

l     由於MVRP需要基於MSTI運行,因此在配置MVRP時,需要保證當前網絡內所有MSTI都生效,即網絡中設備都需要至少存在一個MSTI對應的VLAN以保證MSTI能夠生效。

 

表1-3 配置MVRP功能

操作

命令

說明

進入係統視圖

system-view

-

全局使能MVRP功能

mvrp global enable

必選

缺省情況下,全局的MVRP功能處於關閉狀態

進入相應視圖

進入以太網接口或二層聚合接口視圖

interface interface-type interface-number

二者必選其一

進入端口組視圖

port-group manual port-group-name

配置端口的鏈路類型為Trunk類型

port link-type trunk

必選

缺省情況下,端口的鏈路類型為Access類型

允許所有VLAN都通過當前Trunk端口

port trunk permit vlan all

必選

缺省情況下,Trunk端口隻允許VLAN 1通過

在端口上使能MVRP功能

mvrp enable

必選

缺省情況下,端口上的MVRP功能處於關閉狀態

配置MVRP端口的注冊模式

mvrp registration { fixed | forbidden | normal }

可選

缺省情況下,MVRP端口的注冊模式為Normal模式

 

說明

有關port link-type trunkport trunk permit vlan all命令的詳細介紹,請參見“二層技術-以太網交換命令參考”中的“VLAN”。

 

1.4  配置MRP定時器

說明

l     MRP定時器值的改變將應用於當前端口所有運行的MRP應用(如MVRP)上。MRP定時器的配置值建議全網配置一致,否則在配置不匹配的情況下會出現VLAN頻繁注冊/注銷的情況。

l     設備的每個端口上都獨立維護自己的Periodic定時器、Join定時器和LeaveAll定時器,而每個端口的每個屬性上維護著一個Leave定時器。

 

表1-4 配置MRP定時器

操作

命令

說明

進入係統視圖

system-view

-

進入相關視圖

進入以太網接口或二層聚合接口視圖

interface interface-type interface-number

二者必選其一

進入端口組視圖

port-group manual port-group-name

配置LeaveAll定時器

mrp timer leaveall timer-value

可選

缺省情況下,LeaveAll定時器的值為1000厘秒

配置Join定時器

mrp timer join timer-value

可選

缺省情況下,Join定時器的值為20厘秒

配置Leave定時器

mrp timer leave timer-value

可選

缺省情況下,Leave定時器的值為60厘秒

配置Periodic定時器

mrp timer periodic timer-value

可選

缺省情況下,Periodic定時器的值為100厘秒

 

1-5所示,MRP定時器(Join定時器、Leave定時器、LeaveAll定時器)的取值範圍之間存在著相互製約的關係:

·     當配置某定時器時,如果配置值超出了該定時器當前有效的取值範圍,則該配置無效。用戶可以通過改變相關定時器的值來重新進行配置。

·     當用戶欲恢複各定時器的值為缺省值時,須按照Join定時器->Leave定時器->LeaveAll定時器的順序依次恢複。Periodic定時器的值可以在任何時刻恢複為缺省值。

表1-5 各MRP定時器取值範圍間的製約關係

定時器

取值下限

取值上限

Join定時器

20厘秒

小於Leave定時器值的一半

Leave定時器

大於Join定時器值的兩倍

小於LeaveAll定時器的值

LeaveAll定時器

大於所有端口上Leave定時器的值

小於32765厘秒

 

1.5  配置兼容GVRP功能

注意

l     在配置兼容GVRP功能後,MVRP功能隻能與STP或RSTP配合使用,而不能與MSTP配合使用,否則可能會造成網絡工作的不正常。

l     在配置兼容GVRP功能後,建議關閉MVRP的Periodic定時器,否則在係統繁忙時,容易造成VLAN狀態頻繁改變。

 

MVRP允許兼容GVRP。當對端設備支持GVRP功能時,可以通過配置兼容GVRP功能,允許本端設備同時接收發送MVRP和GVRP報文。

表1-6 配置兼容GVRP功能

操作

命令

說明

進入係統視圖

system-view

-

配置MVRP工作在兼容GVRP的模式

mvrp gvrp-compliance enable

必選

缺省情況下,MVRP不兼容GVRP模式

 

1.6  MVRP顯示和維護

在完成上述配置後,在任意視圖下執行display命令可以顯示配置後MRP或MVRP的運行情況,通過查看顯示信息驗證配置的效果。

在用戶視圖下執行reset命令可以清除MVRP的統計信息。

表1-7 MVRP顯示和維護

操作

命令

顯示指定端口及VLAN的各MVRP接口狀態信息

display mvrp state interface interface-type interface-number vlan vlan-id [ | { begin | exclude | include } regular-expression ]

顯示MVRP的運行狀態信息

display mvrp running-status [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]

顯示MVRP的統計信息

display mvrp statistics [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]

顯示端口上當前的動態VLAN操作信息

display mvrp vlan-operation interface interface-type interface-number  [ | { begin | exclude | include } regular-expression ]

清除端口上MRP的統計信息

reset mvrp statistics [ interface interface-list ]

 

1.7  MVRP典型配置舉例

1.7.1  MVRP Normal注冊模式配置舉例

1. 組網需求

·     如圖1-2所示,Device A、Device B、Device C和Device D分別相連。

·     通過配置MSTP,使不同VLAN的報文按照不同的MSTI轉發:VLAN 10的報文沿MSTI 1轉發,VLAN 20沿MSTI 2轉發,其它VLAN沿MSTI 0轉發。

·     通過啟用MVRP功能,並配置MVRP的注冊模式為Normal模式,來實現Device A、Device B、Device C和Device D之間的所有動態和靜態VLAN的注冊和注銷。

2. 組網圖

圖1-2 MVRP Normal注冊模式配置組網圖

 

3. 配置步驟

(1)     配置Device A

# 進入MST域視圖。

<DeviceA> system-view

[DeviceA] stp region-configuration

# 配置MST域的域名、VLAN映射關係和修訂級別。

[DeviceA-mst-region] region-name example

[DeviceA-mst-region] instance 1 vlan 10

[DeviceA-mst-region] instance 2 vlan 20

[DeviceA-mst-region] revision-level 0

# 手工激活MST域的配置。

[DeviceA-mst-region] active region-configuration

[DeviceA-mst-region] quit

# 定義Device A為MSTI 1的根橋。

[DeviceA] stp instance 1 root primary

# 全局使能生成樹協議。

[DeviceA] stp enable

# 全局使能MVRP功能。

[DeviceA] mvrp global enable

# 將端口GigabitEthernet3/0/1配置為Trunk口,並允許所有VLAN通過。

[DeviceA] interface GigabitEthernet 3/0/1

[DeviceA-GigabitEthernet3/0/1] port link-type trunk

[DeviceA-GigabitEthernet3/0/1] port trunk permit vlan all

# 在端口GigabitEthernet3/0/1上使能MVRP。

[DeviceA-GigabitEthernet3/0/1] mvrp enable

[DeviceA-GigabitEthernet3/0/1] quit

# 將端口GigabitEthernet3/0/2配置為Trunk口,並允許VLAN 40通過。

[DeviceA] interface GigabitEthernet 3/0/2

[DeviceA-GigabitEthernet3/0/2] port link-type trunk

[DeviceA-GigabitEthernet3/0/2] port trunk permit vlan 40

# 在端口GigabitEthernet3/0/2上使能MVRP。

[DeviceA-GigabitEthernet3/0/2] mvrp enable

[DeviceA-GigabitEthernet3/0/2] quit

# 將端口GigabitEthernet3/0/3配置為Trunk口,並允許所有VLAN通過。

[DeviceA] interface GigabitEthernet 3/0/3

[DeviceA-GigabitEthernet3/0/3] port link-type trunk

[DeviceA-GigabitEthernet3/0/3] port trunk permit vlan all

# 在端口GigabitEthernet3/0/3上使能MVRP。

[DeviceA-GigabitEthernet3/0/3] mvrp enable

[DeviceA-GigabitEthernet3/0/3] quit

# 配置靜態VLAN 10。

[DeviceA] vlan 10

[DeviceA-vlan10] return

(2)     配置Device B

# 進入MST域視圖。

<DeviceB> system-view

[DeviceB] stp region-configuration

# 配置MST域的域名、VLAN映射關係和修訂級別。

[DeviceB-mst-region] region-name example

[DeviceB-mst-region] instance 1 vlan 10

[DeviceB-mst-region] instance 2 vlan 20

[DeviceB-mst-region] revision-level 0

# 手工激活MST域的配置。

[DeviceB-mst-region] active region-configuration

[DeviceB-mst-region] quit

# 定義Device B為MSTI 2的根橋。

[DeviceB] stp instance 2 root primary

# 全局使能生成樹協議。

[DeviceB] stp enable

# 開啟全局MVRP功能。

[DeviceB] mvrp global enable

# 將端口GigabitEthernet3/0/1配置為Trunk口,並允許VLAN 20、VLAN 40通過。

[DeviceB] interface GigabitEthernet 3/0/1

[DeviceB-GigabitEthernet3/0/1] port link-type trunk

[DeviceB-GigabitEthernet3/0/1] port trunk permit vlan 20 40

# 在端口GigabitEthernet3/0/1上使能MVRP。

[DeviceB-GigabitEthernet3/0/1] mvrp enable

[DeviceB-GigabitEthernet3/0/1] quit

# 將端口GigabitEthernet3/0/2配置為Trunk口,並允許所有VLAN通過。

[DeviceB] interface GigabitEthernet 3/0/2

[DeviceB-GigabitEthernet3/0/2] port link-type trunk

[DeviceB-GigabitEthernet3/0/2] port trunk permit vlan all

# 在端口GigabitEthernet3/0/2上使能MVRP。

[DeviceB-GigabitEthernet3/0/2] mvrp enable

[DeviceB-GigabitEthernet3/0/2] quit

# 將端口GigabitEthernet3/0/3配置為Trunk口,並允許所有VLAN通過。

[DeviceB] interface GigabitEthernet 3/0/3

[DeviceB-GigabitEthernet3/0/3] port link-type trunk

[DeviceB-GigabitEthernet3/0/3] port trunk permit vlan all

# 在端口GigabitEthernet3/0/3上使能MVRP。

[DeviceB-GigabitEthernet3/0/3] mvrp enable

[DeviceB-GigabitEthernet3/0/3] quit

# 配置靜態VLAN 20。

[DeviceB] vlan 20

[DeviceB-vlan20] return

(3)     配置Device C

# 進入MST域視圖。

<DeviceC> system-view

[DeviceC] stp region-configuration

# 配置MST域的域名、VLAN映射關係和修訂級別。

[DeviceC-mst-region] region-name example

[DeviceC-mst-region] instance 1 vlan 10

[DeviceC-mst-region] instance 2 vlan 20

[DeviceC-mst-region] revision-level 0

# 手工激活MST域的配置。

[DeviceC-mst-region] active region-configuration

[DeviceC-mst-region] quit

# 全局使能生成樹協議。

[DeviceC] stp enable

# 全局使能MVRP功能。

[DeviceC] mvrp global enable

# 將端口GigabitEthernet3/0/1配置為Trunk口,並允許所有VLAN通過。

[DeviceC] interface GigabitEthernet 3/0/1

[DeviceC-GigabitEthernet3/0/1] port link-type trunk

[DeviceC-GigabitEthernet3/0/1] port trunk permit vlan all

# 在端口GigabitEthernet3/0/1上使能MVRP。

[DeviceC-GigabitEthernet3/0/1] mvrp enable

[DeviceC-GigabitEthernet3/0/1] quit

# 將端口GigabitEthernet3/0/2配置為Trunk口,並允許所有VLAN通過。

[DeviceC] interface GigabitEthernet 3/0/2

[DeviceC-GigabitEthernet3/0/2] port link-type trunk

[DeviceC-GigabitEthernet3/0/2] port trunk permit vlan all

# 在端口GigabitEthernet3/0/2上使能MVRP。

[DeviceC-GigabitEthernet3/0/2] mvrp enable

[DeviceC-GigabitEthernet3/0/2] quit

# 將端口GigabitEthernet3/0/3配置為Trunk口,並允許VLAN30、VLAN 40通過。

[DeviceC] interface GigabitEthernet 3/0/3

[DeviceC-GigabitEthernet3/0/3] port link-type trunk

[DeviceC-GigabitEthernet3/0/3] port trunk permit vlan 30 40

# 在端口GigabitEthernet3/0/3上使能MVRP。

[DeviceC-GigabitEthernet3/0/3] mvrp enable

[DeviceC-GigabitEthernet3/0/3] return

(4)     配置Device D

# 進入MST域視圖。

<DeviceD> system-view

[DeviceD] stp region-configuration

# 配置MST域的域名、VLAN映射關係和修訂級別。

[DeviceD-mst-region] region-name example

[DeviceD-mst-region] instance 1 vlan 10

[DeviceD-mst-region] instance 2 vlan 20

[DeviceD-mst-region] revision-level 0

# 手工激活MST域的配置。

[DeviceD-mst-region] active region-configuration

[DeviceD-mst-region] quit

# 全局使能生成樹協議。

[DeviceD] stp enable

# 全局使能MVRP功能。

[DeviceD] mvrp global enable

# 將端口GigabitEthernet3/0/1配置為Trunk口,並允許VLAN 20,40通過。

[DeviceD] interface GigabitEthernet 3/0/1

[DeviceD-GigabitEthernet3/0/1] port link-type trunk

[DeviceD-GigabitEthernet3/0/1] port trunk permit vlan 20 40

# 在端口GigabitEthernet3/0/1上使能MVRP。

[DeviceD-GigabitEthernet3/0/1] mvrp enable

[DeviceD-GigabitEthernet3/0/1] quit

# 將端口GigabitEthernet3/0/2配置為Trunk口,並允許VLAN 40通過。

[DeviceD] interface GigabitEthernet 3/0/2

[DeviceD-GigabitEthernet3/0/2] port link-type trunk

[DeviceD-GigabitEthernet3/0/2] port trunk permit vlan 40

# 在端口GigabitEthernet3/0/2上使能MVRP。

[DeviceD-GigabitEthernet3/0/2] mvrp enable

[DeviceD-GigabitEthernet3/0/2] quit

# 將端口GigabitEthernet3/0/3配置為Trunk口,並允許所有30,40通過。

[DeviceD] interface GigabitEthernet 3/0/3

[DeviceD-GigabitEthernet3/0/3] port link-type trunk

[DeviceD-GigabitEthernet3/0/3] port trunk permit vlan 30 40

# 在端口GigabitEthernet3/0/3上使能MVRP。

[DeviceD-GigabitEthernet3/0/3] mvrp enable

[DeviceD-GigabitEthernet3/0/3] return

(5)      檢驗配置效果

通過使用display mvrp running-status命令可以查看MVRP本地VLAN的信息,驗證配置是否生效。

# 查看Device A上的本地VLAN信息。

<DeviceA> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/0/1] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default),

 

----[GigabitEthernet3/0/2] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default),

 

----[GigabitEthernet3/0/3] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default), 20,

由此可見,在端口GigabitEthernet3/0/1和端口GigabitEthernet3/0/2上通過MVRP學習到的VLAN信息隻有VLAN 1。在端口GigabitEthernet3/0/3上通過MVRP學習到的VLAN信息包括VLAN 1,以及在Device B上創建VLAN 20的動態VLAN信息。

# 查看Device B上的本地VLAN信息。

<DeviceB> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/0/1] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default),

 

----[GigabitEthernet3/0/2] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default),

 

----[GigabitEthernet3/0/3] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default), 10,

由此可見,在端口GigabitEthernet3/0/1和端口GigabitEthernet3/0/2上通過MVRP學習到的VLAN信息隻有VLAN 1。在端口GigabitEthernet3/0/3上通過MVRP學習到的VLAN信息包括VLAN 1,以及在Device A上創建VLAN 10的動態VLAN信息。

# 查看Device C上的本地VLAN信息。

<DeviceC> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/0/1] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default), 10,

 

----[GigabitEthernet3/0/2] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default), 20,

 

----[GigabitEthernet3/0/3] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default),

由此可見,在端口GigabitEthernet3/0/1上通過MVRP學習到的VLAN信息包括VLAN 1,以及在Device A上創建VLAN 10的動態VLAN信息。在端口GigabitEthernet3/0/2上通過MVRP學習到的VLAN信息包括VLAN 1,以及在Device B上創建VLAN 20的動態VLAN信息。在端口GigabitEthernet3/0/3上通過MVRP學習到的VLAN信息隻有VLAN 1。

# 查看Device D上的本地VLAN信息。

<DeviceD> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/0/1] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default), 20,

 

----[GigabitEthernet3/0/2] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default),

 

----[GigabitEthernet3/0/3] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default),

由此可見,在端口GigabitEthernet3/0/1上通過MVRP學習到的VLAN信息包括VLAN 1,以及在Device B上創建VLAN 20的動態VLAN信息。在端口GigabitEthernet3/0/2和端口GigabitEthernet3/0/3上通過MVRP學習到的VLAN信息隻有VLAN 1。

1.7.2  MVRP Fixed注冊模式配置舉例

1. 組網需求

·     Device A和Device B分別通過各自的端口GigabitEthernet3/0/1相連。

·     通過啟用MVRP功能,並配置MVRP的注冊模式為Fixed模式,來實現Device A和Device B之間動態VLAN的禁止注銷功能。

2. 組網圖

圖1-3 MVRP Fixed注冊模式配置組網圖

 

3. 配置步驟

(1)     配置Device A

# 全局使能MVRP功能。

<DeviceA> system-view

[DeviceA] mvrp global enable

# 將端口GigabitEthernet3/0/1配置為Trunk端口,並允許所有VLAN通過。

[DeviceA] interface GigabitEthernet 3/0/1

[DeviceA-GigabitEthernet3/0/1] port link-type trunk

[DeviceA-GigabitEthernet3/0/1] port trunk permit vlan all

# 在端口GigabitEthernet3/0/1上使能MVRP功能。

[DeviceA-GigabitEthernet3/0/1] mvrp enable

[DeviceA-GigabitEthernet3/0/1] quit

# 配置靜態VLAN 2。

[DeviceA] vlan 2

[DeviceA-vlan2] return

(2)     配置Device B

# 全局使能MVRP功能。

<DeviceB> system-view

[DeviceB] mvrp global enable

# 將端口GigabitEthernet3/0/1配置為Trunk端口,並允許所有VLAN通過。

[DeviceB] interface GigabitEthernet 3/0/1

[DeviceB-GigabitEthernet3/0/1] port link-type trunk

[DeviceB-GigabitEthernet3/0/1] port trunk permit vlan all

# 在端口GigabitEthernet3/0/1上使能MVRP功能。

[DeviceB-GigabitEthernet3/0/1] mvrp enable

[DeviceB-GigabitEthernet3/0/1] quit

# 配置靜態VLAN 3。

[DeviceB] vlan 3

[DeviceB-vlan3] return

(3)     檢驗配置效果

通過使用display mvrp running-status命令可以查看MVRP本地VLAN的信息,驗證配置是否生效。

# 查看Device A的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceA> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/0/1] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default), 3,

由此可見,通過MVRP學習到的VLAN信息包括VLAN 1,以及在Device B上創建VLAN 3的動態VLAN信息。

# 查看Device B的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceB> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/0/1] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default), 2,

由此可見,通過MVRP學習到的VLAN信息包括VLAN 1,以及在Device A上創建VLAN 2的動態VLAN信息。

(4)     Device B上配置端口Fixed模式

# 在端口GigabitEthernet3/0/1上配置Fixed模式。

<DeviceB> system-view

[DeviceB] interface GigabitEthernet 3/0/1

[DeviceB-GigabitEthernet3/0/1] mvrp registration fixed

[DeviceB-GigabitEthernet3/0/1] return

# 查看Device B的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceB> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/0/1] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default), 2,

由此可見,此時端口GigabitEthernet3/0/1上的VLAN信息與沒有配置Fixed模式時的VLAN信息相同。

(5)     Device A上刪除靜態VLAN 2

<DeviceA> system-view

[DeviceA] undo vlan 2

# 查看Device B的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceB> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/0/1] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default), 2,

由此可見, GigabitEthernet3/0/1端口配置Fixed模式後,端口學習的VLAN不會發生變化。

1.7.3  MVRP Forbidden注冊模式配置舉例

1. 組網需求

·     Device A和Device B分別通過各自的端口GigabitEthernet3/0/1相連。

·     通過啟用MVRP功能,並配置MVRP的注冊模式為Forbidden模式,來實現Device A和Device B之間動態VLAN的禁止注冊功能。

2. 組網圖

圖1-4 MVRP Forbidden注冊模式配置組網圖

 

 

3. 配置步驟

(1)     配置Device A

# 全局使能MVRP功能。

<DeviceA> system-view

[DeviceA] mvrp global enable

# 將端口GigabitEthernet3/0/1配置為Trunk端口,並允許所有VLAN通過。

[DeviceA] interface GigabitEthernet 3/0/1

[DeviceA-GigabitEthernet3/0/1] port link-type trunk

[DeviceA-GigabitEthernet3/0/1] port trunk permit vlan all

# 在端口GigabitEthernet3/0/1上使能MVRP功能。

[DeviceA-GigabitEthernet3/0/1] mvrp enable

[DeviceA-GigabitEthernet3/0/1] quit

# 配置靜態VLAN 2。

[DeviceA] vlan 2

[DeviceA-vlan2] return

(2)     配置Device B

# 全局使能MVRP功能。

<DeviceB> system-view

[DeviceB] mvrp global enable

# 將端口GigabitEthernet3/0/1配置為Trunk端口,並允許所有VLAN通過。

[DeviceB] interface GigabitEthernet 3/0/1

[DeviceB-GigabitEthernet3/0/1] port link-type trunk

[DeviceB-GigabitEthernet3/0/1] port trunk permit vlan all

# 在端口GigabitEthernet3/0/1上使能MVRP功能。

[DeviceB-GigabitEthernet3/0/1] mvrp enable

[DeviceB-GigabitEthernet3/0/1] quit

# 配置靜態VLAN 3。

[DeviceB] vlan 3

[DeviceB-vlan3] return

(3)     檢驗配置效果

通過使用display mvrp running-status命令可以查看MVRP本地VLAN的信息,驗證配置是否生效。

# 查看Device A的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceA> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/0/1] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default), 3,

由此可見,通過MVRP學習到的VLAN信息包括VLAN 1,以及在Device B上創建VLAN 3的動態VLAN信息。

# 查看Device B的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceB> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/0/1] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default), 2,

由此可見,通過MVRP學習到的VLAN信息包括VLAN 1,以及在Device A上創建VLAN 2的動態VLAN信息。

(4)     Device B上配置端口Forbidden模式

# 在端口GigabitEthernet3/0/1上配置Forbidden模式。

<DeviceB> system-view

[DeviceB] interface GigabitEthernet 3/0/1

[DeviceB-GigabitEthernet3/0/1] mvrp registration forbidden

[DeviceB-GigabitEthernet3/0/1] return

# 10秒後,查看Device B的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceB> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/0/1] ----

Config  Status                      : Enabled

Running Status                      : Enabled

Join Timer                          : 20 (centiseconds)

Leave Timer                         : 60 (centiseconds)

Periodic Timer                      : 100 (centiseconds)

LeaveAll Timer                      : 1000 (centiseconds)

Registration Type                   : Normal

Local VLANs :

  1(default),

由此可見,端口GigabitEthernet3/0/1通過MVRP學習到的VLAN信息不再包括在Device A上創建VLAN 2的動態VLAN信息,配置了Forbidden的端口保持了動態VLAN的注銷狀態。

不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!

BOB登陆
官網
聯係我們