Configuring a VPNv4 Unicast Address Family
This section uses examples to demonstrate many of the BGP configuration options and to show how the REST APIs correspond to the CLI commands.
Configuring Multipath for EBGP and IBGP Paths
Configuring Multipath for EBGP and IBGP Paths
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "123"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"maxEcmp": "12",
"maxExtEcmp": "12",
"type": "vpnv4-ucast"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>123</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>vpnv4-ucast</type>
<maxEcmp>12</maxEcmp>
<maxExtEcmp>12</maxExtEcmp>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
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 123
address-family vpnv4 unicast
maximum-paths eibgp 12
Note: The property information for this example was added in Release 9.3(3).
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 |
---|---|
bgpEntity | sys/bgp |
bgpInst | sys/bgp/inst |
bgpDom | sys/bgp/inst/dom-{name} |
bgpDomAf | sys/bgp/inst/dom-{name}/af-{[type]} |
bgpInst Properties
The following table contains information about the bgpInst 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 |
---|---|---|---|
asn | bgp:AsnNum (string:Basic) | Autonomous system number | A sequence of characters |
bgpDom Properties
The following table contains information about the bgpDom 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 | naming:Name256 (string:Basic) | The name of the object. | MAX SIZE: 63 |
bgpDomAf Properties
The following table contains information about the bgpDomAf 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 |
---|---|---|---|
maxEcmp | bgp:MaxEcmp (scalar:UByte) | The maximum number of equal-cost paths for BGP load sharing. | RANGE: [1 , 64] DEFAULT: 1 |
maxExtEcmp | bgp:MaxEcmp (scalar:UByte) | Max External ECMP | RANGE: [1 , 64] DEFAULT: 1 |
type | bgp:AfT (scalar:Enum8) | Type | SELECTION: 1 - ipv4-ucast 2 - ipv4-mcast 3 - vpnv4-ucast 5 - ipv6-ucast 6 - ipv6-mcast 7 - vpnv6-ucast 8 - vpnv6-mcast 9 - l2vpn-evpn 10 - ipv4-lucast 11 - ipv6-lucast 12 - lnkstate 13 - ipv4-mvpn 14 - ipv6-mvpn 15 - l2vpn-vpls 16 - ipv4-mdt DEFAULT: ipv4-ucast |
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:
Deleting the Configuration of Multipath for EBGP and IBGP Paths
Deleting the Configuration of Multipath for EBGP and IBGP Paths
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "123"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"maxEcmp": "1",
"maxExtEcmp": "1",
"type": "vpnv4-ucast"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>123</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>vpnv4-ucast</type>
<maxEcmp>1</maxEcmp>
<maxExtEcmp>1</maxExtEcmp>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
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 123
address-family vpnv4 unicast
no maximum-paths eibgp 12
Note: The property information for this example was added in Release 9.3(3).
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 |
---|---|
bgpEntity | sys/bgp |
bgpInst | sys/bgp/inst |
bgpDom | sys/bgp/inst/dom-{name} |
bgpDomAf | sys/bgp/inst/dom-{name}/af-{[type]} |
bgpInst Properties
The following table contains information about the bgpInst 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 |
---|---|---|---|
asn | bgp:AsnNum (string:Basic) | Autonomous system number | A sequence of characters |
bgpDom Properties
The following table contains information about the bgpDom 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 | naming:Name256 (string:Basic) | The name of the object. | MAX SIZE: 63 |
bgpDomAf Properties
The following table contains information about the bgpDomAf 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 |
---|---|---|---|
maxEcmp | bgp:MaxEcmp (scalar:UByte) | The maximum number of equal-cost paths for BGP load sharing. | RANGE: [1 , 64] DEFAULT: 1 |
maxExtEcmp | bgp:MaxEcmp (scalar:UByte) | Max External ECMP | RANGE: [1 , 64] DEFAULT: 1 |
type | bgp:AfT (scalar:Enum8) | Type | SELECTION: 1 - ipv4-ucast 2 - ipv4-mcast 3 - vpnv4-ucast 5 - ipv6-ucast 6 - ipv6-mcast 7 - vpnv6-ucast 8 - vpnv6-mcast 9 - l2vpn-evpn 10 - ipv4-lucast 11 - ipv6-lucast 12 - lnkstate 13 - ipv4-mvpn 14 - ipv6-mvpn 15 - l2vpn-vpls 16 - ipv4-mdt DEFAULT: ipv4-ucast |
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 Allocation for Option B Labels
Configuring Allocation for Option B Labels
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"allocLblOptB": "enabled",
"type": "vpnv4-ucast"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>vpnv4-ucast</type>
<allocLblOptB>enabled</allocLblOptB>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Note: This example was added in Release 9.3(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 vpnv4 unicast
allocate-label option-b
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 |
---|---|
bgpEntity | sys/bgp |
bgpInst | sys/bgp/inst |
bgpDom | sys/bgp/inst/dom-default |
bgpDomAf | sys/bgp/inst/dom-default/af-vpnv4-ucast |
bgpInst Properties
The following table contains information about the bgpInst 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 |
---|---|---|---|
asn | bgp:AsnNum (string:Basic) | Autonomous system number | A sequence of characters |
bgpDom Properties
The following table contains information about the bgpDom 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 | naming:Name256 string:Basic | The BGP Domain name. This name can be up to 64 alphanumeric characters. Note that you cannot change this name after the object has been saved. |
bgpDomAf Properties
The following table contains information about the bgpDomAf 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 |
---|---|---|---|
allocLblOptB | bgp:AdminSt (scalar:Enum8) | Allow allocation of option B labels | SELECTION: 1 - enabled 2 - disabled DEFAULT: enabled |
type | bgp:AfT (scalar:Enum8) | Type | SELECTION: 1 - ipv4-ucast 2 - ipv4-mcast 3 - vpnv4-ucast 5 - ipv6-ucast 6 - ipv6-mcast 7 - vpnv6-ucast 8 - vpnv6-mcast 9 - l2vpn-evpn 10 - ipv4-lucast 11 - ipv6-lucast 12 - lnkstate 13 - ipv4-mvpn 14 - ipv6-mvpn 15 - l2vpn-vpls 16 - ipv4-mdt DEFAULT: ipv4-ucast |
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:
Deleting Allocation for Option B Labels
Deleting Allocation for Option B Labels
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"allocLblOptB": "disabled",
"type": "vpnv4-ucast"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>vpnv4-ucast</type>
<allocLblOptB>disabled</allocLblOptB>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Note: This example was added in Release 9.3(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 vpnv4 unicast
no allocate-label option-b
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 |
---|---|
bgpEntity | sys/bgp |
bgpInst | sys/bgp/inst |
bgpDom | sys/bgp/inst/dom-default |
bgpDomAf | sys/bgp/inst/dom-default/af-vpnv4-ucast |
bgpInst Properties
The following table contains information about the bgpInst 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 |
---|---|---|---|
asn | bgp:AsnNum (string:Basic) | Autonomous system number | A sequence of characters |
bgpDom Properties
The following table contains information about the bgpDom 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 | naming:Name256 string:Basic | The BGP Domain name. This name can be up to 64 alphanumeric characters. Note that you cannot change this name after the object has been saved. |
bgpDomAf Properties
The following table contains information about the bgpDomAf 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 |
---|---|---|---|
allocLblOptB | bgp:AdminSt (scalar:Enum8) | Allow allocation of option B labels | SELECTION: 1 - enabled 2 - disabled DEFAULT: enabled |
type | bgp:AfT (scalar:Enum8) | Type | SELECTION: 1 - ipv4-ucast 2 - ipv4-mcast 3 - vpnv4-ucast 5 - ipv6-ucast 6 - ipv6-mcast 7 - vpnv6-ucast 8 - vpnv6-mcast 9 - l2vpn-evpn 10 - ipv4-lucast 11 - ipv6-lucast 12 - lnkstate 13 - ipv4-mvpn 14 - ipv6-mvpn 15 - l2vpn-vpls 16 - ipv4-mdt DEFAULT: ipv4-ucast |
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: