Dynamic multicast ID management

In SR Linux, multicast IDs (MCIDs) are multicast groups used by systems in the data path. MCIDs are allocated by the SR Linux mcid_mgr application so that the XDP layer can program different multicast forwarding modes in network instances.

For example, the system allocates two MCIDs for each MAC-VRF network instance:

  • One MCID is used for the default multicast or flood list.
  • Another MCID is dedicated to EVPN-enabled services to allow multi-homing correct forwarding of BUM traffic. Traffic coming from VXLAN that needs to be flooded automatically picks up the secondary multicast group that includes local single-homed subinterfaces plus Designated Forwarder (DF) subinterfaces, as opposed to the default flood list.

The available MCIDs in SR Linux are divided among the following applications:

  • net_instance_mgr, which requests an MCID per default flood list (allocated per MAC-VRF when the MAC-VRF is configured)
  • evpn_mgr, which requests an MCID per MAC-VRF (for EVPN multi-homing, allocated when VXLAN is configured on the MAC-VRF)
  • l2_proxy_arp_nd_mgr, which requests an MCID per MAC-VRF when the proxy-ARP/ND flood options flood gratuitous-arp, unknown-arp-rq are set to false to suppress flooding over EVPN destinations.
  • Individual multicast modules, which request an MCID per MFIB entry created by IGMP/MLD/PIM/MVPN.

Request-response model for MCIDs

To accommodate the SR Linux features that require MCIDs, the system allocates MCIDs dynamically, using a request-response model. When an application needs a new MCID, it makes a request to the mcid_mgr application, which allocates the MCID and publishes a response with the allocated MCID to the requesting application. The mcid_mgr application also programs XDP with the MCID.

MCID exhaustion

The system has a finite number of MCIDs to allocate. If mcid_mgr runs out of MCIDs it can allocate, the following applications are brought down when a new object is configured:
  • mac-vrf
  • vxlan-interface
  • bgp-evpn mpls instance

When this occurs, the oper-down-reason for the application is displayed as no-mcid. When the oper-state for an application is changed to down, then brought back up, if there are no MCIDs available, the application is kept down with oper-down-reason no-mcid. For example, a change in evi automatically toggles the oper-state of an EVPN instance. If there are no MCIDs available following the evi change, the EVPN instance may not come back up.

Upon MCID exhaustion, mcid_mgr keeps trying to allocate MCIDs for the requesting multicast applications. If the system is rebooted, it may result in some VXLAN interfaces / MAC-VRFs that were not allocated MCIDs earlier receiving them at the expense of the multicast routes.

For l2_proxy_arp_nd_mgr, the application is brought down only if the flood options that require a new MCID are configured.

Displaying MCID information

You can use an info from state command to display information about MCID allocation and MCID usage per application.

The command displays the total number of MCIDs available in the system, the total number of MCIDs currently in use, and the total number of pending MCIDs that mcid_mgr has not yet allocated.

For each application that requires MCIDs (Layer 2 proxy ARP/ND, MAC VRFs, MAC VRF BGP-EVPN, and VXLAN interfaces) you can display the number of MCIDs in use by the application, as well the number of MCIDs requested but not yet allocated for use by the application.

The following command displays the current MCID usage:

--{ running }--[  ]--
# info from state system multicast multicast-ids statistics
    system {
        multicast {
            multicast-ids {
                statistics {
                    maximum-ids 16380
                    current-usage 3
                    total-pending 0
                    multicast-id-user-type mac-vrf {
                        current-usage 2
                        total-pending 0
                    }
                    multicast-id-user-type vxlan-interface {
                        current-usage 1
                        total-pending 0
                    }
                    multicast-id-user-type l2-proxy-arp-nd {
                        current-usage 0
                        total-pending 0
                    }
                    multicast-id-user-type mfib {
                        current-usage 0
                        total-pending 0
                    }
                    multicast-id-user-type mac-vrf-bgp-evpn {
                        current-usage 0
                        total-pending 0
                    }
                }
            }
        }
    }