##实验 1-3 GVRP 配置
##實驗 1-3 GVRP 配置
學(xué)習(xí)目標
? 掌握GVRP的配置方法
? 掌握GVRP不同注冊模式的配置方法
場景
企業(yè)網(wǎng)絡(luò)中往往會使用大量的交換機且需要在網(wǎng)絡(luò)中劃分不同的VLAN,若網(wǎng)絡(luò)管理員采用手工配置VLAN的創(chuàng)建和刪除,工作量極大而且容易出錯。這種情況下,可以通過GVRP的VLAN動態(tài)注冊功能來自動完成VLAN的配置。
操作步驟
步驟一. 實驗環(huán)境準備
如果本任務(wù)中您使用的是空配置設(shè)備,需要從步驟1開始,并跳過步驟2。
如果使用的設(shè)備包含上一個實驗的配置,請直接從步驟2開始。
system-view
[Quidway]sysname S1
[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/9]shutdown
[S1-GigabitEthernet0/0/9]quit
[S1]interface GigabitEthernet 0/0/10
[S1-GigabitEthernet0/0/10]shutdown
system-view
[Quidway]sysname S2
[S2]interface GigabitEthernet 0/0/9
[S2-GigabitEthernet0/0/9]shutdown
[S2-GigabitEthernet0/0/9]quit
[S2]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]shutdown
system-view
[Quidway]sysname S3
[S3]interface Ethernet 0/0/7
[S3-Ethernet0/0/7]shutdown
system-view
[Quidway]sysname S4
[S4]interface Ethernet 0/0/14
[S4-Ethernet0/0/14]shutdown
步驟二. 清除設(shè)備上原有的配置
在S1和S2上,刪除無關(guān)VLAN并關(guān)閉Eth-Trunk端口。刪除S3和S4上的
VLANIF 1接口,并打開S3上的E0/0/1端口。
[S1]undo vlan batch 2 to 4
[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]shutdown
[S2]undo vlan batch 2 to 4
[S2]interface Eth-Trunk 1
[S2-Eth-Trunk1]shutdown
[S2-Eth-Trunk1]quit
[S2]interface GigabitEthernet 0/0/6
[S2-GigabitEthernet0/0/6]undo port hybrid vlan 2 4
[S3]interface Ethernet 0/0/1
[S3-Ethernet0/0/1]undo shutdown
[S3-Ethernet0/0/1]quit
[S3]undo interface Vlanif 1
[S4]undo interface Vlanif 1
步驟三. 在交換機之間配置 Trunk 鏈路
[S1]interface GigabitEthernet 0/0/13
[S1-Gigabitethernet0/0/13]port link-type trunk
[S1-Gigabitethernet0/0/13]port trunk allow-pass vlan all
[S3]interface Ethernet 0/0/13
[S3-Ethernet0/0/13]port link-type trunk
[S3-Ethernet0/0/13]port trunk allow-pass vlan all
[S3-Ethernet0/0/13]quit
[S3]interface Ethernet 0/0/1
[S3-Ethernet0/0/1]port link-type trunk
[S3-Ethernet0/0/1]port trunk allow-pass vlan all
[S2]interface GigabitEthernet 0/0/6
[S2-Gigabitethernet0/0/6]port link-type trunk
[S2-Gigabitethernet0/0/6]port trunk allow-pass vlan all
[S4]interface Ethernet 0/0/6
[S4-Ethernet0/0/6]port link-type trunk
[S4-Ethernet0/0/6]port trunk allow-pass vlan all
[S4-Ethernet0/0/6]quit
[S4]interface Ethernet 0/0/1
[S4-Ethernet0/0/1]port link-type trunk
[S4-Ethernet0/0/1]port trunk allow-pass vlan all
步驟四. 開啟 GVRP 功能
首先在全局模式下開啟GVRP功能,然后在相應(yīng)接口下開啟GVRP功能。
[S1]vcmp role silent
[S1]gvrp
[S1]interface GigabitEthernet 0/0/13
[S1-GigabitEthernet0/0/13]gvrp
[S3]gvrp
[S3]interface Ethernet 0/0/13
[S3-Ethernet0/0/13]gvrp
[S3-Ethernet0/0/13]quit
[S3]interface Ethernet 0/0/1
[S3-Ethernet0/0/1]gvrp
[S2]vcmp role silent
[S2]gvrp
[S2]interface GigabitEthernet 0/0/6
[S2-Gigabitethernet0/0/6]gvrp
[S4]gvrp
[S4]interface Ethernet0/0/6
[S4-Ethernet0/0/6]gvrp
[S4-Ethernet0/0/6]quit
[S4]interface Ethernet 0/0/1
[S4-Ethernet0/0/1]gvrp
在S1上創(chuàng)建VLAN 2和VLAN 100,S2上創(chuàng)建VLAN 2和VLAN 200,在S3
和S4上創(chuàng)建VLAN 2。
[S1]vlan batch 2 100
[S2]vlan batch 2 200
[S3]vlan 2
[S4]vlan 2
在S3和S4上執(zhí)行display gvrp statistics命令,查看接口的GVRP統(tǒng)計信息。
[S3]display gvrp statistics
可以看到,交換機接口上GVRP的注冊模式默認為Normal。執(zhí)行display
vlan命令,查看S3和S4上的VLAN的學(xué)習(xí)情況。
有上述灰色標注部分可以看出,S3和S4能夠動態(tài)學(xué)習(xí)到VLAN 100和VLAN
200,但是僅有一側(cè)端口加入到動態(tài)學(xué)習(xí)的VLAN中,此時數(shù)據(jù)幀僅能單向通信。
還需要分別在S1上創(chuàng)建VLAN 200,S2上創(chuàng)建VLAN 100,使得交換機兩側(cè)端口
都加入到動態(tài)學(xué)習(xí)的VLAN中,這樣報文才能夠雙向通信。
[S1]vlan 200
[S2]vlan 100
配置完成后執(zhí)行display vlan命令,查看VLAN中的接口信息。
[S3]display vlan
回顯信息中灰色陰影標注的部分表明S3和S4上兩側(cè)的端口均已加入VLAN
100和VLAN 200。
步驟五. 修改交換機接口的注冊模式
將S3的E0/0/1端口和S4的E0/0/1的G注冊模式修改為Fixed。
[S3]interface Ethernet 0/0/1
[S3-Ethernet0/0/1]gvrp registration fixed
[S4]interface Ethernet 0/0/1
[S4-Ethernet0/0/1]gvrp registration fixed
在S3和S4上執(zhí)行display gvrp statistics命令,查看接口GVRP統(tǒng)計信息和
注冊模式。
[S3]display gvrp statistics interface Ethernet 0/0/1
可以觀察到E0/0/1端口的注冊模式已修改為Fixed。該端口將無法注冊動態(tài)
VLAN。
執(zhí)行display vlan命令,驗證Fixed注冊模式的配置結(jié)果。
[S3]display vlan
回顯信息中灰色陰影標注的部分表明端口E0/0/1無法注冊動態(tài)VLAN 100
和200。
將S3的E0/0/1、S4的E0/0/1接口的GVRP注冊模式配置為Forbidden。
執(zhí)行display gvrp statistics命令,查看接口GVRP統(tǒng)計信息和注冊模式。
[S3]display gvrp statistics interface Ethernet 0/0/1
可以觀察到E0/0/1接口的注冊模式已修改為Forbidden。
執(zhí)行display vlan命令,驗證Forbidden注冊模式的配置結(jié)果。
[S3]display vlan
在Forbidden模式下,E0/0/1接口只允許VLAN 1的報文通過,禁止任何其
他VLAN的報文通過。
配置文件
[S1]display current-configuration
!Software Version V200R008C00SPC500
sysname S1
vcmp role silent
vlan batch 2 100 200
gvrp
interface Eth-Trunk1
shutdown
port link-type trunk
port trunk allow-pass vlan 2 to 4094
mode lacp
interface GigabitEthernet0/0/1
port hybrid untagged vlan 2 4
interface GigabitEthernet0/0/9
shutdown
eth-trunk 1
lacp priority 100
undo negotiation auto
speed 100
interface GigabitEthernet0/0/10
shutdown
eth-trunk 1
lacp priority 100
undo negotiation auto
speed 100
interface GigabitEthernet0/0/13
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
return
[S2]display current-configuration
!Software Version V200R008C00SPC500
sysname S2
vcmp role silent
vlan batch 2 100 200
gvrp
interface Eth-Trunk1
shutdown
port link-type trunk
port trunk allow-pass vlan 2 to 4094
mode lacp
interface GigabitEthernet0/0/3
port hybrid untagged vlan 2 4
interface GigabitEthernet0/0/6
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
interface GigabitEthernet0/0/9
shutdown
eth-trunk 1
undo negotiation auto
speed 100
interface GigabitEthernet0/0/10
shutdown
eth-trunk 1
undo negotiation auto
speed 100
return
[S3]display current-configuration
sysname S3
vlan batch 2
gvrp
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
gvrp registration forbidden
interface Ethernet0/0/13
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
interface Ethernet0/0/7
shutdown
return
[S4]display current-configuration
!Software Version V100R006C05
sysname S4
vlan batch 2
gvrp
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
gvrp registration forbidden
interface Ethernet0/0/6
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
interface Ethernet0/0/14
shutdown
return
總結(jié)
以上是生活随笔為你收集整理的##实验 1-3 GVRP 配置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 图说当下——人生感悟
- 下一篇: HillTop (LocalScore)