Configuring EVPN
This section contains examples that demonstrate how to configure EVPN.
Exporting and Importing Target VPN Extended Communities in a Specified Format
Exporting and Importing Target VPN Extended Communities in a Specified Format
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}},{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Exporting and importing target VPN extended communities in a specified format.
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.
evpn
vni 123 l2
route-target both 1:2
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/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
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:unknown:0:0"
}}}]}},{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:unknown:0:0"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Exporting and importing target VPN extended communities in auto-generated targets.
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.
evpn
vni 123 l2
route-target both auto
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
Importing Target VPN Extended Communities in Auto-Generated Targets
Importing Target VPN Extended Communities in Auto-Generated Targets
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:unknown:0:0"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rttp-items>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Importing target VPN extended communities in auto-generated targets.
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.
evpn
vni 123 l2
route-target import auto
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
Importing Target VPN Extended Communities in a Specified Format
Importing Target VPN Extended Communities in a Specified Format
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rttp-items>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Importing target VPN extended communities in a specified format.
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.
evpn
vni 123 l2
route-target import 1:2
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/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
Exporting Target VPN Extended Communities in Auto-Generated Targets
Exporting Target VPN Extended Communities in Auto-Generated Targets
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:unknown:0:0"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Exporting target VPN extended communities in auto-generated targets.
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.
evpn
vni 123 l2
route-target export auto
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
Exporting Target VPN Extended Communities in a Specified Format
Exporting Target VPN Extended Communities in a Specified Format
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Exporting target VPN extended communities in a specified format.
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.
evpn
vni 123 l2
route-target export 1:2
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/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
Auto-Generating VPN Route Distinguishers
Auto-Generating VPN Route Distinguishers
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123",
"rd": "rd:unknown:0:0"
}}}]}}
{
imdata:[]
}
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rd>rd:unknown:0:0</rd>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Auto-generating VPN route distinguishers.
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.
evpn
vni 123 l2
rd auto
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
Generating VPN Route Distinguishers in a Specified Format
Generating VPN Route Distinguishers in a Specified Format
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123",
"rd": "rd:as2-nn2:1:2"
}}}]}}
{
imdata:[]
}
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rd>rd:as2-nn2:1:2</rd>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Generating VPN route distinguishers in a specified format.
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.
evpn
vni 123 l2
rd 1:2
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/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