Adjacent Virtual Local Area Network (VLAN)-aware devices can exchange VLAN information with each other with the use of the Generic VLAN Registration Protocol (GVRP). GVRP is based on the Generic Attribute Registration Protocol (GARP) and propagates VLAN information throughout a bridged network. When GVRP is activated, it transmits and receives GARP Packet Data Units (GPDUs). This allows you to configure a VLAN on one switch and then propagate its information across the network, instead of the previously required creation of the VLAN on each switch in the network.
This article provides instructions on how to configure GVRP settings on the switch through the Command Line Interface (CLI).
Step 1. Log in to the switch console. The default username and password is cisco/cisco. If you have configured a new username or password, enter the credentials instead.
Step 2. From the Privileged EXEC mode of the switch, enter the Global Configuration mode by entering the following:
Step 3. To enable the GVRP globally on the switch, enter the following:
Step 4. In the Global Configuration mode, enter the Interface Configuration context by entering the following:
- interface-id – Specifies an interface ID to be configured.
Step 5. Since GVRP requires support for tagging, the port must be configured in Trunk or General mode. To configure the VLAN membership mode of the interface, enter the following:
SG350X(config-if)#switchport mode [trunk | general]
The options are:
- trunk – Specifies a trunking layer 2 VLAN port.
- general – Specifies a full 802.1q-supported VLAN port.
Note: In this example, the interface is configured as Trunk port.
Step 6. To enable GVRP on the interface, enter the following:
Step 7. (Optional) To deregister all dynamic VLANs on a port and prevent VLAN creation or registration on the port, enter the following:
Note: In this example, registration of new VLANs on the interface is forbidden.
Step 8. (Optional) To disable dynamic VLAN creation or modification, enter the following:
Note: In this example, creation of new VLANs on the interface is forbidden.
Step 9. Enter the end command to go back to the Privileged EXEC mode:
Step 10. (Optional) To display the GVRP settings on the switch or a specific interface, enter the following:
SG350X#show gvrp configuration [interface-id | detailed]
Note: In this example, the GVRP settings for the ge1/0/3 interface are displayed.
Step 11. (Optional) In the Privileged EXEC mode of the switch, save the configured settings to the startup configuration file by entering the following:
SG350X#copy running-config startup-config
Step 12. (Optional) Press Y for Yes or N for No on your keyboard once the Overwrite file [startup-config]... prompt appears.
You should now have successfully configured the GVRP settings on your switch through the CLI.