avd icon indicating copy to clipboard operation
avd copied to clipboard

Feat(eos_designs): Add pim ipv4 sparse_mode on core_interfaces/l3_edge interfaces

Open CyrielRct opened this issue 1 year ago • 3 comments

Enhancement summary

I propose to extend underlay_multicast by enabling PIM IPv4 sparse mode support to include uplink interfaces. This enhancement will enable more flexible and scalable multicast routing topologies

When underlay_multicast: true enable pim ipv4 sparse_mode on uplinks. Right now only mlag interface get this config

Which component of AVD is impacted

eos_designs

Use case example

In a multicast routing domain using PIM Sparse Mode, we have to enable pim ipv4 sparse_mode on P2P links.

Right now eos_designs doesn't cover this usecase on core_interfaces.p2p_links

It would be convenient to add it automatically on both side of the p2p_links when underlay_multicast is enabled.

Describe the solution you would like

When underlay_multicast: true add pim ipv4 sparse_mode on core_interfaces and l3_edge interface.

Describe alternatives you have considered

Using structured_config defined in the defaults can help to enable it, but it have to be done on both side.

    structured_config:
      ethernet_interfaces:
        - name: Ethernet3
          pim:
            ipv4:
              sparse_mode: true

uplink_structure_config can also help. But it's not automated as it could be done by eos_designs

Additional context

No response

Contributing Guide

  • [X] I agree to follow this project's Code of Conduct

CyrielRct avatar Feb 11 '24 01:02 CyrielRct

I agree that this will be useful, for for AVD4.x I don't think we can implement this by default, since it would be changing the existing behavior for l3_edge / core_interfaces.

For now I think the solution would be to create a separate underlay_multicast: <bool; default=False> knob under l3_edge/core_interfaces models to control pim on the interface. In AVD5.0 we can then make this inherit the global underlay_multicast instead of default=False.

ClausHolbechArista avatar Feb 12 '24 10:02 ClausHolbechArista

Hi Claus

I tried to add this in the core_interfaces_and_l3_edge/utils.py :

under the condition "if p2p_link.get("include_in_underlay_protocol", True) is True:" (line 231)

            if self.shared_utils.underlay_multicast:
                interface_cfg["pim"] = {"ipv4": {"sparse_mode": True}}

And it worked for me. Could it be as simple a that or do you see something else to cover ?

CyrielRct avatar Feb 13 '24 12:02 CyrielRct

It will be almost as simple as you have it, except we would have to add the extra key under the p2p_links model for underlay_multicast as described above. Otherwise some existing deployments would get this extra config, which they may not want. (What we call a breaking change since we are changing configs for the same inputs).

ClausHolbechArista avatar Feb 13 '24 13:02 ClausHolbechArista