Configuring MAC Lists
You can configure a MAC list to permit or deny a range of MAC addresses.
For more information, see the Cisco Nexus 3000 Series NX-OS Unicast Routing Configuration Guide:
Configuring to Deny
Configuring to Deny
POST http://<mgmt0_IP>/api/mo/sys/rpm.json
{
"rpmEntity": {
"children": [
{
"rtmaclistRuleMac": {
"attributes": {
"name": "SampleString_123"
},
"children": [
{
"rtmaclistEntry": {
"attributes": {
"action": "deny",
"macAddr": "D8:B1:90:71:E9:03",
"macAddrMask": "D8:B1:90:71:E9:03",
"order": "1243"
}}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<maclist-items>
<RuleMac-list>
<name>SampleString_123</name>
<ent-items>
<Entry-list>
<order>1243</order>
<action>deny</action>
<macAddr>D8:B1:90:71:E9:03</macAddr>
<macAddrMask>D8:B1:90:71:E9:03</macAddrMask>
</Entry-list>
</ent-items>
</RuleMac-list>
</maclist-items>
</rpm-items>
</System>
Note: This example was added in Release 9.3(3).
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-list SampleString_123 seq 1243 deny d8b1.9071.e903 d8b1.9071.e903
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
rpmEntity | sys/rpm |
rtmaclistRuleMac | sys/rpm/maclist-[SampleString_123] |
rtmaclistEntry | sys/rpm/maclist-[SampleString_123]/ent-1243 |
rtmaclistRuleMac Properties
The following table contains information about the rtmaclistRuleMac 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 Name | Data Type | Description | Values |
---|---|---|---|
name | pol:ObjName (naming:Name256) | Object name | MAX SIZE: 64 |
rtmaclistEntry Properties
The following table contains information about the rtmaclistEntry 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 Name | Data Type | Description | Values |
---|---|---|---|
action | rtflt:Action (scalar:Enum8) | Action | SELECTION: 0 - deny 1 - permit DEFAULT: permit |
macAddr | address:MAC | Mac Address | Value must match MM:MM:MM:SS:SS:SS format |
macAddrMask | address:MAC | Mac Address Mask | Value must match MM:MM:MM:SS:SS:SS format |
order | rtflt:Order (scalar:Uint32) | Order | RANGE: [1 , 4294967294] |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
Configuring to Permit
Configuring to Permit
POST http://<mgmt0_IP>/api/mo/sys/rpm.json
{
"rpmEntity": {
"children": [
{
"rtmaclistRuleMac": {
"attributes": {
"name": "SampleString_123"
},
"children": [
{
"rtmaclistEntry": {
"attributes": {
"action": "permit",
"macAddr": "D8:B1:90:71:E9:03",
"macAddrMask": "D8:B1:90:71:E9:03",
"order": "1243"
}}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<maclist-items>
<RuleMac-list>
<name>SampleString_123</name>
<ent-items>
<Entry-list>
<order>1243</order>
<action>permit</action>
<macAddr>D8:B1:90:71:E9:03</macAddr>
<macAddrMask>D8:B1:90:71:E9:03</macAddrMask>
</Entry-list>
</ent-items>
</RuleMac-list>
</maclist-items>
</rpm-items>
</System>
Note: This example was added in Release 9.3(3).
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-list SampleString_123 seq 1243 permit d8b1.9071.e903 d8b1.9071.e903
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
rpmEntity | sys/rpm |
rtmaclistRuleMac | sys/rpm/maclist-[SampleString_123] |
rtmaclistEntry | sys/rpm/maclist-[SampleString_123]/ent-1243 |
rtmaclistRuleMac Properties
The following table contains information about the rtmaclistRuleMac 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 Name | Data Type | Description | Values |
---|---|---|---|
name | pol:ObjName (naming:Name256) | Object name | MAX SIZE: 64 |
rtmaclistEntry Properties
The following table contains information about the rtmaclistEntry 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 Name | Data Type | Description | Values |
---|---|---|---|
action | rtflt:Action (scalar:Enum8) | Action | SELECTION: 0 - deny 1 - permit DEFAULT: permit |
macAddr | address:MAC | Mac Address | Value must match MM:MM:MM:SS:SS:SS format |
macAddrMask | address:MAC | Mac Address Mask | Value must match MM:MM:MM:SS:SS:SS format |
order | rtflt:Order (scalar:Uint32) | Order | RANGE: [1 , 4294967294] |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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: