Configuring a Link-State 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 Target VPN Extended Communities to All Routes

Configuring Target VPN Extended Communities to All Routes
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
  "bgpEntity": {
    "children": [
      {
        "bgpInst": {
          "attributes": {
            "asn": "123"
          },
          "children": [
            {
              "bgpDom": {
                "attributes": {
                  "name": "default"
                },
                "children": [
                  {
                    "bgpDomAf": {
                      "attributes": {
                        "retainRttAll": "enabled",
                        "retainRttRtMap": "",
                        "type": "lnkstate"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <bgp-items>
    <inst-items>
      <asn>123</asn>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <af-items>
            <DomAf-list>
              <type>lnkstate</type>
              <retainRttAll>enabled</retainRttAll>
              <retainRttRtMap></retainRttRtMap>
            </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 link-state
  retain route-target all

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.

MODN
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 NameData TypeDescriptionValues
asnbgp:AsnNum
(string:Basic)
Autonomous system numberA 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 NameData TypeDescriptionValues
namenaming: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 NameData TypeDescriptionValues
retainRttAllbgp:AdminSt
(scalar:Enum8)
Retain Route Target AllSELECTION:
1 - enabled
2 - disabled
DEFAULT: disabled
retainRttRtMapstring:Basic
Retain Route Target Route MapA sequence of characters
typebgp:AfT
(scalar:Enum8)
TypeSELECTION:
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:

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 Configuration of Target VPN Extended Communities Set to All Routes

Deleting the Configuration of Target VPN Extended Communities Set to All Routes
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
  "bgpEntity": {
    "children": [
      {
        "bgpInst": {
          "attributes": {
            "asn": "123"
          },
          "children": [
            {
              "bgpDom": {
                "attributes": {
                  "name": "default"
                },
                "children": [
                  {
                    "bgpDomAf": {
                      "attributes": {
                        "retainRttAll": "disabled",
                        "retainRttRtMap": "",
                        "type": "lnkstate"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <bgp-items>
    <inst-items>
      <asn>123</asn>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <af-items>
            <DomAf-list>
              <type>lnkstate</type>
              <retainRttAll>disabled</retainRttAll>
              <retainRttRtMap></retainRttRtMap>
            </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 link-state
  no retain route-target all

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.

MODN
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 NameData TypeDescriptionValues
asnbgp:AsnNum
(string:Basic)
Autonomous system numberA 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 NameData TypeDescriptionValues
namenaming: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 NameData TypeDescriptionValues
retainRttAllbgp:AdminSt
(scalar:Enum8)
Retain Route Target AllSELECTION:
1 - enabled
2 - disabled
DEFAULT: disabled
retainRttRtMapstring:Basic
Retain Route Target Route MapA sequence of characters
typebgp:AfT
(scalar:Enum8)
TypeSELECTION:
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:

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 Target VPN Extended Communities to a Specific Route Map

Configuring Target VPN Extended Communities to a Specific Route Map
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
  "bgpEntity": {
    "children": [
      {
        "bgpInst": {
          "attributes": {
            "asn": "123"
          },
          "children": [
            {
              "bgpDom": {
                "attributes": {
                  "name": "default"
                },
                "children": [
                  {
                    "bgpDomAf": {
                      "attributes": {
                        "retainRttAll": "disabled",
                        "retainRttRtMap": "map1",
                        "type": "lnkstate"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <bgp-items>
    <inst-items>
      <asn>123</asn>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <af-items>
            <DomAf-list>
              <type>lnkstate</type>
              <retainRttAll>disabled</retainRttAll>
              <retainRttRtMap>map1</retainRttRtMap>
            </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 link-state
  retain route-target route-map map1

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.

MODN
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 NameData TypeDescriptionValues
asnbgp:AsnNum
(string:Basic)
Autonomous system numberA 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 NameData TypeDescriptionValues
namenaming: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 NameData TypeDescriptionValues
retainRttAllbgp:AdminSt
(scalar:Enum8)
Retain Route Target AllSELECTION:
1 - enabled
2 - disabled
DEFAULT: disabled
retainRttRtMapstring:Basic
Retain Route Target Route MapA sequence of characters
typebgp:AfT
(scalar:Enum8)
TypeSELECTION:
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:

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 Target VPN Extended Communities Configured to a Specific Route Map

Deleting Target VPN Extended Communities Configured to a Specific Route Map
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
  "topSystem": {
    "children": [
      {
        "bgpEntity": {
          "children": [
            {
              "bgpInst": {
                "attributes": {
                  "asn": "100"
                },
                "children": [
                  {
                    "bgpDom": {
                      "attributes": {
                        "name": "default"
                      },
                      "children": [
                        {
                          "bgpDomAf": {
                            "attributes": {
                              "retainRttAll": "disabled",
                              "retainRttRtMap": "map1",
                              "type": "lnkstate"
                            }
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <bgp-items>
    <inst-items>
      <asn>100</asn>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <af-items>
            <DomAf-list>
              <type>lnkstate</type>
              <retainRttAll>disabled</retainRttAll>
              <retainRttRtMap>map1</retainRttRtMap>
            </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 link-state
  no retain route-target route-map map1

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.

MODN
topSystem sys
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 NameData TypeDescriptionValues
asnbgp:AsnNum
(string:Basic)
Autonomous system numberA 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 NameData TypeDescriptionValues
namenaming: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 NameData TypeDescriptionValues
retainRttAllbgp:AdminSt
(scalar:Enum8)
Retain Route Target AllSELECTION:
1 - enabled
2 - disabled
DEFAULT: disabled
retainRttRtMapstring:Basic
Retain Route Target Route MapA sequence of characters
typebgp:AfT
(scalar:Enum8)
TypeSELECTION:
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:

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