Querying MAC Address Table Info

Querying a MAC Address Table

Querying a MAC Address Table
GET http://<IP_Address>/api/mo/sys/mac/table.json?rsp-subtree=full
{
    "totalCount": "1",
    "imdata": [
        {
            "l2MacAddressTable": {
                "attributes": {
                    "dn": "sys/mac/table"
                },
                "children": [
                    {
                        "l2MacAddressEntry": {
                            "attributes": {
                                "age": "0",
                                "macAddress": "00:03:00:01:00:01",
                                "macInfo": "standard",
                                "ntfy": "no",
                                "port": "supeth1",
                                "rn": "vlan-[vlan-10]-mac-00:03:00:01:00:01",
                                "routed": "yes",
                                "secure": "no",
                                "static": "yes",
                                "type": "gateway",
                                "vlan": "vlan-10"
                            }
                        }
                    },
                    {
                        "l2MacAddressEntry": {
                            "attributes": {
                                "age": "0",
                                "macAddress": "00:00:03:00:01:04",
                                "macInfo": "vpc-peer-link",
                                "ntfy": "yes",
                                "port": "po101",
                                "rn": "vlan-[vlan-100]-mac-00:00:03:00:01:04",
                                "routed": "no",
                                "secure": "yes",
                                "static": "yes",
                                "type": "primary",
                                "vlan": "vlan-100"
                            }
                        }
                    },
                    {
                        "l2MacAddressEntry": {
                            "attributes": {
                                "age": "0",
                                "macAddress": "00:A6:CA:B6:8D:69",
                                "macInfo": "standard",
                                "ntfy": "no",
                                "port": "supeth1",
                                "rn": "vlan-[vlan-0]-mac-00:A6:CA:B6:8D:69",
                                "routed": "yes",
                                "secure": "no",
                                "static": "yes",
                                "type": "gateway",
                                "vlan": "vlan-0"
                            }
                        }
                    },
                    {
                        "l2MacAddressEntry": {
                            "attributes": {
                                "age": "0",
                                "macAddress": "00:00:03:00:01:01",
                                "macInfo": "vpc-peer-link",
                                "ntfy": "yes",
                                "port": "po101",
                                "rn": "vlan-[vlan-100]-mac-00:00:03:00:01:01",
                                "routed": "no",
                                "secure": "yes",
                                "static": "yes",
                                "type": "primary",
                                "vlan": "vlan-100"
                            }
                        }
                    },
                    {
                        "l2MacAddressEntry": {
                            "attributes": {
                                "age": "0",
                                "macAddress": "00:02:00:01:00:01",
                                "macInfo": "standard",
                                "ntfy": "no",
                                "port": "eth1/51",
                                "rn": "vlan-[vlan-0]-mac-00:02:00:01:00:01",
                                "routed": "yes",
                                "secure": "no",
                                "static": "yes",
                                "type": "gateway",
                                "vlan": "vlan-0"
                            }
                        }
                    },
                    {
                        "l2MacAddressEntry": {
                            "attributes": {
                                "age": "0",
                                "macAddress": "00:92:12:34:00:00",
                                "macInfo": "standard",
                                "ntfy": "no",
                                "port": "eth1/3",
                                "rn": "vlan-[vlan-100]-mac-00:92:12:34:00:00",
                                "routed": "no",
                                "secure": "no",
                                "static": "yes",
                                "type": "primary",
                                "vlan": "vlan-100"
                            }
                        }
                    },
                    {
                        "l2MacAddressEntry": {
                            "attributes": {
                                "age": "0",
                                "macAddress": "00:00:03:00:01:03",
                                "macInfo": "vpc-peer-link",
                                "ntfy": "yes",
                                "port": "po101",
                                "rn": "vlan-[vlan-100]-mac-00:00:03:00:01:03",
                                "routed": "no",
                                "secure": "yes",
                                "static": "yes",
                                "type": "primary",
                                "vlan": "vlan-100"
                            }
                        }
                    },
                    {
                        "l2MacAddressEntry": {
                            "attributes": {
                                "age": "0",
                                "macAddress": "00:00:03:00:01:00",
                                "macInfo": "vpc-peer-link",
                                "ntfy": "yes",
                                "port": "po101",
                                "rn": "vlan-[vlan-100]-mac-00:00:03:00:01:00",
                                "routed": "no",
                                "secure": "yes",
                                "static": "yes",
                                "type": "primary",
                                "vlan": "vlan-100"
                            }
                        }
                    },
                    {
                        "l2MacAddressEntry": {
                            "attributes": {
                                "age": "0",
                                "macAddress": "00:00:03:00:01:02",
                                "macInfo": "vpc-peer-link",
                                "ntfy": "yes",
                                "port": "po101",
                                "rn": "vlan-[vlan-100]-mac-00:00:03:00:01:02",
                                "routed": "no",
                                "secure": "yes",
                                "static": "yes",
                                "type": "primary",
                                "vlan": "vlan-100"
                            }
                        }
                    }
                ]
            }
        }
    ]
}
GET:  http://<IP_Address>/restconf/data/Cisco-NX-OS-device:System/mac-items
    
<mac-items>
    <aging>120</aging>
    <static-items>
        <vlan-items>
            <StaticEntry-list>
                <vlan>vlan-100</vlan>
                <staticMacAddress>00:92:12:34:00:00</staticMacAddress>
                <dropAction>false</dropAction>
                <interface>eth1/3</interface>
            </StaticEntry-list>
        </vlan-items>
    </static-items>
    <table-items>
        <vlan-items>
            <MacAddressEntry-list>
                <vlan>vlan-10</vlan>
                <macAddress>00:03:00:01:00:01</macAddress>
                <age>0</age>
                <macInfo>standard</macInfo>
                <ntfy>false</ntfy>
                <port>supeth1</port>
                <routed>true</routed>
                <secure>false</secure>
                <static>true</static>
                <type>gateway</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-100</vlan>
                <macAddress>00:00:03:00:01:04</macAddress>
                <age>0</age>
                <macInfo>vpc-peer-link</macInfo>
                <ntfy>true</ntfy>
                <port>po101</port>
                <routed>false</routed>
                <secure>true</secure>
                <static>true</static>
                <type>primary</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-0</vlan>
                <macAddress>00:A6:CA:B6:8D:69</macAddress>
                <age>0</age>
                <macInfo>standard</macInfo>
                <ntfy>false</ntfy>
                <port>supeth1</port>
                <routed>true</routed>
                <secure>false</secure>
                <static>true</static>
                <type>gateway</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-100</vlan>
                <macAddress>00:00:03:00:01:01</macAddress>
                <age>0</age>
                <macInfo>vpc-peer-link</macInfo>
                <ntfy>true</ntfy>
                <port>po101</port>
                <routed>false</routed>
                <secure>true</secure>
                <static>true</static>
                <type>primary</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-0</vlan>
                <macAddress>00:02:00:01:00:01</macAddress>
                <age>0</age>
                <macInfo>standard</macInfo>
                <ntfy>false</ntfy>
                <port>eth1/51</port>
                <routed>true</routed>
                <secure>false</secure>
                <static>true</static>
                <type>gateway</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-100</vlan>
                <macAddress>00:92:12:34:00:00</macAddress>
                <age>0</age>
                <macInfo>standard</macInfo>
                <ntfy>false</ntfy>
                <port>eth1/3</port>
                <routed>false</routed>
                <secure>false</secure>
                <static>true</static>
                <type>primary</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-100</vlan>
                <macAddress>00:00:03:00:01:03</macAddress>
                <age>0</age>
                <macInfo>vpc-peer-link</macInfo>
                <ntfy>true</ntfy>
                <port>po101</port>
                <routed>false</routed>
                <secure>true</secure>
                <static>true</static>
                <type>primary</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-100</vlan>
                <macAddress>00:00:03:00:01:00</macAddress>
                <age>0</age>
                <macInfo>vpc-peer-link</macInfo>
                <ntfy>true</ntfy>
                <port>po101</port>
                <routed>false</routed>
                <secure>true</secure>
                <static>true</static>
                <type>primary</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-100</vlan>
                <macAddress>00:00:03:00:01:02</macAddress>
                <age>0</age>
                <macInfo>vpc-peer-link</macInfo>
                <ntfy>true</ntfy>
                <port>po101</port>
                <routed>false</routed>
                <secure>true</secure>
                <static>true</static>
                <type>primary</type>
            </MacAddressEntry-list>
        </vlan-items>
    </table-items>
</mac-items>

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
switch# show mac address-table
Legend:
        * - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC
        age - seconds since last seen,+ - primary entry using vPC Peer-Link,
        (T) - True, (F) - False, C - ControlPlane MAC, ~ - vsan
   VLAN     MAC Address      Type      age     Secure NTFY Ports
---------+-----------------+--------+---------+------+----+------------------
*  100     0092.1234.0000   static   -         F      F    Eth1/3
*  100     0000.0300.0100   secure   -         T      F    vPC Peer-Link
*  100     0000.0300.0101   secure   -         T      F    vPC Peer-Link
*  100     0000.0300.0102   secure   -         T      F    vPC Peer-Link
*  100     0000.0300.0103   secure   -         T      F    vPC Peer-Link
*  100     0000.0300.0104   secure   -         T      F    vPC Peer-Link
G    -     0002.0001.0001   static   -         F      F    Eth1/51(R) (Eth1/51)
G   10     0003.0001.0001   static   -         F      F    sup-eth1(R)
G    -     00a6.cab6.8d69   static   -         F      F    sup-eth1(R)

Note: The property information for this example was added in Release 9.3(3).


l2MacAddressTable Properties

The following table contains information about the l2MacAddressTable properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
dn
reference:BinRef
A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.


l2MacAddressEntry Properties

The following table contains information about the l2MacAddressEntry properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
agescalar:Uint32
Age - seconds since last seenRANGE: [0, 4294967295]
macAddressaddress:MAC
MACValue must match MM:MM:MM:SS:SS:SS format
macInfol2:MacInfo
(scalar:Enum8)
Additional Information on the MACSELECTION:
0 - standard
1 - drop
2 - svi-down-flood
3 - sup-inband-cfsoe
4 - vpc-peer-link
5 - nve
6 - sup-eth
DEFAULT: standard
ntfyscalar:Bool
NTFYSELECTION: true or false
portnw:IfId
(base:IfIndex)
PortMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
rn
reference:BinRN
Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
routedscalar:Bool
RoutedSELECTION: true or false
securescalar:Bool
SecureSELECTION: true or false
staticscalar:Bool
StaticSELECTION: true or false
typel2:MacType
(scalar:Enum8)
TypeSELECTION:
0 - unknown
1 - primary
2 - gateway
4 - overlay
5 - primary-vpc-peer
6 - control-plane
7 - vsan
DEFAULT: primary
vlanbase:Encap
VlanSELECTION: unknown, vlan-%d or vxlan-%d


Related Documentation

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

Querying a MAC Address Table (Static)

Querying a MAC Address Table (Static)
GET http://<IP_Address>/api/mo/sys/mac/table.json?query-target=subtree&query-target-filter=eq(l2MacAddressEntry.static,"yes")
{
    "totalCount": "9",
    "imdata": [
        {
            "l2MacAddressEntry": {
                "attributes": {
                    "age": "0",
                    "dn": "sys/mac/table/vlan-[vlan-100]-mac-00:92:12:34:00:00",
                    "macAddress": "00:92:12:34:00:00",
                    "macInfo": "standard",
                    "ntfy": "no",
                    "port": "eth1/3",
                    "routed": "no",
                    "secure": "no",
                    "static": "yes",
                    "type": "primary",
                    "vlan": "vlan-100"
                }
            }
        },
        {
            "l2MacAddressEntry": {
                "attributes": {
                    "age": "0",
                    "dn": "sys/mac/table/vlan-[vlan-0]-mac-00:A6:CA:B6:8D:69",
                    "macAddress": "00:A6:CA:B6:8D:69",
                    "macInfo": "standard",
                    "ntfy": "no",
                    "port": "supeth1",
                    "routed": "yes",
                    "secure": "no",
                    "static": "yes",
                    "type": "gateway",
                    "vlan": "vlan-0"
                }
            }
        },
        {
            "l2MacAddressEntry": {
                "attributes": {
                    "age": "0",
                    "dn": "sys/mac/table/vlan-[vlan-0]-mac-00:02:00:01:00:01",
                    "macAddress": "00:02:00:01:00:01",
                    "macInfo": "standard",
                    "ntfy": "no",
                    "port": "eth1/51",
                    "routed": "yes",
                    "secure": "no",
                    "static": "yes",
                    "type": "gateway",
                    "vlan": "vlan-0"
                }
            }
        },
        {
            "l2MacAddressEntry": {
                "attributes": {
                    "age": "0",
                    "dn": "sys/mac/table/vlan-[vlan-100]-mac-00:00:03:00:01:00",
                    "macAddress": "00:00:03:00:01:00",
                    "macInfo": "vpc-peer-link",
                    "ntfy": "yes",
                    "port": "po101",
                    "routed": "no",
                    "secure": "yes",
                    "static": "yes",
                    "type": "primary",
                    "vlan": "vlan-100"
                }
            }
        },
        {
            "l2MacAddressEntry": {
                "attributes": {
                    "age": "0",
                    "dn": "sys/mac/table/vlan-[vlan-100]-mac-00:00:03:00:01:01",
                    "macAddress": "00:00:03:00:01:01",
                    "macInfo": "vpc-peer-link",
                    "ntfy": "yes",
                    "port": "po101",
                    "routed": "no",
                    "secure": "yes",
                    "static": "yes",
                    "type": "primary",
                    "vlan": "vlan-100"
                }
            }
        },
        {
            "l2MacAddressEntry": {
                "attributes": {
                    "age": "0",
                    "dn": "sys/mac/table/vlan-[vlan-100]-mac-00:00:03:00:01:03",
                    "macAddress": "00:00:03:00:01:03",
                    "macInfo": "vpc-peer-link",
                    "ntfy": "yes",
                    "port": "po101",
                    "routed": "no",
                    "secure": "yes",
                    "static": "yes",
                    "type": "primary",
                    "vlan": "vlan-100"
                }
            }
        },
        {
            "l2MacAddressEntry": {
                "attributes": {
                    "age": "0",
                    "dn": "sys/mac/table/vlan-[vlan-100]-mac-00:00:03:00:01:02",
                    "macAddress": "00:00:03:00:01:02",
                    "macInfo": "vpc-peer-link",
                    "ntfy": "yes",
                    "port": "po101",
                    "routed": "no",
                    "secure": "yes",
                    "static": "yes",
                    "type": "primary",
                    "vlan": "vlan-100"
                }
            }
        },
        {
            "l2MacAddressEntry": {
                "attributes": {
                    "age": "0",
                    "dn": "sys/mac/table/vlan-[vlan-100]-mac-00:00:03:00:01:04",
                    "macAddress": "00:00:03:00:01:04",
                    "macInfo": "vpc-peer-link",
                    "ntfy": "yes",
                    "port": "po101",
                    "routed": "no",
                    "secure": "yes",
                    "static": "yes",
                    "type": "primary",
                    "vlan": "vlan-100"
                }
            }
        },
        {
            "l2MacAddressEntry": {
                "attributes": {
                    "age": "0",
                    "dn": "sys/mac/table/vlan-[vlan-10]-mac-00:03:00:01:00:01",
                    "macAddress": "00:03:00:01:00:01",
                    "macInfo": "standard",
                    "ntfy": "no",
                    "port": "supeth1",
                    "routed": "yes",
                    "secure": "no",
                    "static": "yes",
                    "type": "gateway",
                    "vlan": "vlan-10"
                }
            }
        }
    ]
}
GET:  http://<IP_Address>/restconf/data/Cisco-NX-OS-device:System/mac-items
    
<mac-items>
    <aging>120</aging>
    <static-items>
        <vlan-items>
            <StaticEntry-list>
                <vlan>vlan-100</vlan>
                <staticMacAddress>00:92:12:34:00:00</staticMacAddress>
                <dropAction>false</dropAction>
                <interface>eth1/3</interface>
            </StaticEntry-list>
        </vlan-items>
    </static-items>
    <table-items>
        <vlan-items>
            <MacAddressEntry-list>
                <vlan>vlan-10</vlan>
                <macAddress>00:03:00:01:00:01</macAddress>
                <age>0</age>
                <macInfo>standard</macInfo>
                <ntfy>false</ntfy>
                <port>supeth1</port>
                <routed>true</routed>
                <secure>false</secure>
                <static>true</static>
                <type>gateway</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-100</vlan>
                <macAddress>00:00:03:00:01:04</macAddress>
                <age>0</age>
                <macInfo>vpc-peer-link</macInfo>
                <ntfy>true</ntfy>
                <port>po101</port>
                <routed>false</routed>
                <secure>true</secure>
                <static>true</static>
                <type>primary</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-0</vlan>
                <macAddress>00:A6:CA:B6:8D:69</macAddress>
                <age>0</age>
                <macInfo>standard</macInfo>
                <ntfy>false</ntfy>
                <port>supeth1</port>
                <routed>true</routed>
                <secure>false</secure>
                <static>true</static>
                <type>gateway</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-100</vlan>
                <macAddress>00:00:03:00:01:01</macAddress>
                <age>0</age>
                <macInfo>vpc-peer-link</macInfo>
                <ntfy>true</ntfy>
                <port>po101</port>
                <routed>false</routed>
                <secure>true</secure>
                <static>true</static>
                <type>primary</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-0</vlan>
                <macAddress>00:02:00:01:00:01</macAddress>
                <age>0</age>
                <macInfo>standard</macInfo>
                <ntfy>false</ntfy>
                <port>eth1/51</port>
                <routed>true</routed>
                <secure>false</secure>
                <static>true</static>
                <type>gateway</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-100</vlan>
                <macAddress>00:92:12:34:00:00</macAddress>
                <age>0</age>
                <macInfo>standard</macInfo>
                <ntfy>false</ntfy>
                <port>eth1/3</port>
                <routed>false</routed>
                <secure>false</secure>
                <static>true</static>
                <type>primary</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-100</vlan>
                <macAddress>00:00:03:00:01:03</macAddress>
                <age>0</age>
                <macInfo>vpc-peer-link</macInfo>
                <ntfy>true</ntfy>
                <port>po101</port>
                <routed>false</routed>
                <secure>true</secure>
                <static>true</static>
                <type>primary</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-100</vlan>
                <macAddress>00:00:03:00:01:00</macAddress>
                <age>0</age>
                <macInfo>vpc-peer-link</macInfo>
                <ntfy>true</ntfy>
                <port>po101</port>
                <routed>false</routed>
                <secure>true</secure>
                <static>true</static>
                <type>primary</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-100</vlan>
                <macAddress>00:00:03:00:01:02</macAddress>
                <age>0</age>
                <macInfo>vpc-peer-link</macInfo>
                <ntfy>true</ntfy>
                <port>po101</port>
                <routed>false</routed>
                <secure>true</secure>
                <static>true</static>
                <type>primary</type>
            </MacAddressEntry-list>
        </vlan-items>
    </table-items>
</mac-items>

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
switch# show mac address-table static
Legend:
        * - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC
        age - seconds since last seen,+ - primary entry using vPC Peer-Link,
        (T) - True, (F) - False, C - ControlPlane MAC, ~ - vsan
   VLAN     MAC Address      Type      age     Secure NTFY Ports
---------+-----------------+--------+---------+------+----+------------------
*  100     0092.1234.0000   static   -         F      F    Eth1/3
G    -     0002.0001.0001   static   -         F      F    Eth1/51(R) (Eth1/51)
G   10     0003.0001.0001   static   -         F      F    sup-eth1(R)
G    -     00a6.cab6.8d69   static   -         F      F    sup-eth1(R)

Note: The property information for this example was added in Release 9.3(3).


l2MacAddressEntry Properties

The following table contains information about the l2MacAddressEntry properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
agescalar:Uint32
Age - seconds since last seenRANGE: [0, 4294967295]
dn
reference:BinRef
A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
macAddressaddress:MAC
MACValue must match MM:MM:MM:SS:SS:SS format
macInfol2:MacInfo
(scalar:Enum8)
Additional Information on the MACSELECTION:
0 - standard
1 - drop
2 - svi-down-flood
3 - sup-inband-cfsoe
4 - vpc-peer-link
5 - nve
6 - sup-eth
DEFAULT: standard
ntfyscalar:Bool
NTFYSELECTION: true or false
portnw:IfId
(base:IfIndex)
PortMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
routedscalar:Bool
RoutedSELECTION: true or false
securescalar:Bool
SecureSELECTION: true or false
staticscalar:Bool
StaticSELECTION: true or false
typel2:MacType
(scalar:Enum8)
TypeSELECTION:
0 - unknown
1 - primary
2 - gateway
4 - overlay
5 - primary-vpc-peer
6 - control-plane
7 - vsan
DEFAULT: primary
vlanbase:Encap
VlanSELECTION: unknown, vlan-%d or vxlan-%d


Related Documentation

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

Querying a Specific Entry in a MAC Address Table

Querying a Specific Entry in a MAC Address Table
GET http://<IP_Address>/api/mo/sys/mac/table/vlan-[vlan-10]-mac-00:03:00:01:00:01.json
{
    "totalCount": "1",
    "imdata": [
        {
            "l2MacAddressEntry": {
                "attributes": {
                    "age": "0",
                    "dn": "sys/mac/table/vlan-[vlan-10]-mac-00:03:00:01:00:01",
                    "macAddress": "00:03:00:01:00:01",
                    "macInfo": "standard",
                    "ntfy": "no",
                    "port": "supeth1",
                    "routed": "yes",
                    "secure": "no",
                    "static": "yes",
                    "type": "gateway",
                    "vlan": "vlan-10"
                }
            }
        }
    ]
}
GET:  http://<IP_Address>/restconf/data/Cisco-NX-OS-device:System/mac-items
    
<mac-items>
    <aging>120</aging>
    <table-items>
        <vlan-items>
            <MacAddressEntry-list>
                <vlan>vlan-10</vlan>
                <macAddress>00:03:00:01:00:01</macAddress>
                <age>0</age>
                <macInfo>standard</macInfo>
                <ntfy>false</ntfy>
                <port>supeth1</port>
                <routed>true</routed>
                <secure>false</secure>
                <static>true</static>
                <type>gateway</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-0</vlan>
                <macAddress>00:A6:CA:B6:8D:69</macAddress>
                <age>0</age>
                <macInfo>standard</macInfo>
                <ntfy>false</ntfy>
                <port>supeth1</port>
                <routed>true</routed>
                <secure>false</secure>
                <static>true</static>
                <type>gateway</type>
            </MacAddressEntry-list>
            <MacAddressEntry-list>
                <vlan>vlan-0</vlan>
                <macAddress>00:02:00:01:00:01</macAddress>
                <age>0</age>
                <macInfo>standard</macInfo>
                <ntfy>false</ntfy>
                <port>eth1/51</port>
                <routed>true</routed>
                <secure>false</secure>
                <static>true</static>
                <type>gateway</type>
            </MacAddressEntry-list>
        </vlan-items>
    </table-items>
</mac-items>

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show mac address-table address 0003.0001.0001 vlan 10
Legend:
        * - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC
        age - seconds since last seen,+ - primary entry using vPC Peer-Link,
        (T) - True, (F) - False, C - ControlPlane MAC, ~ - vsan
   VLAN     MAC Address      Type      age     Secure NTFY Ports
---------+-----------------+--------+---------+------+----+------------------
G   10     0003.0001.0001   static   -         F      F    sup-eth1(R)

Note: The property information for this example was added in Release 9.3(3).


l2MacAddressEntry Properties

The following table contains information about the l2MacAddressEntry properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
agescalar:Uint32
Age - seconds since last seenRANGE: [0, 4294967295]
dn
reference:BinRef
A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
macAddressaddress:MAC
MACValue must match MM:MM:MM:SS:SS:SS format
macInfol2:MacInfo
(scalar:Enum8)
Additional Information on the MACSELECTION:
0 - standard
1 - drop
2 - svi-down-flood
3 - sup-inband-cfsoe
4 - vpc-peer-link
5 - nve
6 - sup-eth
DEFAULT: standard
ntfyscalar:Bool
NTFYSELECTION: true or false
portnw:IfId
(base:IfIndex)
PortMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
routedscalar:Bool
RoutedSELECTION: true or false
securescalar:Bool
SecureSELECTION: true or false
staticscalar:Bool
StaticSELECTION: true or false
typel2:MacType
(scalar:Enum8)
TypeSELECTION:
0 - unknown
1 - primary
2 - gateway
4 - overlay
5 - primary-vpc-peer
6 - control-plane
7 - vsan
DEFAULT: primary
vlanbase:Encap
VlanSELECTION: unknown, vlan-%d or vxlan-%d


Related Documentation

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

Querying a MAC Address Table (Multicast)

Batch 1 of 3

Batch 1 of 3
GET http://<IP_Address>/api/mo/sys/igmpsnoop/inst/dom/db-mac.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=3&batch-id=1
{
    "totalCount": "1",
    "imdata": [
        {
            "igmpsnoopDb": {
                "attributes": {
                    "dn": "sys/igmpsnoop/inst/dom/db-mac",
                    "totalMacCount": "0",
                    "type": "mac"
                },
                "children": [
                    {
                        "igmpsnoopVlanRec": {
                            "attributes": {
                                "macCount": "1",
                                "rn": "vlanrec-2",
                                "vlanid": "2"
                            },
                            "children": [
                                {
                                    "igmpsnoopMacRec": {
                                        "attributes": {
                                            "age": "0",
                                            "macAddress": "01:00:5E:03:04:05",
                                            "rn": "mac-01:00:5E:03:04:05",
                                            "type": "IGMP"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        },
        {
            "warning": {
                "attributes": {
                    "text": "backend rv=0, SUCCESS.WARN: Batch request [3] is less than next Vlan mrouter entry [5].Please increase batch-size and try again."
                }
            }
        }
    ]
}

Note: The property information for this example was added in Release 9.3(3).


igmpsnoopDb Properties

The following table contains information about the igmpsnoopDb properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
dn
reference:BinRef
A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
totalMacCountscalar:Uint32
Total mac countRANGE: [0, 4294967295]
typeipmcsnoop:DbT
(scalar:Enum16)
Database Type identifying the oper data to displaySELECTION:
1 - group
2 - fabric-mcgrp
3 - querier
4 - mrouter
5 - snoopstats
6 - policy
7 - snoop
8 - exptrack
9 - stats
10 - mac
11 - macoif
DEFAULT: group


igmpsnoopVlanRec Properties

The following table contains information about the igmpsnoopVlanRec properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
macCountscalar:Uint32
MAC Entries Count for a Vlan IdentifierRANGE: [0, 4294967295]
rn
reference:BinRN
Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
vlanidipmcsnoop:Vlanid
(scalar:Uint32)
Vlan Identifier
RANGE: [1 , 4094]
DEFAULT: 1


igmpsnoopMacRec Properties

The following table contains information about the igmpsnoopMacRec properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
agescalar:Uint32
Seconds Since Last SeenRANGE: [0, 4294967295]
macAddressaddress:MAC
MAC Address of the Outgoing InterfaceValue must match MM:MM:MM:SS:SS:SS format
rn
reference:BinRN
Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
typeipmcsnoop:MacType
(scalar:Enum8)
Type of MAC AddressSELECTION:
0 - *
1 - G
2 - R
3 - O
4 - IGMP


Related Documentation

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

Batch 2 of 3

Batch 2 of 3
GET http://<IP_Address>/api/mo/sys/igmpsnoop/inst/dom/db-mac.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=3&batch-id=2
{
    "totalCount": "1",
    "imdata": [
        {
            "igmpsnoopDb": {
                "attributes": {
                    "dn": "sys/igmpsnoop/inst/dom/db-mac",
                    "totalMacCount": "0",
                    "type": "mac"
                },
                "children": [
                    {
                        "igmpsnoopVlanRec": {
                            "attributes": {
                                "macCount": "1",
                                "rn": "vlanrec-3",
                                "vlanid": "3"
                            },
                            "children": [
                                {
                                    "igmpsnoopMacRec": {
                                        "attributes": {
                                            "age": "0",
                                            "macAddress": "01:00:5E:03:03:03",
                                            "rn": "mac-01:00:5E:03:03:03",
                                            "type": "IGMP"
                                        },
                                        "children": [
                                            {
                                                "igmpsnoopMacOifRec": {
                                                    "attributes": {
                                                        "oif": "po10",
                                                        "rn": "oif-[po10]"
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        },
        {
            "warning": {
                "attributes": {
                    "text": "backend rv=0, SUCCESS. Rendered 3 MOs. Please iterate with next batch-id."
                }
            }
        }
    ]
}

Note: The property information for this example was added in Release 9.3(3).


igmpsnoopDb Properties

The following table contains information about the igmpsnoopDb properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
dn
reference:BinRef
A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
totalMacCountscalar:Uint32
Total mac countRANGE: [0, 4294967295]
typeipmcsnoop:DbT
(scalar:Enum16)
Database Type identifying the oper data to displaySELECTION:
1 - group
2 - fabric-mcgrp
3 - querier
4 - mrouter
5 - snoopstats
6 - policy
7 - snoop
8 - exptrack
9 - stats
10 - mac
11 - macoif
DEFAULT: group


igmpsnoopVlanRec Properties

The following table contains information about the igmpsnoopVlanRec properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
macCountscalar:Uint32
MAC Entries Count for a Vlan IdentifierRANGE: [0, 4294967295]
rn
reference:BinRN
Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
vlanidipmcsnoop:Vlanid
(scalar:Uint32)
Vlan Identifier
RANGE: [1 , 4094]
DEFAULT: 1


igmpsnoopMacRec Properties

The following table contains information about the igmpsnoopMacRec properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
agescalar:Uint32
Seconds Since Last SeenRANGE: [0, 4294967295]
macAddressaddress:MAC
MAC Address of the Outgoing InterfaceValue must match MM:MM:MM:SS:SS:SS format
rn
reference:BinRN
Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
typeipmcsnoop:MacType
(scalar:Enum8)
Type of MAC AddressSELECTION:
0 - *
1 - G
2 - R
3 - O
4 - IGMP


igmpsnoopMacOifRec Properties

The following table contains information about the igmpsnoopMacOifRec properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
oifnw:IfId
(base:IfIndex)
Outgoing Interface for a MAC AddressMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
rn
reference:BinRN
Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.


Related Documentation

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

Batch 3 of 3

Batch 3 of 3
GET http://<IP_Address>/api/mo/sys/igmpsnoop/inst/dom/db-mac.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=3&batch-id=3
{
    "totalCount": "1",
    "imdata": [
        {
            "igmpsnoopDb": {
                "attributes": {
                    "dn": "sys/igmpsnoop/inst/dom/db-mac",
                    "totalMacCount": "0",
                    "type": "mac"
                },
                "children": [
                    {
                        "igmpsnoopVlanRec": {
                            "attributes": {
                                "macCount": "1",
                                "rn": "vlanrec-8",
                                "vlanid": "8"
                            },
                            "children": [
                                {
                                    "igmpsnoopMacRec": {
                                        "attributes": {
                                            "age": "0",
                                            "macAddress": "01:00:5E:08:09:00",
                                            "rn": "mac-01:00:5E:08:09:00",
                                            "type": "IGMP"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        },
        {
            "warning": {
                "attributes": {
                    "text": "backend rv=43700005, No more data. Done"
                }
            }
        }
    ]
}
GET:  http://<IP_Address>/restconf/data/Cisco-NX-OS-device:

    -- Missing Info --

The entries are fetched in batches. To fetch all entries together, increase the batch-size.

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show  mac address-table multicast
Legend:
        * - primary entry, G - Gateway MAC,(R) - Routed MAC, O - Overlay MAC
        age - seconds since last seen,+ - primary entry using vPC Peer-Link
   VLAN      MAC Address      Type      Age     OIFs
---------+-----------------+--------+---------+------------------------------
  2         0100.5e03.0405     igmp     0
  3         0100.5e03.0303     igmp     0         Po10
  8         0100.5e08.0900     igmp     0


Note: The property information for this example was added in Release 9.3(3).


igmpsnoopDb Properties

The following table contains information about the igmpsnoopDb properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
dn
reference:BinRef
A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
totalMacCountscalar:Uint32
Total mac countRANGE: [0, 4294967295]
typeipmcsnoop:DbT
(scalar:Enum16)
Database Type identifying the oper data to displaySELECTION:
1 - group
2 - fabric-mcgrp
3 - querier
4 - mrouter
5 - snoopstats
6 - policy
7 - snoop
8 - exptrack
9 - stats
10 - mac
11 - macoif
DEFAULT: group


igmpsnoopVlanRec Properties

The following table contains information about the igmpsnoopVlanRec properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
macCountscalar:Uint32
MAC Entries Count for a Vlan IdentifierRANGE: [0, 4294967295]
rn
reference:BinRN
Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
vlanidipmcsnoop:Vlanid
(scalar:Uint32)
Vlan Identifier
RANGE: [1 , 4094]
DEFAULT: 1


igmpsnoopMacRec Properties

The following table contains information about the igmpsnoopMacRec properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
agescalar:Uint32
Seconds Since Last SeenRANGE: [0, 4294967295]
macAddressaddress:MAC
MAC Address of the Outgoing InterfaceValue must match MM:MM:MM:SS:SS:SS format
rn
reference:BinRN
Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
typeipmcsnoop:MacType
(scalar:Enum8)
Type of MAC AddressSELECTION:
0 - *
1 - G
2 - R
3 - O
4 - IGMP


Related Documentation

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