Configuring a Route Map
Configuring a Route Map
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"rpmEntity": {
"children": [
{
"rtmapRule": {
"attributes": {
"name": "testRtMap"
},
"children": [
{
"rtmapEntry": {
"attributes": {
"action": "permit",
"descr": "world",
"loadShareV4": "enabled",
"loadShareV6": "enabled",
"order": "10"
},
"children": [
{
"rtmapSetOrigin": {
"attributes": {
"originT": "egp",
"type": "origin"
}}},{
"rtmapMatchAsPathAccessList": {
"children": [
{
"rtmapRsRtAsPathAccAtt": {
"attributes": {
"tDn": "sys/rpm/accesslist-testAccList2"
}}},{
"rtmapRsRtAsPathAccAtt": {
"attributes": {
"tDn": "sys/rpm/accesslist-testAccList1"
}}}]}},{
"rtmapSetNh": {
"attributes": {
"addr": "10.10.10.10"
}}},{
"rtmapSetNh": {
"attributes": {
"addr": "2000::4"
}}},{
"rtmapSetRegComm": {
"attributes": {
"noCommAttr": "disabled"
},
"children": [
{
"rtregcomItem": {
"attributes": {
"community": "regular:as2-nn2:65535:65281"
}}},{
"rtregcomItem": {
"attributes": {
"community": "regular:as2-nn2:0:0"
}}},{
"rtregcomItem": {
"attributes": {
"community": "regular:as2-nn2:65535:65283"
}}},{
"rtregcomItem": {
"attributes": {
"community": "regular:as2-nn2:65535:65282"
}}},{
"rtregcomItem": {
"attributes": {
"community": "regular:as2-nn2:65530:50300"
}}},{
"rtregcomItem": {
"attributes": {
"community": "regular:as2-nn2:65530:50800"
}}}]}},{
"rtmapMatchRegComm": {
"attributes": {
"criteria": "exact"
},
"children": [
{
"rtmapRsRegCommAtt": {
"attributes": {
"tDn": "sys/rpm/rtregcom-testRegComm1"
}}},{
"rtmapRsRegCommAtt": {
"attributes": {
"tDn": "sys/rpm/rtregcom-testRegComm2"
}}}]}},{
"rtmapMatchRtType": {
"attributes": {
"routeT": "external"
}}},{
"rtmapMatchRtType": {
"attributes": {
"routeT": "local"
}}},{
"rtmapMatchRtType": {
"attributes": {
"routeT": "isis-l2"
}}},{
"rtmapMatchRtTag": {
"attributes": {
"tag": "232"
}}},{
"rtmapMatchRtTag": {
"attributes": {
"tag": "231"
}}},{
"rtmapMatchRtDstV6": {
"children": [
{
"rtmapRsRtDstV6Att": {
"attributes": {
"tDn": "sys/rpm/pfxlistv6-testV6PfxList2"
}}},{
"rtmapRsRtDstV6Att": {
"attributes": {
"tDn": "sys/rpm/pfxlistv6-testV6PfxList1"
}}}]}},{
"rtmapMatchRtDst": {
"children": [
{
"rtmapRsRtDstAtt": {
"attributes": {
"tDn": "sys/rpm/pfxlistv4-testV4PfxList2"
}}},{
"rtmapRsRtDstAtt": {
"attributes": {
"tDn": "sys/rpm/pfxlistv4-testV4PfxList1"
}}}]}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<rtmap-items>
<Rule-list>
<name>testRtMap</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
<descr>world</descr>
<loadShareV4>enabled</loadShareV4>
<loadShareV6>enabled</loadShareV6>
<origin-items>
<originT>egp</originT>
<type>origin</type>
</origin-items>
<mrtacclist-items>
<rsrtAsPathAccAtt-items>
<RsRtAsPathAccAtt-list>
<tDn>/System/rpm-items/accesslist-items/Rule-list[name='testAccList2']</tDn>
</RsRtAsPathAccAtt-list>
<RsRtAsPathAccAtt-list>
<tDn>/System/rpm-items/accesslist-items/Rule-list[name='testAccList1']</tDn>
</RsRtAsPathAccAtt-list>
</rsrtAsPathAccAtt-items>
</mrtacclist-items>
<nh-items>
<SetNh-list>
<addr>10.10.10.10</addr>
</SetNh-list>
<SetNh-list>
<addr>2000::4</addr>
</SetNh-list>
</nh-items>
<sregcomm-items>
<noCommAttr>disabled</noCommAttr>
<item-items>
<Item-list>
<community>regular:as2-nn2:65535:65281</community>
</Item-list>
<Item-list>
<community>regular:as2-nn2:0:0</community>
</Item-list>
<Item-list>
<community>regular:as2-nn2:65535:65283</community>
</Item-list>
<Item-list>
<community>regular:as2-nn2:65535:65282</community>
</Item-list>
<Item-list>
<community>regular:as2-nn2:65530:50300</community>
</Item-list>
<Item-list>
<community>regular:as2-nn2:65530:50800</community>
</Item-list>
</item-items>
</sregcomm-items>
<mregcomm-items>
<criteria>exact</criteria>
<rsregCommAtt-items>
<RsRegCommAtt-list>
<tDn>/System/rpm-items/rtregcom-items/Rule-list[name='testRegComm1']</tDn>
</RsRegCommAtt-list>
<RsRegCommAtt-list>
<tDn>/System/rpm-items/rtregcom-items/Rule-list[name='testRegComm2']</tDn>
</RsRegCommAtt-list>
</rsregCommAtt-items>
</mregcomm-items>
<mrttype-items>
<MatchRtType-list>
<routeT>external</routeT>
</MatchRtType-list>
<MatchRtType-list>
<routeT>local</routeT>
</MatchRtType-list>
<MatchRtType-list>
<routeT>isis-l2</routeT>
</MatchRtType-list>
</mrttype-items>
<mrttag-items>
<MatchRtTag-list>
<tag>232</tag>
</MatchRtTag-list>
<MatchRtTag-list>
<tag>231</tag>
</MatchRtTag-list>
</mrttag-items>
<mrtdstv6-items>
<rsrtDstV6Att-items>
<RsRtDstV6Att-list>
<tDn>/System/rpm-items/pfxlistv6-items/RuleV6-list[name='testV6PfxList2']</tDn>
</RsRtDstV6Att-list>
<RsRtDstV6Att-list>
<tDn>/System/rpm-items/pfxlistv6-items/RuleV6-list[name='testV6PfxList1']</tDn>
</RsRtDstV6Att-list>
</rsrtDstV6Att-items>
</mrtdstv6-items>
<mrtdst-items>
<rsrtDstAtt-items>
<RsRtDstAtt-list>
<tDn>/System/rpm-items/pfxlistv4-items/RuleV4-list[name='testV4PfxList2']</tDn>
</RsRtDstAtt-list>
<RsRtDstAtt-list>
<tDn>/System/rpm-items/pfxlistv4-items/RuleV4-list[name='testV4PfxList1']</tDn>
</RsRtDstAtt-list>
</rsrtDstAtt-items>
</mrtdst-items>
</Entry-list>
</ent-items>
</Rule-list>
</rtmap-items>
</rpm-items>
</System>
This configures a network that is equivalent to the CLIs listed below.
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.
network testRtMap permit 10
description world
match as-path testAccList1 testAccList2
match ip address prefix-list testV4PfxList1 testV4PfxList2
match ipv6 address prefix-list testV6PfxList1 testV6PfxList2
match tag 231 232
match community testRegComm1 testRegComm2 exact-match
match route-type external local level-2
set ip next-hop 10.10.10.10 load-share
set ipv6 next-hop 2000::4 load-share
set origin egp
set community internet 65530:50300 65530:50800 no-export no-advertise local-AS
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
Matching Two BGP Communities
Matching Two BGP Communities
POST http://<mgmt0_IP>/api/mo/sys/rpm.json
{
"rpmEntity": {
"children": [
{
"rtmapRule": {
"attributes": {
"name": "test2"
},
"children": [
{
"rtmapEntry": {
"attributes": {
"action": "permit",
"order": "10"
},
"children": [
{
"rtmapMatchRegComm": {
"children": [
{
"rtmapRsRegCommAtt": {
"attributes": {
"tDn": "sys/rpm/rtregcom-bgpHigh"
}}},{
"rtmapRsRegCommAtt": {
"attributes": {
"tDn": "sys/rpm/rtregcom-bgpLow"
}}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<rtmap-items>
<Rule-list>
<name>test2</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
<mregcomm-items>
<rsregCommAtt-items>
<RsRegCommAtt-list>
<tDn>/System/rpm-items/rtregcom-items/Rule-list[name='bgpHigh']</tDn>
</RsRegCommAtt-list>
<RsRegCommAtt-list>
<tDn>/System/rpm-items/rtregcom-items/Rule-list[name='bgpLow']</tDn>
</RsRegCommAtt-list>
</rsregCommAtt-items>
</mregcomm-items>
</Entry-list>
</ent-items>
</Rule-list>
</rtmap-items>
</rpm-items>
</System>
This example shows how to match two BGP communities.
Note: This example was added in 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.
route-map test2
match community bgpLow bgpHigh
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 a Configured Match of Two BGP Communities
Removing a Configured Match of Two BGP Communities
POST http://<mgmt0_IP>/api/mo/sys/rpm.json
{
"rpmEntity": {
"children": [
{
"rtmapRule": {
"attributes": {
"name": "test2"
},
"children": [
{
"rtmapEntry": {
"attributes": {
"action": "permit",
"order": "10"
},
"children": [
{
"rtmapMatchRegComm": {
"children": [
{
"rtmapRsRegCommAtt": {
"attributes": {
"status": "deleted",
"tDn": "sys/rpm/rtregcom-bgpHigh"
}}},{
"rtmapRsRegCommAtt": {
"attributes": {
"status": "deleted",
"tDn": "sys/rpm/rtregcom-bgpLow"
}}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<rtmap-items>
<Rule-list>
<name>test2</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
<mregcomm-items>
<rsregCommAtt-items>
<RsRegCommAtt-list xc:operation="delete">
<tDn>/System/rpm-items/rtregcom-items/Rule-list[name='bgpHigh']</tDn>
</RsRegCommAtt-list>
<RsRegCommAtt-list xc:operation="delete">
<tDn>/System/rpm-items/rtregcom-items/Rule-list[name='bgpLow']</tDn>
</RsRegCommAtt-list>
</rsregCommAtt-items>
</mregcomm-items>
</Entry-list>
</ent-items>
</Rule-list>
</rtmap-items>
</rpm-items>
</System>
This example shows how to remove a match for two BGP communities.
Note: This example was added in 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.
route-map test2
no match community bgpLow bgpHigh
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
Setting the Segment Routing (SR) Label Index of a Route
Setting the Segment Routing (SR) Label Index of a Route
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"rpmEntity": {
"children": [
{
"rtmapRule": {
"attributes": {
"name": "map1"
},
"children": [
{
"rtmapEntry": {
"attributes": {
"action": "permit",
"order": "10"
},
"children": [
{
"rtmapSetLabelIndex": {
"attributes": {
"index": "123",
"type": "rt-index"
}}}]}}]}}]}},{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpAdvPrefix": {
"attributes": {
"addr": "0.0.0.0/2",
"rtMap": "map1"
}}}]}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<rtmap-items>
<Rule-list>
<name>map1</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
<slblindex-items>
<index>123</index>
<type>rt-index</type>
</slblindex-items>
</Entry-list>
</ent-items>
</Rule-list>
</rtmap-items>
</rpm-items>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<prefix-items>
<AdvPrefix-list>
<addr>0.0.0.0/2</addr>
<rtMap>map1</rtMap>
</AdvPrefix-list>
</prefix-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
This example sets the label index for routes that match the network command. The range is from 0 to 471788. By default, a label index is not added to the route.
Note: This example was added in 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.
route-map map1 permit 10
set label-index 123
router bgp 100
address-family ipv4 unicast
network 1.2.3.4/2 route-map map1
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 Segment Routing (SR) Label Index of a Route (IPv4)
Deleting the Segment Routing (SR) Label Index of a Route
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"rpmEntity": {
"children": [
{
"rtmapRule": {
"attributes": {
"name": "map1"
},
"children": [
{
"rtmapEntry": {
"attributes": {
"action": "permit",
"order": "10"
},
"children": [
{
"rtmapSetLabelIndex": {
"attributes": {
"status": "deleted"
}}}]}}]}}]}},{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpAdvPrefix": {
"attributes": {
"addr": "0.0.0.0/2",
"rtMap": "map1"
}}}]}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<rtmap-items>
<Rule-list>
<name>map1</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
<slblindex-items xc:operation="delete">
</slblindex-items>
</Entry-list>
</ent-items>
</Rule-list>
</rtmap-items>
</rpm-items>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<prefix-items>
<AdvPrefix-list>
<addr>0.0.0.0/2</addr>
<rtMap>map1</rtMap>
</AdvPrefix-list>
</prefix-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
This example deletes the label index for routes that match the network command.
Note: This example was added in 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.
route-map map1 permit 10
no set label-index 123
router bgp 100
address-family ipv4 unicast
network 1.2.3.4/2 route-map map1
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
Setting the Local Preference to 100 for all Routes Included in an Access List
Setting the Local Preference to 100 for all Routes Included in an Access List
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"rpmEntity": {
"children": [
{
"rtmapRule": {
"attributes": {
"name": "map-preference"
},
"children": [
{
"rtmapEntry": {
"attributes": {
"action": "permit",
"order": "10"
},
"children": [
{
"rtmapMatchAsPathAccessList": {
"children": [
{
"rtmapRsRtAsPathAccAtt": {
"attributes": {
"tDn": "sys/rpm/accesslist-1"
}}}]}},{
"rtmapSetPref": {
"attributes": {
"localPref": "100",
"type": "local-pref"
}}}]}}]}},{
"rtmapRule": {
"attributes": {
"name": "Map_1"
},
"children": [
{
"rtmapEntry": {
"attributes": {
"action": "permit",
"order": "10"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<rtmap-items>
<Rule-list>
<name>map-preference</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
<mrtacclist-items>
<rsrtAsPathAccAtt-items>
<RsRtAsPathAccAtt-list>
<tDn>/System/rpm-items/accesslist-items/Rule-list[name='1']</tDn>
</RsRtAsPathAccAtt-list>
</rsrtAsPathAccAtt-items>
</mrtacclist-items>
<spref-items>
<localPref>100</localPref>
<type>local-pref</type>
</spref-items>
</Entry-list>
</ent-items>
</Rule-list>
<Rule-list>
<name>Map_1</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
</Entry-list>
</ent-items>
</Rule-list>
</rtmap-items>
</rpm-items>
</System>
The preference is sent only to all routers in the local autonomous system.
You must have a match clause (even if it points to a "permit everything" list) if you want to set tags.
Use the route-map global configuration command and the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The set route-map configuration commands specify the redistribution set actions to be performed when all the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
This example shows how to set the local preference to 100 for all routes that are included in access list 1.
Note: This example was added in 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.
route-map map-preference
match as-path 1
set local-preference 100
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 Local Preference Set to 100 for all Routes Included in an Access List
Deleting the Local Preference Set to 100 for all Routes Included in an Access List
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"rpmEntity": {
"children": [
{
"rtmapRule": {
"attributes": {
"name": "map-preference"
},
"children": [
{
"rtmapEntry": {
"attributes": {
"action": "permit",
"order": "10"
},
"children": [
{
"rtmapMatchAsPathAccessList": {
"children": [
{
"rtmapRsRtAsPathAccAtt": {
"attributes": {
"tDn": "sys/rpm/accesslist-1"
}}}]}},{
"rtmapSetPref": {
"attributes": {
"status": "deleted"
}}}]}}]}},{
"rtmapRule": {
"attributes": {
"name": "Map_1"
},
"children": [
{
"rtmapEntry": {
"attributes": {
"action": "permit",
"order": "10"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<rtmap-items>
<Rule-list>
<name>map-preference</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
<mrtacclist-items>
<rsrtAsPathAccAtt-items>
<RsRtAsPathAccAtt-list>
<tDn>/System/rpm-items/accesslist-items/Rule-list[name='1']</tDn>
</RsRtAsPathAccAtt-list>
</rsrtAsPathAccAtt-items>
</mrtacclist-items>
<spref-items xc:operation="delete">
</spref-items>
</Entry-list>
</ent-items>
</Rule-list>
<Rule-list>
<name>Map_1</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
</Entry-list>
</ent-items>
</Rule-list>
</rtmap-items>
</rpm-items>
</System>
Note: This example was added in 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.
route-map map-preference
match as-path 1
no set local-preference 100
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
Building and Matching a Prefix List
Building and Matching a Prefix List
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"rpmEntity": {
"children": [
{
"rtpfxRuleV4": {
"attributes": {
"name": "List_1"
},
"children": [
{
"rtpfxEntry": {
"attributes": {
"action": "permit",
"criteria": "exact",
"fromPfxLen": "0",
"order": "123",
"pfx": "1.2.3.4/2",
"toPfxLen": "0"
}}}]},{
"rtmapRule": {
"attributes": {
"name": "Map_1"
},
"children": [
{
"rtmapEntry": {
"attributes": {
"action": "deny",
"order": "10"
},
"children": [
{
"rtmapMatchRtDst": {
"children": [
{
"rtmapRsRtDstAtt": {
"attributes": {
"tDn": "sys/rpm/pfxlistv4-List_1"
}}}]}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<pfxlistv4-items>
<RuleV4-list>
<name>List_1</name>
<ent-items>
<Entry-list>
<order>123</order>
<action>permit</action>
<criteria>exact</criteria>
<fromPfxLen>0</fromPfxLen>
<pfx>1.2.3.4/2</pfx>
<toPfxLen>0</toPfxLen>
</Entry-list>
</ent-items>
</RuleV4-list>
</pfxlistv4-items>
<rtmap-items>
<Rule-list>
<name>Map_1</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>deny</action>
<mrtdst-items>
<rsrtDstAtt-items>
<RsRtDstAtt-list>
<tDn>/System/rpm-items/pfxlistv4-items/RuleV4-list[name='List_1']</tDn>
</RsRtDstAtt-list>
</rsrtDstAtt-items>
</mrtdst-items>
</Entry-list>
</ent-items>
</Rule-list>
</rtmap-items>
</rpm-items>
</System>
Note: This example was added in 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 prefix-list List_1 seq 123 permit 1.2.3.4/2
route-map Map_1 deny
match ip address prefix-list List_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