When configuring VLANs on switches, you need to create all required VLANs on each switch and manually add ports to the corresponding VLANs. However, if you need to configure a large number of VLANs frequently then manual configuration becomes a time consuming and challenging process.
The Generic Attribute Registration Protocol (GARP) defined by IEEE effectively reduces the manual workload in VLAN configuration. GARP includes two proto- cols: GARP Multicast Registration Protocol (GMRP) and GARP VLAN Registration Protocol (GVRP).
Manually created VLANs are called static VLANs, and VLANs created by the GVRP are called dynamic VLANs. GVRP allows VLAN attribute transmission between switches to implement dynamic VLAN registration and deregistration on switches. After configuring GVRP, you only need to manually configure VLANs on a few switches, and then these switches deliver VLAN configurations to other switches.
5.8.1
Dynamic VLAN Registration Process
Figure5.17 illustrates the following information:• PC 1 and PC 2 are allocated to VLAN 10, which means VLAN 10 needs to be configured on all switches.
• GVRP has been enabled globally on S1, S2, S3, and S4 and on S1’s GE0/0/1, S2’s GE0/0/1 and GE0/0/2, S3’s GE0/0/1 and GE0/0/2, as well as S4’s GE0/0/1.
S1
GE0/0/1
Registration packet carrying VLAN attributes GE0/0/1 GE0/0/2 GE0/0/1 GE0/0/2 GE0/0/1 PC 1 PC 2
S2
S3
S4
Port dynamically registered to VLAN 10 VLAN 10 VLAN 10Fig. 5.17 One-way VLAN registration
• VLAN 10 has been manually created on S1, so S1’s GE0/0/1 allows the frames from VLAN 10 to pass through.
The following example demonstrates the VLAN registration process: 1. S1’s GE0/0/1 sends a registration packet carrying VLAN attributes.
2. After S2’s GE0/0/1 receives the registration packet from S1, S2 automatically creates VLAN 10 and registers its own GE0/0/1 to VLAN 10.
3. S2’s GE0/0/2 sends the registration packet out.
(Note: Only ports receiving the registration packet can be registered to VLAN 10; therefore S2’s GE0/0/2 cannot be registered to VLAN 10.)
4. After S3’s GE0/0/1 receives the registration packet from S2, S3 automatically creates VLAN 10 and registers its own GE0/0/1 to VLAN 10.
5. S3’s GE0/0/2 sends the registration packet out.
(Note: S3’s GE0/0/2 cannot be registered to VLAN 10.)
6. After S4’s GE0/0/1 receives the registration packet from S3, S4 automatically creates VLAN 10 and registers its own GE0/0/1 to VLAN 10.
During the preceding process, VLAN 10 was automatically created on S2, S3, and S4, and S2’s GE0/0/1, S3’s GE0/0/1, and S4’s GE0/0/1 were added to VLAN 10. This is called one-way VLAN registration. However, S2’s GE0/0/2 and S3’s GE0/0/2 were not added to VLAN 10. For this process, a reverse VLAN regis- tration process is required. (Note that static VLAN 10 information will overwrite dynamic VLAN 10 information on S4.)
Figure5.18 demonstrates the reverse VLAN registration process:
1. Manually create VLAN 10 on S4 and configure S4’s GE0/0/1 to allow frames from VLAN 10 to pass through.
2. S4’s GE0/0/1 sends a registration packet carrying VLAN attributes.
S1
GE0/0/1 GE0/0/1 GE0/0/2 GE0/0/1 GE0/0/2 GE0/0/1 PC 1 PC 2S2
S3
S4
VLAN 10 VLAN 10 Registration packet carrying VLAN attributes Port dynamically registered to VLAN 10Fig. 5.18 Reverse VLAN registration
3. After S3’s GE0/0/2 receives the registration packet from S4 it automatically registers its own GE0/0/2 to VLAN 10.
4. S3’s GE0/0/1 sends the registration packet out.
5. After S2’s GE0/0/2 receives the registration packet from S3 it automatically registers its own GE0/0/2 to VLAN 10.
6. S2’s GE0/0/1 sends the registration packet out.
S1’s GE0/0/1 also receives the registration packet from S2; however S1 and S1’s GE0/0/1 already have static VLAN 10 information, so do not need to dynamically register VLAN 10.
5.8.2
Dynamic VLAN Deregistration Process
When the number of VLANs on a network reduces, GVRP automatically deletes and deregisters VLANs.
Figure5.19 shows how PC 1 and PC 4 need to be excluded from VLAN 10. The VLAN deregistration process is as follows:
1. Manually delete VLAN 10 from S1.
2. S1’s GE0/0/1 sends a deregistration packet carrying VLAN attributes.
3. After S2’s GE0/0/1 receives the deregistration packet from S1, S2 automatically deregisters its own GE0/0/1 from VLAN 10.
4. S2’s GE0/0/2 sends the deregistration packet out.
(Note: Only ports receiving the deregistration packet can be deregistered from VLAN 10, meaning S2’s GE0/0/2 has not been deregistered as it still has the dynamic VLAN 10 information.)
S1
GE0/0/1 GE0/0/1 GE0/0/2 GE0/0/1 GE0/0/2 GE0/0/1 PC 1 PC 2S2
S3
S4
VLAN 10 VLAN 10 Deregistration packet carrying VLAN attributes Port dynamically deregistered from VLAN 10Fig. 5.19 One-way VLAN deregistration
5. After S3’s GE0/0/1 receives the deregistration packet from S2, S3 automatically deregisters its own GE0/0/1 from VLAN 10.
6. S3’s GE0/0/2 sends the deregistration packet out.
(Note: S3’s GE0/0/2 still has the dynamic VLAN 10 information.)
S4’s GE0/0/1 receives the deregistration packet from S3 but does not deregister VLAN 10 dynamically because the VLAN 10 on S4 was created manually.
In the preceding process, S2’s GE0/0/1 and S3’s GE0/0/1 were deregistered from VLAN 10. This process is called one-way VLAN deregistration. However, dynamic VLAN 10 information still exists on S2 and S3, as well as S2’s GE0/0/2 and S3’s GE0/0/2. A reverse VLAN deregistration process is required.
Figure5.20 demonstrates the reverse VLAN deregistration process: 1. Manually delete VLAN 10 from S4.
2. S4’s GE0/0/1 sends a deregistration packet carrying VLAN attributes.
3. After S3’s GE0/0/2 receives the deregistration packet from S4, S3 automatically deregisters its own GE0/0/2 from VLAN 10.
4. S3’s GE0/0/1 sends the deregistration packet out, and S3 automatically deletes VLAN 10.
5. After S2’s GE0/0/2 receives the deregistration packet from S3, S2 automatically deregisters its own GE0/0/2 from VLAN 10.
6. S2’s GE0/0/1 sends the deregistration packet out and S2 automatically deletes VLAN 10.
After S1’s GE0/0/1 receives the deregistration packet from S2, S1 does not deregister VLAN 10 dynamically because VLAN 10 does not exist on S1.
S1
GE0/0/1
GE0/0/1
GE0/0/2 GE0/0/1 GE0/0/2
GE0/0/1 PC 1 PC 2
S2
S3
S4
VLAN 10 VLAN 10 Deregistration packet carrying VLAN attributes Port dynamically deregistered from VLAN 10Fig. 5.20 Reverse VLAN deregistration