LAN E
LAN 4 LAN 3
12.7 Overview of GARP protocol operation
12.7.5 Applicant behavior
Against the background of this simple Registrar let us consider the behavior of the Applicant that wishes to make a declaration, starting from a point where it has neither seen nor sent any messages.
If no messages were ever lost, the Applicant could either send a Join or receive a JoinIn, and then be content that all Registrars would have registered its declaration. On the single message loss assumption it needs to send two Joins, or receive two JoinIns, or send one Join and receive one JoinIn (in either order). This part of its state could be recorded in a simple counter:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
my_membership_msgs = 0,1, or 2
which is incremented for every Join sent or JoinIn received. If the counter value is 0 or 1 when there is an opportunity to transmit a PDU, a Join message will be sent and the counter incremented.
NOTES:
1—A counter value of greater than 2 is unnecessary for the purposes of successful registration.
2—A randomized join timer is set running to ensure such an opportunity is scheduled. There only needs to be one join timer running for the entire Participant, not one per attribute - assuming that messages related to the maximum number of attributes can be packed in a single PDU.
If a JoinEmpty, Empty, Leave, or LeaveAll message is received the counter is reset to 0.
When the Applicant leaves the Group it sends a single Leave message.
12.7.5.1 Anxious Applicants
Expressing protocol behavior in terms of counter and flag variables is not always the best approach if enabling thorough analysis and maximizing implementation flexibility are primary goals. From this point on, the values assigned to the join message count are given state name prefixes:
a) V or Very anxious equates to my_join_msgs = 0. No Join messages have been sent, and no JoinIns received since the Applicant started, or leave or empty messages received. The Applicant has no rea-son to be comfortable that other Registrars have registered the Attribute value concerned.
b) A or Anxious equates to my_join_msgs = 1. If no messages have been lost other Registrars will have registered this Attribute value.
c) Q or Quiet equates to my_join_msgs = 2. The Applicant feels no need to send further messages.
12.7.5.2 Members and Observers
The Applicant described so far needs have no existence unless it is trying to make a declaration. Bridge Ports and end stations which make active use of registered Attribute values (e.g., in the case of the GMRP applica-tion defined in Clause 10, Bridges and end stations that implement source pruning for transmission), need to maintain their GARP machines even if they do not want to make (or have just withdrawn) a declaration. (The term GARP machine refers to the total state maintained for a given Attribute value, both Applicant and Reg-istrar, in a Participant).
In the context of the Applicant state machine, a Member is a Participant that is attempting to make or main-tain a declaration for a given Attribute value, or who has not yet sent the Leave message to allow him to become simply an Observer. An Observer tracks the Attribute state but does not wish to make a declaration.
12.7.5.3 Active and Passive Members
The concept of Active and Passive Members is introduced to permit the minimum number of messages to be sent when a number of Participants are actively joining and leaving with respect to the same registration.
Since a Member may become Quiet without ever sending a Join it follows that it should be allowed to become an Observer once more without sending a Leave. All Observers are passive, so we have three poten-tial (sub)states, distinguished by the following state name suffixes:
a) A, or Active member.
b) P, or Passive member.
c) O, or Observer.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 If an Observer is required to become a Member it first becomes a Passive Member. If it was a Quiet Observer
(i.e., its count of join messages is already at two and it is therefore content that other Registrars have regis-tered the declaration), then it has no need to transmit a Join, and becomes Passive and Quiet. Otherwise, i.e., its count of join messages is less than two, it requests the earliest possible message transmission opportunity in order to transmit a Join.
If a Passive Member sends a Join message it becomes an Active Member.
If an Active Member receives a Leave or LeaveAll message it becomes a Passive Member.
12.7.5.4 Receiving a Leave
When an Applicant that is, and wishes to continue being, a Member receives a Leave Message, it becomes Very Anxious. Unless it receives a Join message from another Member it will send a JoinEmpty itself. This has the following effect on other Members. First, it will cause them to register that Attribute. Second, it will cause them to become Very Anxious themselves if they wish to continue to be Members, and to transmit Joi-nIns.
This latter effect protects any Participant that is a Member from accidentally de-registering other Members due to a single packet loss following a Leave.
An Applicant that is an Observer has to prompt other Members to re-join in case they have missed the Leave.
A further (sub) state is added to the Very Anxious, Anxious, Quiet set with state name prefix:
a) L or Leaving, which records the pending need to send a message at the next transmission opportu-nity. An Observer will send an Empty message, and then become Very Anxious.
12.7.5.5 Leaving
An Active Member has to send a Leave message in order to withdraw a declaration. The Leaving substate is used to record that fact.
12.7.5.6 Applicant State Summary
The following matrix summarizes the Applicant states and their short names - VA for Very anxious Active member, QO for Quiet Observer etc.
Note that there is no LP (Leaving Passive Member) state, since a Passive Member can transition directly to an Observer state when it wishes to withdraw a declaration.
Table 12-2—Applicant - summary of states
Very Anxious Anxious Quiet Leaving
Active Member VA AA QA LA
Passive Member VP AP QP
Observer VO AO QO LO
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54