GARP learning Summary

Source: Internet
Author: User

GARP learning summary GARP (Generic Attribute Registration Protocol) general Attribute Registration Protocol, which is defined in 802.1D to register attributes between participants. GARP is a common protocol framework and does not specify the attributes to be registered. We can use the GARP protocol to register a specific protocol, that is, GARP instantiation. 802.1D defines an instance. GMRP (Generic Muliticast Registration Protocol) is used to register multicast attributes and create a multicast tree in the 802 LAN. 802.1Q defines another instance, GVRP (Generic Vlan registry Protocol), which is used to register vlan attributes and add ports to a vlan, that is, adding vlan port members through the Protocol.

GARP protocol architecture


GARP participants are the subject of GARP communication and processing. They are Port-based, and each Port of the end station and bridge has a participant, participants include two logical units: Application Unit (Applicant) and GID (GARP Information Declaration, GARP Information declarative unit ). Multiple participants (ports) of a vswitch connect to and communicate with each other through GIP (GARP Information Propagation, GARP Information transmission unit). The endpoint device has only one port, so there is no GIP.
The Application Unit processes GARP application-related functions, including:
1) attribute types and attribute values, as well as their syntax and specific encoding.
GMRP defines two types of attributes: Group MAC Address and Group Service Requirement. The Group MAC Address attribute value is the 48bit multicast Address.
2) multicast address for participant Communication
The target mac address for GMRP participant communication is 01-80-C2-00-00-20.
The target mac address for GVRP participant communication is 01-80-C2-00-00-21.
3) GARP state machine requirements

The Application Unit processes application information and attributes. The GARP protocol processing and communication functions mainly include GID, GID maintains a working state machine for registration and declaration of each attribute value. The state machine status and input event determine the GARP registration and declaration behavior, as follows:
1) Applicant State Transition Table
2) Registrar State Transition Table
3) Applicant and Registrar state machines
4) service primitive)
Declaration primitive:
GID_Join.request (attribute_type, attribute_value)
GID_Leave.request (attribute_type, attribute_value)
Applicant state machine determines the next State and action based on the current state, action, Next Hop State, and Applicant state Transition Table event
GID receives the Declaration primitives of GIP and application units, and generates attribute declaration data frames to be sent from the port.

Registration primitive:
GID_Join.indication (attribute_type, attribute_value)
GID_Leave.indication (attribute_type, attribute_value)
Registrar state machine determines the next State and action based on the current state, action, Next Hop State, and Registrar state Transition Table event: registration and cancellation (de-registration)
GID sends the registration primitive to The GIP and application unit. The application unit registers or deregister the attributes. The GID at the other end of the GIP connection sends the registration or cancellation information from the port, so that the registration information will be transmitted in the network.

GIP
GIP sends the registration primitive to GIP, and GIP generates the Declaration primitive to the GID at the other end. Under the specified GIP context, if the port status is forwarding and the registration information is used, the GARP registration data frame is sent to the port. If the registration information is deregistered, in addition, if the port used to send the registration primitive is the only port that registers the property value, GARP is sent to log out of garp pdu. If other ports have registered the property value, this parameter is not sent. For example, if both Port 1 and Port 2 are added to a multicast group, that is, Port 1 and Port 2 have data devices that receive the multicast group, when Port 1 is canceled, other ports do not send deregister data frames.
GIP context
Currently, there are two GIP context types: base spanning tree (the forwarding tree and port status established by STP or RSTP) and multiple spanning tree (the forwarding tree and port status established by MSTP)


Attribute propagation in the Network


It is the propagation process of GARP attribute information. Both the switch and the endpoint device can generate the attribute declaration garp pdu. Generally, the endpoint device initiates the attribute declaration, if an endpoint device is added to a multicast group or a vlan. The application unit of the GARP participant of the endpoint device sends the Declaration primitive to the GID. the GID generates the attribute declaration garp pdu. The services provided by the MAC layer send the garp pdu from the port. After the switch port receives the garp pdu, the MAC checks that the dmac of the garp pdu is GARP group address, the garp pdu is handed over to the GID of the port for processing, and the GID generates the registration primitive to the application unit of the port, the application unit registers the current receiving port to the attribute registry key (only the port receiving GARP is registered in the Attribute Table, the rest only transmits the property to other switches and Endpoint devices). GID generates a registration primitive to GIP at the same time. This registration primitive is converted into a declaration primitive by GIP and passed to the GID of other ports, under the specified GIP context, if the port status is forwarding, GID requests the MAC service and sends the declared garp pdu from the port. If it is in another status (for example, the status of the RSTP port is block or disable), it is not sent. Other switches and Endpoint devices perform the same registration and propagation after receiving the transmitted GARP Declaration frame until the GARP attribute information is transmitted to all switches and Endpoint devices in the network.



It is the data transmission path when another device sends data to the device with the registration property. The path is the same as the registration path, but the data flow is in the opposite direction. If a device sends data to a multicast group, it is received by the endpoint device registered to the multicast group.
Garp pdu Data Structure
Garp pdu link layer uses LLC encapsulation defined in 802.2
LLC encapsulation:
1) The target mac address of the PDU is shown in the following table (Two mac addresses are defined, and other mac addresses are reserved in the table ):
Devices that support GARP receive frames whose destination MAC address is the address in the following table. Devices that do not support GARP broadcast to all other ports.
 
2) SMAC is the mac address of the sending port.
3) the source and target LLC addresses are the same as the stp llc addresses, which are 0x42
The mac layer distinguishes garp pdu and BPDU Based on the destination mac and Protocol ID (Protocol Identifier. Protocol ID = 1 for GARP PDU
Garp pdu:
GARP data structure defined in BNF form
Garp pdu ::= Protocol ID, Message {, Message}, End Mark
Protocol id short: = 1
Message: = Attribute Type, Attribute List
Attribute Type BYTE: = Defined by the specific GARP Application
Attribute List: = Attribute {, Attribute}, End Mark
Attribute: = Ordinary Attribute | LeaveAll Attribute
Ordinary Attribute: = Attribute Length, Attribute Event, Attribute Value
LeaveAll Attribute: = Attribute Length, LeaveAll Event
Attribute Length BYTE: = 2-255
Attribute Event BYTE: = JoinEmpty | JoinIn | LeaveEmpty | LeaveIn | Empty
LeaveAll Event BYTE: = LeaveAll
Attribute Value: = Defined by the specific GARP Application
End Mark: = 0x00 | End of PDU
LeaveAll: = 0
JoinEmpty: = 1
JoinIn: = 2
LeaveEmpty: = 3
LeaveIn: = 4
Empty: = 5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.