Configuring a Peer-Policy Template
You can configure a peer-policy template to define attributes for a particular address family. You assign a preference to each peer-policy template and these templates are inherited in the order specified, for up to five peer-policy templates in a neighbor address family. Cisco NX-OS evaluates multiple peer policies for an address family using the preference value. The lowest preference value is evaluated first. Any attributes configured for the neighbor take priority over any attributes inherited by that neighbor from a BGP template. Peer-policy templates can configure address family-specific attributes such as AS-path filter lists, prefix lists, route reflection, and soft reconfiguration.
For more information, see the Cisco Nexus 9000 NX-OS Unicast Routing Configuration Guide:
Disabling Route Advertisement with Local Label to Peer (For a Peer Policy Template)
Disabling Route Advertisement with Local Label to Peer (For a Peer Polic Template)
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPolicyCont": {
"attributes": {
"advLocalLblRt": "disabled",
"inheritContPeerPolicyCtrl": "",
"name": "pol"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<policycont-items>
<PolicyCont-list>
<name>pol</name>
<advLocalLblRt>disabled</advLocalLblRt>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PolicyCont-list>
</policycont-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
template peer-policy pol
no advertise local-labeled-route
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 |
bgpPolicyCont | sys/bgp/inst/dom-default/policycont-pol |
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. |
bgpPolicyCont Properties
The following table contains information about the bgpPolicyCont 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 |
---|---|---|---|
advLocalLblRt | nw:AdminSt (scalar:Enum8) | Advertise a route with local label to peer | SELECTION: 1 - enabled 2 - disabled DEFAULT: enabled |
inheritContPeerPolicyCtrl | bgp:InheritContPeerPolicyCtrlType (scalar:Bitmask64) | Inherit control of peer policy parameters | SELECTION: 1 - allow-as-in 2 - send-com-std 4 - rr-client 8 - nh-self 16 - dis-peer-as-check 32 - soft-reconfig-in 64 - max-prefix 128 - route-map-in 256 - route-map-out 512 - prefix-map-in 1024 - prefix-map-out 2048 - fltr-map-in 4096 - fltr-map-out 8192 - unsuppr-map 16384 - default-originate 32768 - advertisement-interval 65536 - addl-paths-send-cap 131072 - addl-paths-recv-cap 262144 - send-com-ext 524288 - suppress-inactive 1048576 - as-override 2097152 - next-hop-third-party 4194304 - wght 8388608 - soo 16777216 - advt-map 33554432 - encap-mpls 67108864 - rewrite-rt-asn 134217728 - adv-gw-ip 268435456 - adv-loc-lbl-rt 536870912 - nh-self-all |
name | naming:Name256 string:Basic | The name of the object. |
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: