IPMC

Manage IPMC (IP Multicast) addresses

IPMC

Manage the IP multicast (IPMC) routing table. Most forms are ipmc <table> <action>. <table> is table (IPv4), ip6table, egr or counter, and <action> is add, del, clear, show or set. init, detach and config stand on their own. All words must be typed in full.

The show forms only read. add, del, clear, egr set and config change multicast routing that SONiC manages, and SONiC is not told.

Warning

ipmc detach and ipmc init tear down or reset IP multicast under SONiC. syncd may fail on its next multicast change.

SONiC’s generate_dump collects ipmc table show (scripts/generate_dump (show techsupport collector)).

ipmc table show [<entry>]

Print a header and every IPv4 multicast route. The built-in help says a single entry can be shown; the shell actually prints only the header when given an entry number. The header is two lines: SRC IP ADDRESS  MC IP ADDRESS     VLAN MOD PORT V COS TS   GROUP     VRF and GROUP-L2  CLASS HIT L3_IIF ING_L3_IIF. Read-only. SONiC does not program IP multicast routes by default, so on a SONiC switch only the header is printed.

Hardware-validated — No multicast routes yet

drivshell> ipmc table show
SRC IP ADDRESS  MC IP ADDRESS     VLAN MOD PORT V COS TS   GROUP     VRF
GROUP-L2  CLASS HIT L3_IIF ING_L3_IIF
ipmc table add Src_IP=<ipaddr> Mc_IP=<grpaddr> VlanID=<vid> Group=<group> [GroupL2=<group>] [src_Port=<port>] [COS=<cos>] [TS=<tgid>] [Valid=<bool>] [NoCHECK=<bool>] [Replace=<bool>] [VRF=<vrf>] [LookupClass=<class>]

Add an IPv4 multicast route. Src_IP=0.0.0.0 means any source. Group is an L3 multicast group from multicast create. Changes switch state.

Unvalidated

drivshell> ipmc table add Src_IP=0.0.0.0 Mc_IP=239.1.1.1 VlanID=100 Group=0x2000001
ipmc table del Src_IP=<ipaddr> Mc_IP=<grpaddr> VlanID=<vid> [VRF=<vrf>]

Delete one IPv4 multicast route. The built-in help shows Mc_IP=<macaddr>; the shell actually expects the group IP address. It also accepts VRF, which the help does not list for del. Changes switch state.

Unvalidated

drivshell> ipmc table del Src_IP=0.0.0.0 Mc_IP=239.1.1.1 VlanID=100
ipmc table clear

Delete every IP multicast route, including all of SONiC’s.

Unvalidated

drivshell> ipmc table clear
ipmc ip6table show [<entry>]

Like ipmc table show, for IPv6. Given an entry number, it prints ipmc: bcm_ipmc_get_by_index is deprecated … and then lists all entries anyway. ip6table add, del and clear work like the IPv4 forms, with IPv6 addresses. show is read-only. With no IPv6 multicast routes it prints nothing at all, not even a header.

Hardware-validated

drivshell> ipmc ip6table show
ipmc egr show [<port>]

Print each port’s egress multicast settings under the header Port      Mac Address    Vlan Untag TTL_THRESH. ipmc egr set Port=<port> MAC=<mac> Vlan=<vid> Untag=<bool> Ttl_thresh=<n> changes them. These are settings of older chips: on Trident 3 show prints the title and the column header but no port rows, and does not report an error. show is read-only.

Hardware-validated

drivshell> ipmc egr show xe1
Egress IP Multicast Configuration Register information
Port      Mac Address    Vlan Untag TTL_THRESH
ipmc counter show [<port>]

Print per-port multicast counters (RMCA, TMCA, IMBP, IMRP, RIMDR, TIMDR), one row per port. Trident 3 supports them. The PORT column is the logical port number, not the port name (on a 32x100G switch 1, 5, 9 … for ce0, ce1 …). On a running SONiC switch, ports that see multicast traffic such as LLDP or IPv6 neighbour discovery show non-zero RMCA (received) and TMCA (transmitted) counts. Read-only.

Hardware-validated

drivshell> ipmc counter show
PORT      RMCA     TMCA     IMBP     IMRP    RIMDR    TIMDR
   1         0        0        0        0        0        0
   5         0        0        0        0        0        0
   9    218744   218395        0        0        0        0
  10    218745   218387        0        0        0        0
  11    218744   218383        0        0        0        0
  12      7065     7080        0        0     7046        0
  13         0        0        0        0        0        0
  17         0        0        0        0        0        0
  21         0        0        0        0        0        0
  25         0        0        0        0        0        0
  29         0        0        0        0        0        0
  33         0        0        0        0        0        0
  37         0        0        0        0        0        0
  41         0        0        0        0        0        0
  45         0        0        0        0        0        0
  49         0        0        0        0        0        0
  53         0        0        0        0        0        0
  57         0        0        0        0        0        0
  61         0        0        0        0        0        0
  66         0        0        0        0        0        0
  67         0        0        0        0        0        0
  71         0        0        0        0        0        0
  75         0        0        0        0        0        0
  79         0        0        0        0        0        0
  83         0        0        0        0        0        0
  87         0        0        0        0        0        0
  91         0        0        0        0        0        0
  95         0        0        0        0        0        0
  99         0        0        0        0        0        0
 103         0        0        0        0        0        0
 107         0        0        0        0        0        0
 111         0        0        0        0        0        0
 115      6945     6938        0        0        0        0
 119      7065     7068        0        0        0        0
 123         0        0        0        0        0        0
 127         0        0        0        0        0        0
ipmc config [Enable=<bool>] [CheckSrcPort=<bool>] [CheckSrcIp=<bool>]

Enable turns IP multicast routing on or off for the whole switch. CheckSrcPort and CheckSrcIp always fail with check_source_port failed or check_source_ip failed: these settings no longer exist. With no option the command does nothing. Enable=false stops multicast routing under SONiC.

Unvalidated

drivshell> ipmc config Enable=true
ipmc init

Initialise IP multicast. Errors are printed, but the command still reports success. ipmc detach shuts IP multicast down. See the warning above.

Unvalidated

drivshell> ipmc init

Built-in help

Usages:
      ipmc init    - Init ipmc function.
      ipmc detach  - Detach ipmc function.
      ipmc config [Enable=<bool>] [CheckSrcPort=<bool>] [CheckSrcIp=<bool>]
      ipmc table add Src_IP=<ipaddr> Mc_IP=<grpaddr> VlanID=<vid>
             Group=<val> [GroupL2=<val>] [src_Port=<port>] [COS=<cosl>]
             [TS=<tsl>] [Valid=<bool>] [NoCHECK=<bool>]
             [Replace=<bool>] [VRF=<vrf>] [LookupClass=<val>]
                  - Add an entry into ipmc table
      ipmc table del Src_IP=<ipaddr> Mc_IP=<macaddr> VlanID=<vid>
                  - Destroy an entry in ipmc table
      ipmc table clear
                  - Delete all ipmc table
      ipmc table show [entry]
                  - Display all ipmc table or a single one
      ipmc egr set Port=<port> Mac=<macaddr> Vlan=<vid>
                        Untag=<untag> Ttl_thresh=<ttl threshold>
                  - set egress IP Multicast configuration regs for a port
      ipmc egr show [<port>]
                  - Display egress IP Multicast configuration regs for
                    all ports or a single port
      ipmc counter show [<port>]
                  - Display IP Multicast counter information
      ipmc ip6table add Src_IP=<ipaddr> Mc_IP=<grpaddr> VlanID=<vid>
             Group=<val> [src_Port=<port>] [COS=<cosl>]
             [NoCHECK=<bool>] [TS=<tsl>]
             [Valid=<bool>] [LookupClass=<val>] [VRF=<vrf>]
                  - Add an entry into ipmc table
      ipmc ip6table del Src_IP=<ipaddr> Mc_IP=<macaddr> VlanID=<vid> [VRF=<vrf>]
                  - Destroy an entry in ipmc table
      ipmc ip6table clear
                  - Delete all ipmc table
      ipmc ip6table show [entry]
                  - Display all ipmc table or a single one

Further reading

SDK-6.5.20 HSDK Getting Started Guide (GS-SDK6520-R), plus SDK-6.5.20/21/22 Release Notes (RN-SDK65xx-R), scripts/generate_dump (show techsupport collector).