Global IGMP Configurations

This section contains payload examples and CLIs to demonstrate how to use the NX-API REST API to configure IGMP globally on Cisco Nexus 3000 and 9000 Series switches and to show how the REST APIs correspond to the CLI commands.

For more information about configuring IGMP, see the Cisco Nexus 9000 Series NX-OS Multicast Routing Configuration Guide.

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-installation-and-configuration-guides-list.html/

Allowing Any Destination-IP for General Queries

Allowing Any Destination-IP for General Queries
POST http://<mgmt0_IP>/api/mo/sys/igmp.json
{
  "igmpEntity": {
    "children": [
      {
        "igmpInst": {
          "attributes": {
            "anyQueryDest": "yes"
}}}]}}
{
    imdata:[]
}
<System>
  <igmp-items>
    <inst-items>
      <anyQueryDest>true</anyQueryDest>
    </inst-items>
  </igmp-items>
</System>

Note: This example was added in Release Cisco NX-OS Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

ip igmp any-query-destination

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the Allowance of Any Destination-IP for General Queries

Deleting the Allowance of Any Destination-IP for General Queries
POST http://<mgmt0_IP>/api/mo/sys/igmp.json
{
  "igmpEntity": {
    "children": [
      {
        "igmpInst": {
          "attributes": {
            "anyQueryDest": "no"
}}}]}}
{
    imdata:[]
}
<System>
  <igmp-items>
    <inst-items>
      <anyQueryDest>false</anyQueryDest>
    </inst-items>
  </igmp-items>
</System>

Note: This example was added in Release Cisco NX-OS Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no ip igmp any-query-destination

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Enforcing Router Alert Option Check for IGMPv2 and IGMPv3 Packets

Enforcing Router Alert Option Check for IGMPv2 and IGMPv3 Packets
POST http://<mgmt0_IP>/api/mo/sys/igmp.json
{
  "igmpEntity": {
    "children": [
      {
        "igmpInst": {
          "attributes": {
            "rtrAlert": "yes"
}}}]}}
{
    imdata:[]
}
<System>
  <igmp-items>
    <inst-items>
      <rtrAlert>true</rtrAlert>
    </inst-items>
  </igmp-items>
</System>

Note: This example was added in Release Cisco NX-OS Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

ip igmp enforce-router-alert

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Removing the Enforcement of a Router Alert Option Check for IGMPv2 and IGMPv3 Packets

Removing the Enforcement of a Router Alert Option Check for IGMPv2 and IGMPv3 Packets
POST http://<mgmt0_IP>/api/mo/sys/igmp.json
{
  "igmpEntity": {
    "children": [
      {
        "igmpInst": {
          "attributes": {
            "rtrAlert": "no"
}}}]}}
{
    imdata:[]
}
<System>
  <igmp-items>
    <inst-items>
      <rtrAlert>false</rtrAlert>
    </inst-items>
  </igmp-items>
</System>

Note: This example was added in Release Cisco NX-OS Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no ip igmp enforce-router-alert

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Removing Routes When Restarting IGMP

Removing Routes When Restarting IGMP
POST http://<mgmt0_IP>/api/mo/sys/igmp.json
{
  "igmpEntity": {
    "children": [
      {
        "igmpInst": {
          "attributes": {
            "flushRoute": "yes"
}}}]}}
{
    imdata:[]
}
<System>
  <igmp-items>
    <inst-items>
      <flushRoute>true</flushRoute>
    </inst-items>
  </igmp-items>
</System>

Note: This example was added in Release Cisco NX-OS Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

ip igmp flush-routes

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Permitting Routes When Restarting IGMP

Permitting Routes When Restarting IGMP
POST http://<mgmt0_IP>/api/mo/sys/igmp.json
{
  "igmpEntity": {
    "children": [
      {
        "igmpInst": {
          "attributes": {
            "flushRoute": "no"
}}}]}}
{
    imdata:[]
}
<System>
  <igmp-items>
    <inst-items>
      <flushRoute>false</flushRoute>
    </inst-items>
  </igmp-items>
</System>

Note: This example was added in Release Cisco NX-OS Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no ip igmp flush-routes

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Enabling High Availability for IGMP

Enabling High Availability for IGMP
POST http://<mgmt0_IP>/api/mo/sys/igmp.json
{
  "igmpEntity": {
    "children": [
      {
        "igmpInst": {
          "attributes": {
            "ctrl": "stateful-ha"
}}}]}}
{
    imdata:[]
}
<System>
  <igmp-items>
    <inst-items>
      <ctrl>stateful-ha</ctrl>
    </inst-items>
  </igmp-items>
</System>

Note: This example was added in Release Cisco NX-OS Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

ip igmp ha-stateful

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Disabling High Availability for IGMP

Disabling High Availability for IGMP
POST http://<mgmt0_IP>/api/mo/sys/igmp.json
{
  "igmpEntity": {
    "children": [
      {
        "igmpInst": {
          "attributes": {
            "ctrl": ""
}}}]}}
{
    imdata:[]
}
<System>
  <igmp-items>
    <inst-items>
      <ctrl></ctrl>
    </inst-items>
  </igmp-items>
</System>

Note: This example was added in Release Cisco NX-OS Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no ip igmp ha-stateful

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Translating IGMPv1/v2 Reports to (S,G) Route Entries

Translating IGMPv1/v2 Reports to (S,G) Route Entries
POST http://<mgmt0_IP>/api/mo/sys/igmp/inst.json
{
  "igmpInst": {
    "children": [
      {
        "igmpDom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "igmpSSMXlate": {
                "attributes": {
                  "grpPfx": "232.0.0.0/8",
                  "srcAddr": "10.1.1.1/32"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <igmp-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <ssmxlate-items>
            <SSMXlate-list>
              <srcAddr>10.1.1.1/32</srcAddr>
              <grpPfx>232.0.0.0/8</grpPfx>
            </SSMXlate-list>
          </ssmxlate-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </igmp-items>
</System>

Note: This example was added in Release Cisco NX-OS Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

ip igmp ssm-translate 232.0.0.0/8 10.1.1.1

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Disabling the Translation of IGMPv1/v2 Reports to (S,G) Route Entries

Disabling the Translation of IGMPv1/v2 Reports to (S,G) Route Entries
POST http://<mgmt0_IP>/api/mo/sys/igmp/inst.json
{
  "igmpInst": {
    "children": [
      {
        "igmpDom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "igmpSSMXlate": {
                "attributes": {
                  "grpPfx": "232.0.0.0/8",
                  "srcAddr": "10.1.1.1/32",
                  "status": "deleted"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <igmp-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <ssmxlate-items>
            <SSMXlate-list xc:operation="delete">
              <srcAddr>10.1.1.1/32</srcAddr>
              <grpPfx>232.0.0.0/8</grpPfx>
            </SSMXlate-list>
          </ssmxlate-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </igmp-items>
</System>

Note: This example was added in Release Cisco NX-OS Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no ip igmp ssm-translate 232.0.0.0/8 10.1.1.1

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring MAC-Based Multicast Lookup Mode

Configuring MAC-Based Multicast Lookup Mode
POST http://<mgmt0_IP>/api/mo/sys/igmpsnoop/inst/dom/gl.json
{
  "igmpsnoopGl": {
    "children": [
      {
        "igmpsnoopIgmpsnBase": {
          "attributes": {
            "lookupMac": "yes"
}}}]}}
{
    imdata:[]
}
<System>
  <igmpsnoop-items>
    <inst-items>
      <dom-items>
        <gl-items>
          <igmpsnbase-items>
            <lookupMac>true</lookupMac>
          </igmpsnbase-items>
        </gl-items>
      </dom-items>
    </inst-items>
  </igmpsnoop-items>
</System>

Note: This example was added in Release 9.2(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

layer-2 multicast lookup mac

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting MAC-Based Multicast Lookup Mode

Deleting MAC-Based Multicast Lookup Mode
POST http://<mgmt0_IP>/api/mo/sys/igmpsnoop/inst/dom/gl.json
{
  "igmpsnoopGl": {
    "children": [
      {
        "igmpsnoopIgmpsnBase": {
          "attributes": {
            "lookupMac": "no"
}}}]}}
{
    imdata:[]
}
<System>
  <igmpsnoop-items>
    <inst-items>
      <dom-items>
        <gl-items>
          <igmpsnbase-items>
            <lookupMac>false</lookupMac>
          </igmpsnbase-items>
        </gl-items>
      </dom-items>
    </inst-items>
  </igmpsnoop-items>
</System>

Note: This example was added in Release 9.2(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no layer-2 multicast lookup mac

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring a Static Mac Entry

Configuring a Static Mac Entry
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "l2Macs": {
          "children": [
            {
              "l2Static": {
                "children": [
                  {
                    "l2StaticEntry": {
                      "attributes": {
                        "dropAction": "no",
                        "interface": "eth1/2",
                        "staticMacAddress": "00:01:00:02:00:03",
                        "vlan": "vlan-123"
                      }
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <mac-items>
    <static-items>
      <vlan-items>
        <StaticEntry-list>
          <vlan>vlan-123</vlan>
          <staticMacAddress>00:01:00:02:00:03</staticMacAddress>
          <dropAction>false</dropAction>
          <interface>eth1/2</interface>
        </StaticEntry-list>
      </vlan-items>
    </static-items>
  </mac-items>
</System>

Note: This example was added in Release 9.2(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

mac address-table static 1.2.3 vlan 123 interface ethernet 1/2

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting a Static Mac Entry

Deleting a Static Mac Entry
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "l2Macs": {
          "children": [
            {
              "l2Static": {
                "children": [
                  {
                    "l2StaticEntry": {
                      "attributes": {
                        "staticMacAddress": "00:01:00:02:00:03",
                        "status": "deleted",
                        "vlan": "vlan-123"
                      }
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <mac-items>
    <static-items>
      <vlan-items>
        <StaticEntry-list xc:operation="delete">
          <vlan>vlan-123</vlan>
          <staticMacAddress>00:01:00:02:00:03</staticMacAddress>
        </StaticEntry-list>
      </vlan-items>
    </static-items>
  </mac-items>
</System>

Note: This example was added in Release 9.2(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

mac address-table static 1.2.3 vlan 123 interface ethernet 1/2

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring the MAC Address Table Aging Time

Configuring the MAC Address Table Aging Time
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "l2Macs": {
          "attributes": {
            "aging": "123"
          }
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <mac-items>
    <aging>123</aging>
  </mac-items>
</System>

Note: This example was added in Release 9.2(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

mac address-table aging-time 123

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the MAC Address Table Aging Time

Deleting the MAC Address Table Aging Time
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "l2Macs": {
          "attributes": {
            "aging": "1800"
          }
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <mac-items>
    <aging>1800</aging>
  </mac-items>
</System>

Note: This example was added in Release 9.2(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no mac address-table aging-time 123

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/media/dme/index.html

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide
https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html