The principle and basic configuration of Huawei switch GVRP

Principle overview

GVRP (GARP VLAN Registration Protocol), the Chinese name is GARP VLAN Registration Protocol. It is an application of GARP General Attribute Registration Protocol. It is used to register and deregister VLAN attributes. GVRP enables switches to exchange VLAN configuration information with each other, dynamically creating and Management VLAN. Manually configured VLAN is called static VLAN , and VLAN created through GVRP protocol is called dynamic VLAN . GVRP has three registration modes, Normal mode, Fixed mode, and Forbidden mode.

GVRP registration mode

  1. Normal mode: Allow the interface to dynamically register, unregister VLAN, and propagate dynamic VLAN and static VLAN information;
  2. Fixed mode: Forbid the interface to dynamically register and deregister VLANs, and only propagate static VLAN information, that is, it is set to be a trunk interface in this mode. Even if all VLANs are allowed to pass, the actual VLAN that passes can only be the part that is manually configured.
  3. Forbidden mode: Forbid the interface to dynamically register and deregister VLANs, and do not transmit any VLAN information except VLAN1. That is, it is set as the Trunk interface in this mode. Even if all VLANs are allowed to pass, the actual VLAN that passes can only be VLAN1.

Experiment content

In the company's Layer 2 network, SW1 and SW4 are access layer switches, connecting aggregation switches SW2 and SW3. Employees in different departments of the company are connected to the network through access layer switches. The switches divide VLANs to isolate different departments. Considering that there are many departments, With the development of the company, the network situation may become more and more complicated. Therefore, the VLAN automatic registration function of GVRP is used to complete the VLAN configuration.
Take the R&D and the personnel department as examples. According to the conventional configuration, VLANs need to be created on all switches manually. If you add a department later, you need to add a VLAN or modify the Layer 2 network, you must modify the VLAN configuration accordingly. And error-prone, so you need to use GVRP to complete VLAN configuration.

GVRP basic configuration topology

Insert picture description here

Experiment addressing table

Start the device, first set the IP and mask of each PC, test the connectivity of each device through ping, and before dividing the VLAN, all PCs belong to VLAN1 and can communicate with each other.
Insert picture description here

SW1

<Huawei>undo terminal monitor 
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan all 
[SW1-GigabitEthernet0/0/1]quit
[SW1-vlan20]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1]interface Ethernet0/0/1
[SW1-Ethernet0/0/1]port link-type access 
[SW1-Ethernet0/0/1]port default vlan 10
[SW1-Ethernet0/0/1]interface ethernet0/0/2
[SW1-Ethernet0/0/2]port link-type access
[SW1-Ethernet0/0/2]port default vlan 20
[SW1-Ethernet0/0/2]quit
[SW1]gvrp
[SW1]interface gigabitethernet 0/0/1
[SW1-GigabitEthernet0/0/1]gvrp
[SW1-GigabitEthernet0/0/1]quit

SW2


<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW2
[SW2]interface g0/0/1
[SW2-GigabitEthernet0/0/1]port link-type trunk
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW2-GigabitEthernet0/0/1]quit
[SW2]interface gigabitethernet 0/0/2
[SW2-GigabitEthernet0/0/2]port link-type trunk
[SW2-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SW2-GigabitEthernet0/0/2]quit
[SW2]gvrp
[SW2]interface gigabitethernet 0/0/1
[SW2-GigabitEthernet0/0/1]gvrp
[SW2-GigabitEthernet0/0/1]quit
[SW2]interface gigabitethernet 0/0/2
[SW2-GigabitEthernet0/0/2]gvrp
[SW2-GigabitEthernet0/0/2]quit

SW3

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW3
[SW3]interface gigabitethernet 0/0/1
[SW3-GigabitEthernet0/0/1]port link-type trunk
[SW3-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW3-GigabitEthernet0/0/1]quit
[SW3]interface gigabitethernet0/0/2
[SW3-GigabitEthernet0/0/2]port link-type trunk
[SW3-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SW3-GigabitEthernet0/0/2]quit
[SW3]gvrp
[SW3]interface gigabitethernet0/0/1
[SW3-GigabitEthernet0/0/1]gvrp
[SW3-GigabitEthernet0/0/1]quit
[SW3]interface gigabitethernet 0/0/2
[SW3-GigabitEthernet0/0/2]gvrp

SW4

<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW4
[SW4]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW4]interface ethernet 0/0/1
[SW4-Ethernet0/0/1]port default vlan 10
[SW4-Ethernet0/0/1]quit
[SW4]interface ethernet 0/0/2
[SW4-Ethernet0/0/2]port link-type acces
[SW4-Ethernet0/0/2]port default vlan 20
[SW4-Ethernet0/0/2]quit
[SW4]interface gigabitethernet 0/0/1
[SW4-GigabitEthernet0/0/1]port link-type trunk
[SW4-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW4-GigabitEthernet0/0/1]quit
[SW4]gvrp 
[SW4]interface gigabitethernet 0/0/1
[SW4-GigabitEthernet0/0/1]gvrp
[SW4-GigabitEthernet0/0/1]

After the configuration is complete, use the display vlan command on SW2, SW3, and SW4 to view all VLAN related information. Both SW2 and SW3 have dynamically learned VLAN (dynamic) through GVRP.
Insert picture description here
Dynamic VLAN is registered in both directions. If you only configure VLAN manually on SW1 instead of manually configuring VLAN on SW4, you can directly enable GVRP on the interface. Although it can be learned, it will cause hosts in the same VLAN to fail to ping.
We have not done one-way GVRP configuration, so directly test the connectivity with the VLAN host. (Other hosts are omitted)
Insert picture description here

Configure the Fixed mode of GVRP

Change the GVRP registration mode of SW3 GE0/0/1 interface to Fixed mode

[SW3]interface gigabitethernet 0/0/3
[SW3-GigabitEthernet0/0/3]gvrp registration fixed
[SW3]display vlan

Before and after the configuration, through the comparison of the display vlan view, the GE0/0/3 interface of SW3 cannot dynamically learn the VLAN through GVRP after being configured with Fixed. The same is true for configuring the Forbidden mode.
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_39689711/article/details/106844341