Configuring BGP Session Templates Under a BGP Neighbor (IP Address)

Configuring BGP Session Templates

Configuring BGP Session Templates
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
              "bgpInst": {
                "attributes": {
                  "asn": "100"
                },
                "children": [
                  {
                    "bgpDom": {
                      "attributes": {
                        "name": "default"
                      },
                      "children": [
                        {
                          "bgpPeer": {
                            "attributes": {
                              "addr": "192.168.1.2",
                              "asn": "65536",
                              "inheritContPeerCtrl": "",
                              "name": "Peer Router A",
                              "sessionContImp": "BaseSession"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <bgp-items>
    <inst-items>
      <asn>100</asn>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <peer-items>
            <Peer-list>
              <addr>192.168.1.2</addr>
              <asn>65536</asn>
              <inheritContPeerCtrl></inheritContPeerCtrl>
              <name>Peer Router A</name>
              <sessionContImp>BaseSession</sessionContImp>
            </Peer-list>
          </peer-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </bgp-items>
</System>

Adds a description for the neighbor.


CLI Commands

The CLI commands and options 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 or the YANG tab to view the XML payload.

router bgp 100
 neighbor 192.168.1.2 remote-as 65536
  inherit peer-session BaseSession
  description Peer Router A

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
bgpInst sys/bgp/inst
bgpDom sys/bgp/inst/dom-{name}
bgpPeer sys/bgp/inst/dom-{name}/peer-{[addr]}


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


bgpPeer Properties

The following table contains information about the bgpPeer 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
addraddress:Ip
Peer addressValue must match ipv4 or ipv6 known format
asnstring:Basic
Autonomous System Number, takes value from (1-4294967295 \ 1-65535[.(0-65535)])
inheritContPeerCtrlbgp:InheritContPeerCtrlType
(scalar:Bitmask64)
Inherit control of peer parametersSELECTION:
1 - shutdown
2 - remote-as
4 - conn-mode
8 - bfd
16 - dis-conn-check
32 - cap-neg-off
64 - description
128 - timer
256 - password
512 - source-interface
1024 - ttl
2048 - ipv4-ucast
4096 - ipv4-mcast
8192 - epe
16384 - ipv6-ucast
32768 - ipv6-mcast
65536 - no-dyn-cap
131072 - local-as
262144 - remove-private-as
524288 - ipv4-lucast
1048576 - ipv6-lucast
2097152 - lnkstate
4194304 - log-nbr-chgs
8388608 - peer-type
16777216 - ipv4-mvpn
33554432 - ipv6-mvpn
67108864 - low-memory-exempt
134217728 - cap-suppr-4-byte-as
268435456 - l2vpn-evpn
536870912 - aff-grp
2147483648 - vpnv4-ucast
8589934592 - vpnv6-ucast
34359738368 - security-hops
137438953472 - bmp-activate-server-1
274877906944 - bmp-activate-server-2
549755813888 - dscp
1099511627776 - gshut-activate
2199023255552 - ipv4-mdt
4398046511104 - mhop-intvl
8796093022208 - mhop-auth
namenaming:Name256
(string:Basic)
The name of the object.
MAX SIZE: 63
sessionContImpstring:Basic
Peer Session Template To Import FromA sequence of characters


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

Updating a BGP Peer

Updating a BGP Peer
POST http://<IP_address>/api/mo/sys/bgp/inst.json
{
  "bgpInst": {
    "attributes": {
      "asn": "100"
    },
    "children": [
      {
        "bgpDom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "bgpPeer": {
                "attributes": {
                  "addr": "192.168.1.2",
                  "ttl": "10",
                  "asn": "65536",
                  "inheritContPeerCtrl": "",
                  "name": "Peer Router A",
                  "sessionContImp": "BaseSession"
}}}]}}]}}
<System>
  <bgp-items>
    <inst-items>
      <asn>100</asn>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <peer-items>
            <Peer-list>
              <addr>192.168.1.2</addr>
              <asn>65536</asn>
              <inheritContPeerCtrl></inheritContPeerCtrl>
              <name>Peer Router A</name>
              <sessionContImp>BaseSession</sessionContImp>
              <ttl>10</ttl>
            </Peer-list>
          </peer-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </bgp-items>
</System>

Configures the eBGP TTL value for eBGP multihop. The range is from 2 to 255. You must manually reset the BGP sessions after using this command.


CLI Commands

The CLI commands and options 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 or the YANG tab to view the XML payload.

router bgp 100
 neighbor 192.168.1.2
  inherit peer-session BaseSession
  remote-as 65536
  description Peer Router A
  ebgp-multihop 10

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
bgpInst sys/bgp/inst
bgpDom sys/bgp/inst/dom-{name}
bgpPeer sys/bgp/inst/dom-{name}/peer-{[addr]}


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


bgpPeer Properties

The following table contains information about the bgpPeer 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
addraddress:Ip
Peer addressValue must match ipv4 or ipv6 known format
ttlbgp:TtlVal
(scalar:Uint16)
eBGP Multihop TTL value
RANGE: [0 , 255]
asnstring:Basic
Autonomous System Number, takes value from (1-4294967295 \ 1-65535[.(0-65535)])
inheritContPeerCtrlbgp:InheritContPeerCtrlType
(scalar:Bitmask64)
Inherit control of peer parametersSELECTION:
1 - shutdown
2 - remote-as
4 - conn-mode
8 - bfd
16 - dis-conn-check
32 - cap-neg-off
64 - description
128 - timer
256 - password
512 - source-interface
1024 - ttl
2048 - ipv4-ucast
4096 - ipv4-mcast
8192 - epe
16384 - ipv6-ucast
32768 - ipv6-mcast
65536 - no-dyn-cap
131072 - local-as
262144 - remove-private-as
524288 - ipv4-lucast
1048576 - ipv6-lucast
2097152 - lnkstate
4194304 - log-nbr-chgs
8388608 - peer-type
16777216 - ipv4-mvpn
33554432 - ipv6-mvpn
67108864 - low-memory-exempt
134217728 - cap-suppr-4-byte-as
268435456 - l2vpn-evpn
536870912 - aff-grp
2147483648 - vpnv4-ucast
8589934592 - vpnv6-ucast
34359738368 - security-hops
137438953472 - bmp-activate-server-1
274877906944 - bmp-activate-server-2
549755813888 - dscp
1099511627776 - gshut-activate
2199023255552 - ipv4-mdt
4398046511104 - mhop-intvl
8796093022208 - mhop-auth
namenaming:Name256
(string:Basic)
The name of the object.
MAX SIZE: 63
sessionContImpstring:Basic
Peer Session Template To Import FromA sequence of characters


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