Glossary

MVRP

Multiple VLAN Registration Protocol

What is MVRP

MVRP (Multiple VLAN Registration Protocol) is a Layer 2 protocol that lets devices in a LAN automatically distribute and learn VLAN configuration information. It is an application of MRP (Multiple Registration Protocol), which acts as a carrier for attribute registration and propagation between devices.

In a traditional Layer 2 network, every VLAN must be created by hand on every device along the path. As the network grows, this becomes slow and error-prone, and a single missing VLAN on one trunk link can break connectivity. With MVRP, a VLAN only needs to be configured on the devices where it is actually used. The rest of the network learns about it dynamically, which significantly reduces the VLAN configuration workload for network administrators.

How MVRP Works

Each port that participates in MRP is treated as an Application Entity. Once MVRP is enabled on a port, that port becomes an MRP application entity for MVRP. MVRP then handles two operations automatically:

  • VLAN registration: A port joins a VLAN.

  • VLAN deregistration: A port leaves a VLAN.

Both are achieved by exchanging declaration and withdrawal messages. When a port receives a VLAN declaration, it registers the VLAN contained in it. When it receives a VLAN withdrawal, it deregisters that VLAN. Registration and deregistration only apply to the port that receives the MVRP message.

MVRP distinguishes between two kinds of VLANs on a device. A VLAN created manually is a static VLAN. A VLAN learned and created through MRP messages is a dynamic VLAN.

MRP messages

MRP defines four message types. Join and New are declarations; Leave and LeaveAll are withdrawals.

  • Join: Sent when an entity has an attribute (such as a VLAN) and wants its peer to register it. The receiving entity registers the attribute and propagates the message to other MRP entities on the same device, which in turn send Join messages to their own peers. Between peers, Join is split into JoinEmpty, which declares an attribute not yet registered on the sender, and JoinIn, which declares an attribute the sender has already registered.

  • New: Works like Join, but is used mainly in response to Multiple Spanning Tree Protocol (MSTP) topology changes. When the topology changes, the entity sends a New message to declare the change to its peer.

  • Leave: Sent when an entity deregisters an attribute and wants its peer to do the same. Other entities on the device decide whether to forward it based on local state. For example, if the VLAN is dynamic and no longer registered by any entity on the device, the VLAN is deleted and the Leave message is sent on. If the VLAN is static, the Leave message is not sent.

  • LeaveAll: Sent periodically when an entity's LeaveAll timer expires. It prompts peers to re-declare the attributes they still need, and any attribute that is not re-registered before the Leave timer expires is deregistered. This periodically purges stale VLAN information from the network.

MRP timers

Four timers control when MRP messages are sent and when attributes are removed:

  • Periodic timer: Governs periodic transmission. Pending messages are collected and bundled into as few packets as possible when the timer expires, reducing the total number of packets sent.

  • Join timer: Ensures reliable delivery of Join messages. If a matching JoinIn arrives from the peer before it expires, the Join is not retransmitted; otherwise it is retransmitted once at the next Periodic timer timeout.

  • Leave timer: Controls deregistration. It starts when a Leave or LeaveAll message is sent or received. Attributes that receive a matching Join before it expires are kept; all other affected attributes are deregistered when it expires.

  • LeaveAll timer: Triggers the periodic LeaveAll message and restarts immediately after it expires. A peer that receives LeaveAll also restarts its own LeaveAll timer.

Why MVRP is Beneficial

MVRP brings automation to Layer 2 VLAN management:

  • Less configuration work: VLANs are created dynamically on intermediate devices, so administrators configure VLANs only where they are needed.

  • Fewer configuration errors: Automatic registration avoids mismatched VLAN settings across trunk links, a common cause of connectivity problems in Layer 2 networks.

  • Faster deployment and changes: Adding a new VLAN no longer requires logging in to every device on the path.

  • Self-cleaning VLAN state: Withdrawal messages and the periodic LeaveAll mechanism remove VLANs that are no longer in use, keeping the network free of stale entries.

  • Efficient signaling: Message bundling through the Periodic timer keeps protocol overhead low.

At Asteraix

What We Can Do at Asteraix

AsterNOS supports MVRP on its routing and gateway platforms, so administrators can build Layer 2 networks that learn VLANs dynamically instead of configuring each one by hand:

  • Global enable: MVRP is turned on system-wide with mvrp enable.

  • Per-interface enable: MVRP is enabled on each participating Ethernet interface with mvrp enable in interface configuration view.

  • Tunable timers: The Join, Leave, LeaveAll, and Periodic timers can each be set per interface with the mvrp command, with values from 10 to 32760 milliseconds.

  • Typical deployment: In a Layer 2 network with several devices (DUTs), MVRP is enabled globally and on all interconnecting ports of every device. VLAN 100 is then created only on the server-facing ports of DUT1 and DUT3. The interconnecting ports between the devices are added to VLAN 100 dynamically, so VLAN 100 traffic is forwarded end to end without configuring the VLAN on each intermediate device.

sonic(config)# mvrp enable
sonic(config)# interface ethernet 13
sonic(config-if-13)# mvrp enable
sonic(config)# vlan 100
sonic(config)# interface ethernet 13
sonic(config-if-13)# switchport trunk vlan 100