< Home

Working Mechanism

This section describes the working procedure of GVRP by using an example. This example illustrates how a VLAN attribute is registered and deregistered on a network in four phases.

One-Way Registration

Figure 1 One-way registration of a VLAN attribute

Static VLAN 2 is created on SwitchA. Ports on SwitchB and SwitchC can join VLAN 2 automatically through one-way registration. The process is as follows:
  1. After VLAN 2 is created on SwitchA, Port 1 of SwitchA starts the Join timer and Hold timer. When the Hold timer expires, Port 1 sends the first JoinEmpty message to SwitchB. When the Join timer expires, Port 1 restarts the Hold timer. When the Hold timer expires again, Port 1 sends the second JoinEmpty message.

  2. After Port 2 of SwitchB receives the first JoinEmpty message, SwitchB creates dynamic VLAN 2 and adds Port 2 to VLAN 2. In addition, SwitchB requests Port 3 to start the Join timer and Hold timer. When the Hold timer expires, Port 3 sends the first JoinEmpty message to SwitchC. When the Join timer expires, Port 3 restarts the Hold timer. When the Hold timer expires again, Port 3 sends the second JoinEmpty message. After Port 2 receives the second JoinEmpty message, SwitchB does not take any action because Port 2 has been added to VLAN 2.

  3. After Port 4 of SwitchC receives the first JoinEmpty message, SwitchC creates dynamic VLAN 2 and adds Port 4 to VLAN 2. After Port 4 receives the second JoinEmpty message, SwitchC does not take any action because Port 4 has been added to VLAN 2.

  4. Every time the LeaveAll timer expires or a LeaveAll message is received, each switch restarts the LeaveAll, Join, Hold, and Leave timers. Port 1 then repeats step 1 and sends JoinEmpty messages. In the same way, Port 3 of SwitchB sends JoinEmpty messages to SwitchC.

Two-Way Registration

Figure 2 Two-way registration of a VLAN attribute

After one-way registration is complete, Port 1, Port 2, and Port 4 are added to VLAN 2 but Port 3 is not added to VLAN 2 because only interfaces receiving a JoinEmpty or JoinIn message can be added to dynamic VLANs. To transmit traffic of VLAN 2 in both directions, VLAN registration from SwitchC to SwitchA is required. The process is as follows:
  1. After one-way registration is complete, static VLAN 2 is created on SwitchC (the dynamic VLAN is replaced by the static VLAN). Port 4 of SwitchC starts the Join timer and Hold timer. When the Hold timer expires, Port 4 sends the first JoinIn message (because it has registered VLAN 2) to SwitchB. When the Join timer expires, Port 4 restarts the Hold timer. When the Hold timer expires, Port 4 sends the second JoinIn message.

  2. After Port 3 of SwitchB receives the first JoinIn message, SwitchB adds Port 3 to VLAN 2 and requests Port 2 to start the Join timer and Hold timer. When the Hold timer expires, Port 2 sends the first JoinIn message to SwitchA. When the Join timer expires, Port 2 restarts the Hold timer. When the Hold timer expires again, Port 2 sends the second JoinIn message. After Port 3 receives the second JoinIn message, SwitchB does not take any action because Port 3 has been added to VLAN 2.

  3. When SwitchA receives the JoinIn message, it stops sending JoinEmpty messages to SwitchB. Every time the LeaveAll timer expires or a LeaveAll message is received, each switch restarts the LeaveAll timer, Join timer, Hold timer, and Leave timer. Port 1 of SwitchA sends a JoinIn message to SwitchB when the Hold timer expires.

  4. SwitchB sends a JoinIn message to SwitchC.

  5. After receiving the JoinIn message, SwitchC does not create dynamic VLAN 2 because static VLAN 2 has been created.

One-Way Deregistration

Figure 3 One-way deregistration of a VLAN attribute

When VLAN 2 is not required on the switches, the switches can deregister VLAN 2. The process is as follows:
  1. After static VLAN 2 is manually deleted from SwitchA, Port 1 of SwitchA starts the Hold timer. When the Hold timer expires, Port 1 sends a LeaveEmpty message to SwitchB. Port 1 needs to send only one LeaveEmpty message.

  2. After Port 2 of SwitchB receives the LeaveEmpty message, it starts the Leave timer. When the Leave timer expires, Port 2 deregisters VLAN 2. Then Port 2 is deleted from VLAN 2, but VLAN 2 is not deleted from SwitchB because Port 3 is still in VLAN 2. At this time, SwitchB requests Port 3 to start the Hold timer and Leave timer. When the Hold timer expires, Port 3 sends a LeaveIn message to SwitchC. Static VLAN 2 is not deleted from SwitchC; therefore, Port 3 can receive the JoinIn message sent from Port 4 after the Leave timer expires. In this case, SwitchA and SwitchB can still learn dynamic VLAN 2.

  3. After SwitchC receives the LeaveIn message, Port 4 is not deleted from VLAN 2 because VLAN 2 is a static VLAN on SwitchC.

Two-Way Deregistration

Figure 4 Two-way deregistration of a VLAN attribute

To delete VLAN 2 from all the switches, two-way deregistration is required. The process is as follows:
  1. After static VLAN 2 is manually deleted from SwitchC, Port 4 of SwitchC starts the Hold timer. When the Hold timer expires, Port 4 sends a LeaveEmpty message to SwitchB.

  2. After Port 3 of SwitchB receives the LeaveEmpty message, it starts the Leave timer. When the Leave timer expires, Port 3 deregisters VLAN 2. Then Port 3 is deleted from dynamic VLAN 2, and dynamic VLAN 2 is deleted from SwitchB. At this time, SwitchB requests Port 2 to start the Hold timer. When the Hold timer expires, Port 2 sends a LeaveEmpty message to SwitchA.

  3. After Port 1 of SwitchA receives the LeaveEmpty message, it starts the Leave timer. When the Leave timer expires, Port 1 deregisters VLAN 2. Then Port 1 is deleted from dynamic VLAN 2, and dynamic VLAN 2 is deleted from SwitchA.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic