Configuring an L2VPN EVPN Address Family
This section uses examples to demonstrate BGP configuration options and to show how the REST APIs correspond to the CLI commands.
Advertising a Physical IP for a Type-5 Route
Advertising a Physical IP for a Type-5 Route
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"advPip": "enabled",
"type": "l2vpn-evpn"
}}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>l2vpn-evpn</type>
<advPip>enabled</advPip>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Advertises route type 5 routes using the primary IP address of the VTEP interface as the next hop address in the VXLAN EVPN fabric.
Note: This example was added in Release 7.0(3)I7(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.
router bgp 100
address-family l2vpn evpn
advertise-pip
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 a Configured Advertised Physical IP for Type-5 Route
Deleting a Configured Advertised Physical IP for Type-5 Route
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"advPip": "disabled",
"type": "l2vpn-evpn"
}}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>l2vpn-evpn</type>
<advPip>disabled</advPip>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-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.
router bgp 100
address-family l2vpn evpn
no advertise-pip
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 an Additional Path with Receive Capability
Configuring an Additional Path with Receive Capability
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "l2vpn-evpn"
},
"children": [
{
"bgpAddlPath": {
"attributes": {
"capability": "receive"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>l2vpn-evpn</type>
<addlpath-items>
<capability>receive</capability>
</addlpath-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-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.
router bgp 100
address-family l2vpn evpn
additional-paths receive
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 an Additional Path with Receive Capability
Deleting an Additional Path with Receive Capability
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "l2vpn-evpn"
},
"children": [
{
"bgpAddlPath": {
"attributes": {
"capability": ""
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>l2vpn-evpn</type>
<addlpath-items>
<capability></capability>
</addlpath-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-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.
router bgp 100
address-family l2vpn evpn
no additional-paths receive
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 Additional Path Selections With Route-map
Configuring Additional Path Selections With Route-map
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "l2vpn-evpn"
},
"children": [
{
"bgpAddlPath": {
"attributes": {
"rtMap": "RTMap1"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>l2vpn-evpn</type>
<addlpath-items>
<rtMap>RTMap1</rtMap>
</addlpath-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
For configuring a route-map, Configuring a Route Map
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.
router bgp 100
address-family l2vpn evpn
additional-paths selection route-map RTMap1
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 Additional Path Selections With Route-map
Deleting Additional Path Selections With Route-map
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "l2vpn-evpn"
},
"children": [
{
"bgpAddlPath": {
"attributes": {
"rtMap": ""
}}}]}}]}}]}}]
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>l2vpn-evpn</type>
<addlpath-items>
<rtMap></rtMap>
</addlpath-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
For configuring a route-map, Configuring a Route Map
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.
router bgp 100
address-family l2vpn evpn
no additional-paths selection route-map RTMap1
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 Additional Paths with Send Capability
Configuring Additional Paths with Send Capability
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "l2vpn-evpn"
},
"children": [
{
"bgpAddlPath": {
"attributes": {
"capability": "send"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>l2vpn-evpn</type>
<addlpath-items>
<capability>send</capability>
</addlpath-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-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.
router bgp 100
address-family l2vpn evpn
additional-paths send
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 Configured Additional Paths with Send Capability
Deleting the Configured Additional Paths with Send Capability
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "l2vpn-evpn"
},
"children": [
{
"bgpAddlPath": {
"attributes": {
"capability": ""
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>l2vpn-evpn</type>
<addlpath-items>
<capability></capability>
</addlpath-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-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.
router bgp 100
address-family l2vpn evpn
no additional-paths send
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 L2VPN EVPN Under a Neighbor
Configuring an AS-Override While Sending an Update
Configuring an AS-Override While Sending an Update
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"asOverride": "enabled",
"inheritContPeerPolicyCtrl": "",
"type": "l2vpn-evpn"
}}}]}}]}}]}}]}}
{
"imdata": []
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>l2vpn-evpn</type>
<asOverride>enabled</asOverride>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Note: This example was added in Release 7.0(3)I7(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.
router bgp 100
neighbor 1.2.3.4
address-family l2vpn evpn
as-override
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 an AS-Override While Sending an Update (inherited from a Peer Template)
Configuring an AS-Override While Sending an Update (inherited from a Peer Template)
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": "",
"peerImp": "P_1"
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"asOverride": "disabled",
"inheritContPeerPolicyCtrl": "",
"type": "l2vpn-evpn"
}
}
}
]
}
},
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "P_1"
"asOverride": "enabled",
}
}
}
]
}
}
]
}
}
]
}
}
]
}
}
{
"imdata": []
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<peerImp>P_1</peerImp>
<af-items>
<PeerAf-list>
<type>l2vpn-evpn</type>
<asOverride>disabled</asOverride>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
<peercont-items>
<PeerCont-list>
<name>P_1</name>
<asOverride>enabled</asOverride>
<inheritContPeerCtrl></inheritContPeerCtrl>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
The default option is only valid when inheriting a template.
Note: This example was added in Release 7.0(3)I7(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.
router bgp 100
template peer P_1
neighbor 1.2.3.4
inherit peer P_1
address-family l2vpn evpn
default as-override
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 an AS-Override While Sending an Update
Deleting an AS-Override While Sending an Update
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"asOverride": "disabled",
"inheritContPeerPolicyCtrl": "",
"type": "l2vpn-evpn"
}}}]}}]}}]}}]}}
{
"imdata": []
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>l2vpn-evpn</type>
<asOverride>disabled</asOverride>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Note: This example was added in Release 7.0(3)I7(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.
router bgp 100
neighbor 1.2.3.4
address-family l2vpn evpn
no as-override
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
Applying an AS-PATH Filter List to Incoming Routes
Applying an AS-PATH Filter List to Incoming Routes
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"rpmEntity": {
"children": [
{
"rtlistRule": {
"attributes": {
"name": "List_A"
},
"children": [
{
"rtlistEntry": {
"attributes": {
"action": "permit",
"order": "10",
"regex": "1"
}}}]}}]}},{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "123"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"type": "l2vpn-evpn"
},
"children": [
{
"bgpFltrCtrlP": {
"attributes": {
"direction": "in",
"list": "List_A"
}}}]}}]}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<accesslist-items>
<Rule-list>
<name>List_A</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
<regex>1</regex>
</Entry-list>
</ent-items>
</Rule-list>
</accesslist-items>
</rpm-items>
<bgp-items>
<inst-items>
<asn>123</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>l2vpn-evpn</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<fltrctrl-items>
<FltrCtrlP-list>
<direction>in</direction>
<list>List_A</list>
</FltrCtrlP-list>
</fltrctrl-items>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-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 as-path access-list List_A seq 10 permit 1
router bgp 123
neighbor 1.2.3.4
address-family l2vpn evpn
filter-list List_A in
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
Applying an AS-PATH Filter List to Outgoing Routes
Applying an AS-PATH Filter List to Outgoing Routes
POST http://<mgmt0_IP>/api/mo/sys/.json
{
"topSystem": {
"children": [
{
"rpmEntity": {
"children": [
{
"rtlistRule": {
"attributes": {
"name": "List_A"
},
"children": [
{
"rtlistEntry": {
"attributes": {
"action": "permit",
"order": "10",
"regex": "1"
}}}]}}]}},{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "123"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"type": "l2vpn-evpn"
},
"children": [
{
"bgpFltrCtrlP": {
"attributes": {
"direction": "out",
"list": "List_A"
}}}]}}]}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<accesslist-items>
<Rule-list>
<name>List_A</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
<regex>1</regex>
</Entry-list>
</ent-items>
</Rule-list>
</accesslist-items>
</rpm-items>
<bgp-items>
<inst-items>
<asn>123</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>l2vpn-evpn</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<fltrctrl-items>
<FltrCtrlP-list>
<direction>out</direction>
<list>List_A</list>
</FltrCtrlP-list>
</fltrctrl-items>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-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 as-path access-list List_A seq 10 permit 1
router bgp 123
neighbor 1.2.3.4
address-family l2vpn evpn
filter-list List_A out
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
Applying a Prefix List to Incoming Routes
Applying a Prefix List to Incoming Routes
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": "10",
"pfx": "4.3.2.1/3",
"toPfxLen": "0"
}}}]}}]}},{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "123"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"type": "l2vpn-evpn"
},
"children": [
{
"bgpPfxCtrlP": {
"attributes": {
"direction": "in",
"list": "List_1"
}}}]}}]}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<pfxlistv4-items>
<RuleV4-list>
<name>List_1</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
<criteria>exact</criteria>
<fromPfxLen>0</fromPfxLen>
<pfx>4.3.2.1/3</pfx>
<toPfxLen>0</toPfxLen>
</Entry-list>
</ent-items>
</RuleV4-list>
</pfxlistv4-items>
</rpm-items>
<bgp-items>
<inst-items>
<asn>123</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>l2vpn-evpn</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<pfxctrl-items>
<PfxCtrlP-list>
<direction>in</direction>
<list>List_1</list>
</PfxCtrlP-list>
</pfxctrl-items>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-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 10 permit 4.3.2.1/3
router bgp 123
neighbor 1.2.3.4
address-family l2vpn evpn
prefix-list List_1 in
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
Applying a Prefix List to Outgoing Routes
Applying a Prefix List to Outgoing Routes
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
"topSystem": {
"children": [
{
"rpmEntity": {
"children": [
{
"rtpfxRuleV4": {
"attributes": {
"name": "List_1"
},
"children": [
{
"rtpfxEntry": {
"attributes": {
"action": "permit",
"criteria": "exact",
"fromPfxLen": "0",
"order": "10",
"pfx": "4.3.2.1/3",
"toPfxLen": "0"
}}}]}}]}},{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "123"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"type": "l2vpn-evpn"
},
"children": [
{
"bgpPfxCtrlP": {
"attributes": {
"direction": "in",
"list": "List_1"
}}}]}}]}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<rpm-items>
<pfxlistv4-items>
<RuleV4-list>
<name>List_1</name>
<ent-items>
<Entry-list>
<order>10</order>
<action>permit</action>
<criteria>exact</criteria>
<fromPfxLen>0</fromPfxLen>
<pfx>4.3.2.1/3</pfx>
<toPfxLen>0</toPfxLen>
</Entry-list>
</ent-items>
</RuleV4-list>
</pfxlistv4-items>
</rpm-items>
<bgp-items>
<inst-items>
<asn>123</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>l2vpn-evpn</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<pfxctrl-items>
<PfxCtrlP-list>
<direction>in</direction>
<list>List_1</list>
</PfxCtrlP-list>
</pfxctrl-items>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-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 10 permit 4.3.2.1/3
router bgp 123
neighbor 1.2.3.4
address-family l2vpn evpn
prefix-list List_1 out
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
Overriding an Route-Target’s ASN Field for eBGP EVPN Sessions
Overriding an Route-Target’s ASN Field for eBGP EVPN Sessions
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"rewriteEvpnRtAsn": "enabled",
"type": "l2vpn-evpn"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>l2vpn-evpn</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<rewriteEvpnRtAsn>enabled</rewriteEvpnRtAsn>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Note: This example was added in Release 7.0(3)I7(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.
router bgp 100
neighbor 1.2.3.4
address-family l2vpn evpn
rewrite-evpn-rt-asn
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
Overriding a Route-Target’s ASN Field for eBGP EVPN Sessions (Values inherited from a Peer Template)
Overriding a Route-Target’s ASN Field for eBGP EVPN Sessions (Values inherited from a Peer Template)
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"rewriteRtAsn": "disabled",
"type": "l2vpn-evpn"
},
"children": [
{
"bgpPolicyInheritRule": {
"attributes": {
"name": "Pol1",
"seq": "123"
}}}]}}]}},{
"bgpPolicyCont": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"name": "Pol1"
}}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>l2vpn-evpn</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<rewriteRtAsn>disabled</rewriteRtAsn>
<pol-items>
<PolicyInheritRule-list>
<name>Pol1</name>
<seq>123</seq>
</PolicyInheritRule-list>
</pol-items>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
<policycont-items>
<PolicyCont-list>
<name>Pol1</name>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PolicyCont-list>
</policycont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Note: This example was added in Release 7.0(3)I7(3).
CLI Command
The CLI command below is the equivalent of the payload example 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 or the YANG tab to view the XML payload.
router bgp 100
template peer-policy Pol1
neighbor 1.2.3.4
address-family l2vpn evpn
inherit peer-policy Pol1 123
default rewrite-evpn-rt-asn
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 a Default Site-of-Origin Extended Community (Values inherited from a Peer Template)
Configuring a Default Site-of-Origin Extended Community (Values inherited from a Peer Template)
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"rewriteRtAsn": "disabled",
"type": "l2vpn-evpn"
},
"children": [
{
"bgpPolicyInheritRule": {
"attributes": {
"name": "Pol1",
"seq": "123"
}}}]}}]}},{
"bgpPolicyCont": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"name": "Pol1"
}}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>l2vpn-evpn</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<rewriteRtAsn>disabled</rewriteRtAsn>
<pol-items>
<PolicyInheritRule-list>
<name>Pol1</name>
<seq>123</seq>
</PolicyInheritRule-list>
</pol-items>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
<policycont-items>
<PolicyCont-list>
<name>Pol1</name>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PolicyCont-list>
</policycont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Note: This example was added in Release 7.0(3)I7(3).
CLI Command
The CLI command below is the equivalent of the payload example 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 or the YANG tab to view the XML payload.
router bgp 100
template peer-policy Pol1
neighbor 1.2.3.4
address-family l2vpn evpn
inherit peer-policy Pol1 123
default rewrite-evpn-rt-asn
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