Configuration Guide
MVRP Configuration Guide
18 min
introduction introduction the multiple registration protocol (mrp) serves as a carrier for attribute registration protocols, enabling the propagation of attribute information the multiple vlan registration protocol (mvrp) is an application of mrp, used to disseminate and learn vlan configuration information among devices through mvrp, devices within a lan can automatically synchronize vlan information, significantly reducing the vlan configuration workload for network administrators implementation mechanism implementation mechanism each port participating in the mrp protocol on a device is considered an application entity once an mrp application (such as mvrp) is enabled on a port, that port becomes an mrp application entity for that specific application the mvrp protocol facilitates the automatic registration and deregistration of vlan attributes vlan registration a port joins a vlan vlan deregistration a port leaves a vlan mvrp achieves the registration and deregistration of vlan attributes by exchanging declaration and withdrawal messages when a port receives a vlan attribute declaration, it registers the vlan information contained within that declaration (the port joins the vlan) when a port receives a vlan attribute withdrawal, it deregisters the vlan information contained within that withdrawal (the port leaves the vlan) it is important to note that the registration and deregistration of attributes by the mvrp protocol only applies to the port that receives the mvrp protocol messages mrp message introduction mrp message introduction mrp messages primarily include join, new, leave, and leaveall these messages interact to facilitate the registration and deregistration of attributes join and new messages are classified as declarations leave and leaveall messages are classified as withdrawals join messages join messages when an mrp application entity is configured with certain attributes and requires its peer entity to register those attributes, it sends a join message to the peer upon receiving a join message from a peer entity, an mrp entity performs the following actions it registers the attribute contained in the join message it propagates this join message to other mrp entities within the same device upon receiving the propagated join message, these other entities subsequently send join messages to their respective peers join messages exchanged between mrp entities are further categorized into joinempty and joinin (note this distinction is not made for join messages propagated between entities on the same device) the differences between the two are as follows joinempty used to declare an attribute that is not yet registered on the mrp entity for example an mrp entity joins a static vlan (a vlan created manually is called a static vlan, while a vlan learned and created via mrp messages is called a dynamic vlan) if the entity has not yet registered this vlan via an mrp message, it will send a joinempty message to its peer to declare this vlan joinin used to declare an attribute that is already registered on the mrp entity for example an mrp entity joins a static vlan and has already registered this vlan via an mrp message alternatively, the entity has received a propagated join message for a vlan from another entity within the same device and has registered that vlan in these cases, the entity will send a joinin message to its peer to declare this vlan new messages new messages the function of a new message is similar to that of a join message, as both are used for attribute declaration the key difference is that the new message is primarily used in response to topology changes in the multiple spanning tree protocol (mstp) when an mstp topology change occurs, the mrp application entity sends a new message to its peer entity to declare this topology change when an mrp entity receives a new message from a peer entity, it registers the attribute contained in the new message and it propagates this new message to other mrp entities within the same device upon receiving the propagated new message, these other entities subsequently send the new message to their respective peers leave messages leave messages when an mrp application entity deregisters certain attributes and requires its peer entity to perform a synchronized deregistration, it sends a leave message to the peer upon receiving a leave message from a peer entity, an mrp entity performs the following actions it deregisters the attribute contained in the leave message it propagates this leave message to other mrp entities within the same device upon receiving the propagated leave message, these other entities decide whether to send the leave message to their respective peers, based on the state of the attribute within the local device for example if the attribute in the leave message is a vlan if the vlan is a dynamic vlan and is no longer registered by any entity on the device, the vlan is deleted from the device, and the leave message is sent to the peer entity if the vlan is a static vlan, the leave message is not sent to the peer entity leaveall messages leaveall messages each mrp application entity starts its own leaveall timer upon initialization when this timer expires, the entity sends a leaveall message to its peer entity the leaveall message mechanism works as follows when an mrp entity either sends or receives a leaveall message, it starts its leave timer based on its own attribute state, the entity decides whether it needs to send join messages to request that its peer re register specific attributes before the leave timer expires, the entity re registers any attributes received in join messages from its peer after the leave timer expires, the entity deregisters all attributes that were not re registered this process periodically purges stale attributes from the network mrp timers introduction mrp timers introduction mrp defines four types of timers to control the transmission of various mrp messages periodic timer periodic timer each mrp application entity starts its own periodic timer upon initialization to govern the periodic transmission of mrp messages before this timer expires, the entity collects all mrp messages that need to be sent upon timeout, it bundles these pending messages into the fewest possible packets for transmission, thereby reducing the total number of packets sent the entity then restarts the periodic timer to begin a new cycle join timer join timer the join timer controls the transmission of join messages to ensure reliable delivery to the peer entity, an mrp entity starts the join timer whenever it sends a join message if, before this timer expires, the entity receives a joinin message from its peer, and the attribute in that joinin message matches the attribute in the sent join message, it does not retransmit the join message otherwise, when this timer expires, the entity will retransmit the join message once upon the next timeout of its periodic timer leave timer leave timer the leave timer controls the deregistration of attributes an mrp entity starts its leave timer when it receives a leave message from a peer entity, or when it sends or receives a leaveall message attributes will not be deregistered by this entity if, before this timer expires, it receives a join message from its peer where the attribute matches the one in the original leave message (or matches one of the attributes affected by the leaveall message) all other affected attributes will be deregistered after this timer expires leaveall timer leaveall timer each mrp application entity starts its own leaveall timer upon initialization when this timer expires, the entity sends a leaveall message to its peer entity and then immediately restarts its own leaveall timer, beginning a new cycle a peer entity, upon receiving a leaveall message, also restarts its own leaveall timer mvrp configuration mvrp configuration enabling mvrp enabling mvrp enable mvrp globally operation command description enable mvrp function globally mvrp enable enable mvrp on the required interfaces operation command description enter the interface configuration view interface ethernet interface id port enables mvrp function mvrp enable mvrp timer configuration mvrp timer configuration the intervals for the mvrp timers can be configured as needed operation command description enter the interface configuration view interface ethernet interface id configure timer time mvrp {jointimer|leavealltimer |leavetimer |periodictimer} \<time value> time value 10 32760 milliseconds configuration example configuration example network requirements in a layer 2 network setup, mvrp can be used to create vlans dynamically, thereby significantly reducing configuration time procedure the mvrp configuration is identical on all duts dut1 is used as the example here enable mvrp on all participating ports sonic(config)# mvrp enable sonic(config)# interface ethernet 13 sonic(config if 13)# mvrp enable sonic(config)# interface ethernet 4 sonic(config if 4)# mvrp enable add the ports connecting dut1 and dut3 to the server into vlan 100 sonic(config)# vlan 100 sonic(config)# interface ethernet 13 sonic(config if 13)# switchport trunk vlan 100 verify configuration all interfaces on the dut interconnects are dynamically added to vlan 100 thus, packets tagged with vlan 100 are forwarded normally
