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.
Note: To learn how to access an SMB switch CLI through SSH or Telnet, click here.
Note: The commands may vary depending on the exact model of your switch. In this example, the SG350X-48MP switch is accessed through Telnet.
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:
SG350X(config)#gvrp enableStep 4. In the Global Configuration mode, enter the Interface Configuration context by entering the following:
SG350X(config)#interface [interface-id]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:
Note: In this example, the interface is configured as Trunk port.
Step 6. To enable GVRP on the interface, enter the following:
SG350X(config-if)#gvrp enableStep 7. (Optional) To deregister all dynamic VLANs on a port and prevent VLAN creation or registration on the port, enter the following:
SG350X(config-if)#gvrp registration-forbidNote: 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:
SG350X(config-if)#gvrp vlan-creation-forbidNote: 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:
SG350X(config)#endStep 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-configStep 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.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
13-Dec-2018 |
Initial Release |