MCAST

Manage multicast table

MCAST

Manage L2 multicast MAC entries with the older mcast interface: add and remove groups and their member ports. Sub-commands must be typed in full, except delete, which accepts any word that starts with del. mcast init also exists, although the help does not list it. Options default to MAC 01:00:00:00:00:01 and VLAN 1. A sub-command run with no options only prints the defaults.

There is no mcast show: it prints the usage text. List L2 multicast entries with l2 show and multicast groups with multicast show.

The bitmap forms are for fabric chips. On Trident 3 they print Mcast bitmap operations only valid on XGS fabric devices.

Every other form changes L2 multicast state. SONiC programs L2 multicast through newer interfaces, and changes made here can leave it inconsistent. mcast init resets the multicast module.

mcast add MACaddress=<mac> Vlanid=<vid> [Cos=<cos>] [PortBitMap=<pbmp>] [UntagBitMap=<pbmp>] [Index=<l2mc_index>]

Create a multicast entry, with the given L2 multicast index or with a free one. Changes switch state.

Unvalidated

drivshell> mcast add MACaddress=01:00:5e:01:02:03 Vlanid=100 PortBitMap=xe1,xe2
mcast delete MACaddress=<mac> Vlanid=<vid>

Remove a multicast entry. Changes switch state.

Unvalidated

drivshell> mcast delete MACaddress=01:00:5e:01:02:03 Vlanid=100
mcast join MACaddress=<mac> Vlanid=<vid> PortBitMap=<pbmp>

Add each port to the group, printing port <name> added or port <name> updated. Changes switch state.

Unvalidated

drivshell> mcast join MACaddress=01:00:5e:01:02:03 Vlanid=100 PortBitMap=xe3
mcast leave MACaddress=<mac> Vlanid=<vid> PortBitMap=<pbmp>

Remove each port from the group, printing not found, deleted or updated per port. Changes switch state.

Unvalidated

drivshell> mcast leave MACaddress=01:00:5e:01:02:03 Vlanid=100 PortBitMap=xe3
mcast padd MACaddress=<mac> Vlanid=<vid> PortBitMap=<pbmp> [UntagBitMap=<pbmp>]

Add several ports to an existing entry at once. The built-in help does not list UntagBitMap here, but the shell accepts it. Changes switch state.

Unvalidated

drivshell> mcast padd MACaddress=01:00:5e:01:02:03 Vlanid=100 PortBitMap=xe4
mcast premove MACaddress=<mac> Vlanid=<vid> PortBitMap=<pbmp>

Remove several ports from an entry at once. Changes switch state.

Unvalidated

drivshell> mcast premove MACaddress=01:00:5e:01:02:03 Vlanid=100 PortBitMap=xe4
mcast bitmap <max | set | del | get> [Port=<port>] [PortBitMap=<pbmp>] [Index=<n>]

For fabric chips only. Has no effect on Trident 3.

Unvalidated

drivshell> mcast bitmap max
mcast init

Re-initialise the multicast module. This may wipe multicast entries the SAI created.

Unvalidated

drivshell> mcast init

Built-in help

Usages:
    For Switch Devices:
      mcast add MACaddress=<val> Vlanid=<val> Cos=<val>
                PortBitMap=<val> UntagBitMap=<val> Index=<val>
      mcast delete MACaddress=<val> Vlanid=<val>
      mcast join MACaddress=<val> Vlanid=<val> PortBitMap=<val>
      mcast leave MACaddress=<val> Vlanid=<val> PortBitMap=<val>
      mcast padd MACaddress=<val> Vlanid=<val> PortBitMap=<val>
      mcast premove MACaddress=<val> Vlanid=<val> PortBitMap=<val>
    For Fabric Devices:
      mcast bitmap max
      mcast bitmap set Port=<val> PortBitMap=<val> Index=<val>
      mcast bitmap del Port=<val> PortBitMap=<val> Index=<val>
      mcast bitmap get Port=<val> Index=<val>

Further reading

BCM_SDK命令, 交换芯片Helix4 L2 L3功能验证.