The Transparent Interconnect of Lots of Links Protocol (Trill) uses an appointed forwarder (AF) mechanism, which is used to appoint a routing bridge (RB) for forwarding packets of a specific virtual local area network (VLAN), so as to prevent local links from forming a loop, because the loop has a very great impact on a network and may cause the network to crash. In the AF mechanism, there is also a VLAN inhibition timer mechanism, which is used to strictly prevent a loop from being formed in a special case or in a case of network status transition.
The following describes the AF mechanism and the VLAN inhibition timer mechanism using RB1, RB2, and RB3 on a same link as an example. RB1, RB2, and RB3 are connected through a common switch (bridge). That is, RB1, RB2, and RB3 are connected on the same link, and it is assumed that VLAN 10 is enabled on their ports on this link. RB1 serves as a designated routing bridge (DRB), which is responsible for appointing an AF on the link. RB1 may appoint RB2 as an AF of VLAN 10, and RB1 itself responsible for AF work of another VLAN. In this case, RB2 is responsible for forwarding packets of VLAN 10, and periodically sends a Hello packet to a neighboring RB, indicating that RB2 is the AF of VLAN 10. After receiving the Hello packet, the neighbor of RB2 resets its own inhibition timer for VLAN 10, where the resetting refers to setting the inhibition timer to a default value again. The value of the inhibition timer keeps decrementing with time until it reaches zero. An RB that changes from a non-AF to the AF can start to forward a packet of VLAN 10 only when the inhibition timer for VLAN 10 decrements to 0; otherwise, the RB keeps a state of being inhibited from forwarding packets of VLAN 10. Periodically receiving a Hello packet from an AF of a VLAN prevents from decrementing of an inhibition timer for that VLAN to 0. Even if an RB is appointed as the AF of a VLAN, the RB cannot forward traffic of the VLAN if the inhibition timer for the VLAN does not expire. Therefore, if RB1 and RB3 receive a packet of VLAN 10, because neither RB1 nor RB3 is the AF of VLAN 10, they discard the packet, so as to prevent generation of a loop on the link. After running for a period of time, RB1 sends a Hello packet to appoint RB3 as the AF of VLAN 10, and no longer appoints RB2 as the AF of VLAN 10. After RB3 receives the Hello packet for appointing RB3 as the AF of VLAN 10, if an inhibition timer of RB3 for VLAN 10 does not expire, that is, the inhibition timer for VLAN 10 does not decrement to zero, RB3 still cannot forward a packet of VLAN 10. After receiving the Hello packet that is sent by the DRB and contains AF appointment information, RB2 discovers that RB2 itself is not the AF of VLAN 10. Therefore, RB2 immediately stops forwarding a packet of VLAN 10, and sets, in a Hello packet of VLAN 10 to be sent subsequently, an AF state bit of RB2 for VLAN 10 to zero. In this way, in Hello packets received by RB3 from the neighbors RB1 and RB2, the AF state bits for VLAN 10 are both zero. Because an inhibition timer of a VLAN is reset only when a Hello packet containing an AF state bit being 1 for the VLAN is received, the inhibition timer on RB3 is not reset any longer in this case but keeps decrementing until it reaches zero. When the inhibition timer for VLAN 10 on RB3 decrements to zero, RB3 already appointed as the AF of VLAN 10 starts to forward a packet of VLAN 10. Generally, an inhibition timer is set to be three times as long as a Hello interval, and may be up to 30 seconds.
However, according to the foregoing method, after RB3 receives the Hello packet for being appointed as the AF of VLAN 10, even if RB2 has given up a state of being the AF of VLAN 10 and no longer forwards a packet of VLAN 10, RB3 has to wait for the inhibition timer of VLAN 10 to expire (that is, to decrement to zero) before RB3 can forward a packet of VLAN 10. Therefore, an interruption time of the packet forwarding is relatively long.