啟用GVRP一定要在交換機(jī)之間的trunk鏈路
靜態(tài)VLAN:手工配置的VLAN
動(dòng)態(tài)VLAN:通過(guò)GVRP協(xié)議創(chuàng)建的VLAN。
GVRP協(xié)議的3種注冊(cè)模式
1.Normal模式:活躍分子。允許該端口動(dòng)態(tài)注冊(cè),注銷vlan.傳播動(dòng)態(tài)vlan和靜態(tài)VLAN信息。
2.Fixed模式:大款 禁止該端口動(dòng)態(tài)注冊(cè)和注銷vlan,只傳播靜態(tài)vlan信息,不傳播
動(dòng)態(tài)vlan信息。例如被設(shè)置為Fixed模式的Trunk端口,即使允許所有VLAN通過(guò),實(shí)際
通過(guò)的VLAN只能是手動(dòng)創(chuàng)建的那部分。
3.Forbidden模式:禁止該端口動(dòng)態(tài)注冊(cè),注銷VLAN,不傳播除機(jī)器本身VLAN1以外的
任何VLAN信息。例如被配置為Forbidden模式的trunk端口,即使允許所有的
VLAN通過(guò),實(shí)際通過(guò)的VLAN也只能是VLAN1.
//啟用GVRP的端口必須都是trunk模式
[sw1]interface GigabitEthernet 0/0/1
[sw1-GigabitEthernet0/0/1]port link-type trunk
[sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
//先全局啟動(dòng)GVRP ,再在局部端口啟動(dòng)GVRP
[sw1]gvrp //注冊(cè)GVRP
[sw1-GigabitEthernet0/0/1]gvrp registration normal //進(jìn)入端口,注冊(cè)gvrp的normal模式
[sw1]vlan batch 10 20 //批量創(chuàng)建VLAN 10 20
[sw1]display vlan summary //查看VLAN信息匯總
static vlan:
Total 3 static vlan.
? 1 10 20
<sw2>display gvrp statistics? //查看GVRP學(xué)習(xí)狀態(tài)
? GVRP statistics on port GigabitEthernet0/0/1
? ? GVRP status? ? ? ? ? ? ? ? ? ? ? ? : Enabled
? ? GVRP registrations failed? ? ? ? ? : 0
? ? GVRP last PDU origin? ? ? ? ? ? ? ? : 4c1f-ccee-7380
? ? GVRP registration type? ? ? ? ? ? ? : Normal
? GVRP statistics on port GigabitEthernet0/0/2
? ? GVRP status? ? ? ? ? ? ? ? ? ? ? ? : Enabled
? ? GVRP registrations failed? ? ? ? ? : 0
? ? GVRP last PDU origin? ? ? ? ? ? ? ? : 4c1f-cc0b-76eb
? ? GVRP registration type? ? ? ? ? ? ? : Fixed
dynamic vlan:
Total 4 dynamic vlan.
? 30 40 50 60