Configuring a BGP Neighbor
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 a BGP Neighbor
Configuring a BGP Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
}}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
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 20.1.1.1
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
Inheriting a Peer Policy Template
Inheriting a Peer Policy Template
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": "",
"peerImp": "20.1.1.2"
}}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<peerImp>20.1.1.2</peerImp>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
inherit peer 20.1.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
Configuring the Autonomous System Number of the Neighbor
Configuring the Autonomous System Number of the Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"asn": "200",
"inheritContPeerCtrl": ""
}}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<asn>200</asn>
<inheritContPeerCtrl></inheritContPeerCtrl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
remote-as 200
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 Log Message for Neighbor Up/Down Events
Configuring a Log Message for Neighbor Up/Down Events
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": "",
"logNbrChgs": "enable"
}}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<logNbrChgs>enable</logNbrChgs>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Logs a message for a neighbor up/down events.
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
log-neighbor-changes
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 the Local-as Number for the eBGP Neighbor
Configuring the Local-as Number for the eBGP Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpLocalAsn": {
"attributes": {
"asnPropagate": "none",
"localAsn": "100"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<localasn-items>
<asnPropagate>none</asnPropagate>
<localAsn>100</localAsn>
</localasn-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the local-as.
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
local-as 100
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
Creating a Neighbor-Specific Description
Creating a Neighbor-Specific Description
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpLocalAsn": {
"attributes": {
"asnPropagate": "none",
"localAsn": "100"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<name>nx-oc-bgp</name>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Adds a description to a specified neighbor.
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
description nx-oc-bgp
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
Removing a Private AS Number from Outbound Updates
Removing a Private AS Number from Outbound Updates
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": "",
"privateASctrl": "replace-as"
}}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<privateASctrl>replace-as</privateASctrl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Replaces all private AS numbers with the replace-as AS-path value.
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
remove-private-as replace-as
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 Multihop TTL for a Remote Peer (Neighbor)
Configuring Multihop TTL for a Remote Peer (Neighbor)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": "",
"ttl": "2"
}}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<ttl>2</ttl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures a multihop TTL for a remote peer.
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
ebgp-multihop 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
Configuring the BGP Transport Connection as Passive Only (Neighbor)
Configuring the BGP Transport Connection as Passive Only (Neighbor)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"connMode": "passive",
"inheritContPeerCtrl": ""
}}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<connMode>passive</connMode>
<inheritContPeerCtrl></inheritContPeerCtrl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Allows a passive connection setup only.
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
transport connection-mode passive
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 the Keepalive and Hold Timers (Neighbor)
Configuring the Keepalive and Hold Timers (Neighbor)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"holdIntvl": "90",
"inheritContPeerCtrl": "",
"kaIntvl": "70"
}}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<holdIntvl>90</holdIntvl>
<inheritContPeerCtrl></inheritContPeerCtrl>
<kaIntvl>70</kaIntvl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Adds the keepalive and hold time BGP timer values for the neighbor. The range is from 0 to 3600 seconds. The default is 60 seconds for the keepalive time and 180 seconds for the hold time.
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
timers 70 90
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 IPv4 Unicast Sub-Address Family (Neighbor)
Configuring an IPv4 Unicast Sub-Address Family (Neighbor)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"type": "ipv4-ucast"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Enters neighbor address family configuration mode.
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 20.1.1.1
address-family ipv4 unicast
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
Send Community Attribute to this Neighbor
Send Community Attribute to this Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"sendComStd": "enabled",
"type": "ipv4-ucast"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<sendComStd>enabled</sendComStd>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Sends the community attribute to this BGP peer. This command triggers an automatic soft clear or refresh of BGP neighbor sessions.
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
address-family ipv4 unicast
send-community
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 the Maximum Number of Prefixes from this Neighbor
Configuring the Maximum Number of Prefixes from this Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"type": "ipv4-ucast"
},
"children": [
{
"bgpMaxPfxP": {
"attributes": {
"action": "restart",
"maxPfx": "10",
"restartTime": "12",
"thresh": "11"
}}}]}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<maxpfxp-items>
<action>restart</action>
<maxPfx>10</maxPfx>
<restartTime>12</restartTime>
<thresh>11</thresh>
</maxpfxp-items>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the maximum number of prefixes from a peer.
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
address-family ipv4 unicast
maximum-prefix 10 11 restart 12
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 the Advertisement Interval on a Neighbor
Configuring the Advertisement Interval on a Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"advIntvl": "80",
"inheritContPeerPolicyCtrl": "",
"type": "ipv4-ucast"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<advIntvl>80</advIntvl>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Sets the interval time in seconds between sending advertisement frames. The range is from 1 to 255. The default is 1 second.
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
address-family ipv4 unicast
advertisement-interval 80
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
Originating a Default Toward this Peer (Neighbor)
Originating a Default toward this Peer (Neighbor)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"defOrg": "enabled",
"defOrgRtMap": "",
"inheritContPeerPolicyCtrl": "",
"type": "ipv4-ucast"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<defOrg>enabled</defOrg>
<defOrgRtMap></defOrgRtMap>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Generates a default route to the BGP peer.
Note: This example was added in Release 7.0(3)I6(1).
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 20.1.1.1
address-family ipv4 unicast
default-originate
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 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
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
Updating a BGP Peer
This example issues a POST request to update an existing 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
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
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 Fabric Border Leaf for a Neighbor
Configuring a Fabric Border Leaf for a Neighbor
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": "",
"peerType": "fabric-border-leaf"
}}}]}}]}}
{
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>
<peerType>fabric-border-leaf</peerType>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures a fabric border leaf for a neighbor
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
neighbor 1.2.3.4
peer-type fabric-border-leaf
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 BGP Peer
Deleting a BGP Peer
DELETE http://<mgmt0_IP>/api/mo/sys/bgp/inst/dom-default.json
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.1.1.1",
"status": "deleted"
}}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list xc:operation="delete">
<addr>1.1.1.1</addr>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Deletes a BGP peer.
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
no neighbor 1.1.1.1
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