BGP
Create BGP instance
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
Use this XML config to start a BGP process with the associated. autonomous system number and router-id.
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<config>
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.2.3.4</router-id>
</config>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
OcNOS CLI Command
router bgp 100
bgp router-id 1.2.3.4
OcNOS NETCONF Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>default</instance-name>
<instance-type>vrf</instance-type>
<config>
<instance-name>default</instance-name>
<instance-type>vrf</instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<config>
<vrf-name>default</vrf-name>
</config>
</vrf>
</network-instance>
</network-instances>
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>100</bgp-as>
<config>
<bgp-as>100</bgp-as>
<router-id>1.2.3.4</router-id>
</config>
</bgp-instance>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<state>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
</state>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.2.3.4</router-id>
</config>
<state>
<as>100</as>
</state>
<global>
<state>
<router-id>1.2.3.4</router-id>
</state>
</global>
</global>
</bgp>
<state>
<enabled>true</enabled>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
</state>
</protocol>
</protocols>
</network-instance>
</network-instances>
Restrictions
/network-instances/network-instance/protocols/protocol/name
For BGP instances this leaf must have the same number of the /network-instances/network-instance/protocols/protocol/bgp/global/config/as.
Create BGP Global with default VRF
Release
This configuration was introduced in OcNOS version 6.2.
Configuration
Use the payloads indicate in this chapter to configure BGP Global with default VRF data from the Open Config perspective.
The AFI-SAFI container is needed to be available on the configuration applied to help configure address-families.
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<add-paths>
<config>
<receive>true</receive>
<send>true</send>
<send-max>2</send-max>
</config>
</add-paths>
<use-multiple-paths>
<ibgp>
<config>
<maximum-paths>7</maximum-paths>
</config>
</ibgp>
</use-multiple-paths>
</afi-safi>
</afi-safis>
<confederation>
<config>
<member-as>48</member-as>
<identifier>600</identifier>
</config>
</confederation>
<config>
<as>100</as>
<router-id>1.2.3.4</router-id>
</config>
<route-selection-options>
<config>
<enable-aigp>false</enable-aigp>
<ignore-as-path-length>true</ignore-as-path-length>
<external-compare-router-id>true</external-compare-router-id>
</config>
</route-selection-options>
<graceful-restart>
<config>
<restart-time>100</restart-time>
<stale-routes-time>300.00</stale-routes-time>
<helper-only>false</helper-only>
</config>
</graceful-restart>
</global>
<neighbors>
<neighbor>
<neighbor-address>10.1.1.2</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<enabled>true</enabled>
<neighbor-address>10.1.1.2</neighbor-address>
<peer-as>100</peer-as>
</config>
</neighbor>
</neighbors>
</bgp>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
</protocol>
</protocols>
<tables>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
</tables>
</network-instance>
</network-instances>
OcNOS CLI Command
router bgp 100
bgp router-id 1.2.3.4
bgp confederation identifier 600
bgp confederation peers 48
bgp bestpath as-path ignore
bgp bestpath aigp ignore
bgp bestpath compare-routerid
bgp graceful-restart restart-time 100
bgp graceful-restart stalepath-time 300
bgp graceful-restart graceful-reset
neighbor 10.1.1.2 remote-as 100
!
address-family ipv4 unicast
bgp additional-paths send-receive
bgp additional-paths select best 2
max-paths ibgp 7
neighbor 10.1.1.2 activate
exit-address-family
!
OcNOS NETCONF Payload
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>100</bgp-as>
<config>
<bgp-as>100</bgp-as>
<router-id>1.2.3.4</router-id>
<ignore-aigp-for-bestpath/>
</config>
<graceful-restart>
<config>
<restart-time>100</restart-time>
<stale-path-max-retention-time>300</stale-path-max-retention-time>
<graceful-reset/>
</config>
</graceful-restart>
<route-selection>
<config>
<ignore-as-path-length/>
<external-compare-router-id/>
</config>
</route-selection>
<address-family>
<afi>ipv4</afi>
<safi>unicast</safi>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
<additional-paths-best-select-count>2</additional-paths-best-select-count>
<additional-paths-mode>receive send</additional-paths-mode>
</config>
<maximum-paths>
<config>
<ibgp-max-path>7</ibgp-max-path>
</config>
</maximum-paths>
</address-family>
<peer>
<peer-address>10.1.1.2</peer-address>
<address-family>
<afi>ipv4</afi>
<safi>unicast</safi>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
<activate/>
</config>
</address-family>
<config>
<confederation-identifier>600</confederation-identifier>
<peer-address>10.1.1.2</peer-address>
<peer-as>100</peer-as>
<peer-as-number>48</peer-as-number>
</config>
</peer>
</bgp-instance>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<state>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</state>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
<add-paths>
<config>
<receive>true</receive>
<send>true</send>
<send-max>2</send-max>
</config>
<state>
<receive>true</receive>
<send>true</send>
<send-max>2</send-max>
</state>
</add-paths>
<use-multiple-paths>
<ibgp>
<config>
<maximum-paths>7</maximum-paths>
</config>
<state>
<maximum-paths>7</maximum-paths>
</state>
</ibgp>
</use-multiple-paths>
</afi-safi>
</afi-safis>
<confederation>
<config>
<member-as>48</member-as>
<identifier>600</identifier>
</config>
<state>
<member-as>48</member-as>
<identifier>600</identifier>
</state>
</confederation>
<config>
<as>100</as>
<router-id>1.2.3.4</router-id>
</config>
<route-selection-options>
<config>
<enable-aigp>false</enable-aigp>
<ignore-as-path-length>true</ignore-as-path-length>
<external-compare-router-id>true</external-compare-router-id>
</config>
<state>
<enable-aigp>false</enable-aigp>
<ignore-as-path-length>true</ignore-as-path-length>
<external-compare-router-id>true</external-compare-router-id>
</state>
</route-selection-options>
<state>
<as>100</as>
<router-id>1.2.3.4</router-id>
<total-prefixes>0</total-prefixes>
</state>
<graceful-restart>
<config>
<restart-time>100</restart-time>
<stale-routes-time>300.00</stale-routes-time>
<helper-only>false</helper-only>
</config>
<state>
<restart-time>100</restart-time>
<stale-routes-time>300.00</stale-routes-time>
<helper-only>false</helper-only>
</state>
</graceful-restart>
</global>
<neighbors>
<neighbor>
<neighbor-address>10.1.1.2</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
</afi-safi>
</afi-safis>
<config>
<enabled>true</enabled>
<neighbor-address>10.1.1.2</neighbor-address>
<peer-as>100</peer-as>
</config>
<state>
<enabled>true</enabled>
<neighbor-address>10.1.1.2</neighbor-address>
<peer-as>100</peer-as>
</state>
</neighbor>
</neighbors>
</bgp>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
<state>
<enabled>true</enabled>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
</state>
</protocol>
</protocols>
<tables>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</state>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</state>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</state>
</table>
</tables>
<interfaces>
<interface>
<id>eth0</id>
<config>
<id>eth0</id>
<interface>eth0</interface>
</config>
</interface>
<interface>
<id>eth1</id>
<config>
<id>eth1</id>
<interface>eth1</interface>
</config>
</interface>
<interface>
<id>eth2</id>
<config>
<id>eth2</id>
<interface>eth2</interface>
</config>
</interface>
<interface>
<id>eth3</id>
<config>
<id>eth3</id>
<interface>eth3</interface>
</config>
</interface>
<interface>
<id>eth4</id>
<config>
<id>eth4</id>
<interface>eth4</interface>
</config>
</interface>
<interface>
<id>eth5</id>
<config>
<id>eth5</id>
<interface>eth5</interface>
</config>
</interface>
<interface>
<id>eth6</id>
<config>
<id>eth6</id>
<interface>eth6</interface>
</config>
</interface>
<interface>
<id>eth7</id>
<config>
<id>eth7</id>
<interface>eth7</interface>
</config>
</interface>
<interface>
<id>eth8</id>
<config>
<id>eth8</id>
<interface>eth8</interface>
</config>
</interface>
<interface>
<id>lo</id>
<config>
<id>lo</id>
<interface>lo</interface>
</config>
</interface>
</interfaces>
</network-instance>
</network-instances>
Restrictions
On the first time /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global paths are configured, those configuration need that respective AFI-SAFI configuration must be present to indicate AFI type:
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global/afi-safis
this information is necessary for the OcNOS model to generate the following paths:
/ipi-bgp:bgp/bgp-instance/address-family
/ipi-bgp:bgp/bgp-instance/peer-group/address-families
/ipi-bgp:bgp/bgp-instance/address-family-vrf
After the /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global paths are configured on equipment, on the further configurations on those paths the user does not need to indicate the AFI-SAFI, the translation will look for this information on the equipment database.
For multiple paths configuration, the Open Config path /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global/use-multiple-paths is not support, all the multiple paths configurations are done on Open Config path /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths.This is because the OcNOS datamodel only handle multiple paths is one place.
The containers graceful-restart and route-selection-options are configurable only by network-instance instance named “default”.
The Open Config attributes:
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global/graceful-restart/state/helper-only
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global/route-selection-options/config/enable-aigp
Have their logic inverted, so a "false" value on open-config means a "true" value on OcNOS datamodel.
Create BGP Global with user-defined VRFs
Release
This configuration was introduced in OcNOS version 6.2.
Configuration
Use the payloads indicate in this chapter to configure BGP Global with user-defined VRF data from the Open Config perspective.
The AFI-SAFI container is needed to be available on the configuration applied to help configure address-families.
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.2.3.4</router-id>
</config>
<route-selection-options>
<config>
<enable-aigp>false</enable-aigp>
<ignore-as-path-length>true</ignore-as-path-length>
<external-compare-router-id>true</external-compare-router-id>
</config>
</route-selection-options>
<graceful-restart>
<config>
<restart-time>100</restart-time>
<stale-routes-time>300.00</stale-routes-time>
<helper-only>false</helper-only>
</config>
</graceful-restart>
</global>
</bgp>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
</protocol>
</protocols>
</network-instance>
<network-instance>
<name>red</name>
<config>
<name>red</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<route-distinguisher>100:200</route-distinguisher>
</config>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.2.3.4</router-id>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<use-multiple-paths>
<ebgp>
<config>
<maximum-paths>10</maximum-paths>
</config>
</ebgp>
<ibgp>
<config>
<maximum-paths>15</maximum-paths>
</config>
</ibgp>
</use-multiple-paths>
</afi-safi>
</afi-safis>
<confederation>
<config>
<member-as>48</member-as>
<identifier>600</identifier>
</config>
</confederation>
</global>
</bgp>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
</protocol>
</protocols>
</network-instance>
</network-instances>
OcNOS CLI Commands
ip vrf red
rd 100:200
!
router bgp 100
bgp router-id 1.2.3.4
bgp bestpath as-path ignore
bgp bestpath aigp ignore
bgp bestpath compare-routerid
bgp graceful-restart restart-time 100
bgp graceful-restart stalepath-time 300
bgp graceful-restart graceful-reset
!
address-family ipv4 vrf red
max-paths ebgp 10
max-paths ibgp 15
bgp confederation identifier 600
bgp confederation peers 48
exit-address-family
!
OcNOS NETCONF Payload
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>100</bgp-as>
<config>
<bgp-as>100</bgp-as>
<router-id>1.2.3.4</router-id>
<ignore-aigp-for-bestpath/>
</config>
<graceful-restart>
<config>
<restart-time>100</restart-time>
<stale-path-max-retention-time>300</stale-path-max-retention-time>
<graceful-reset/>
</config>
</graceful-restart>
<route-selection>
<config>
<ignore-as-path-length/>
<external-compare-router-id/>
</config>
</route-selection>
<address-family-vrf>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>red</vrf-name>
<confederation>
<identifier>600</identifier>
<peer-as-number>48</peer-as-number>
</confederation>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>red</vrf-name>
</config>
<maximum-paths>
<config>
<ebgp-max-path>10</ebgp-max-path>
<ibgp-max-path>15</ibgp-max-path>
</config>
</maximum-paths>
</address-family-vrf>
</bgp-instance>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<state>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</state>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.2.3.4</router-id>
</config>
<route-selection-options>
<config>
<enable-aigp>false</enable-aigp>
<ignore-as-path-length>true</ignore-as-path-length>
<external-compare-router-id>true</external-compare-router-id>
</config>
<state>
<enable-aigp>false</enable-aigp>
<ignore-as-path-length>true</ignore-as-path-length>
<external-compare-router-id>true</external-compare-router-id>
</state>
</route-selection-options>
<state>
<as>100</as>
<router-id>1.2.3.4</router-id>
<total-prefixes>0</total-prefixes>
</state>
<graceful-restart>
<config>
<restart-time>100</restart-time>
<stale-routes-time>300.00</stale-routes-time>
<helper-only>false</helper-only>
</config>
<state>
<restart-time>100</restart-time>
<stale-routes-time>300.00</stale-routes-time>
<helper-only>false</helper-only>
</state>
</graceful-restart>
</global>
</bgp>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
<state>
<enabled>true</enabled>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
</state>
</protocol>
</protocols>
<tables>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</state>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</state>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
</tables>
</network-instance>
<network-instance>
<name>red</name>
<config>
<name>red</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<route-distinguisher>100:200</route-distinguisher>
</config>
<state>
<name>red</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<route-distinguisher>100:200</route-distinguisher>
</state>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
<router-id>1.2.3.4</router-id>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
</state>
<use-multiple-paths>
<ebgp>
<config>
<maximum-paths>10</maximum-paths>
</config>
<state>
<maximum-paths>10</maximum-paths>
</state>
</ebgp>
<ibgp>
<config>
<maximum-paths>15</maximum-paths>
</config>
<state>
<maximum-paths>15</maximum-paths>
</state>
</ibgp>
</use-multiple-paths>
</afi-safi>
</afi-safis>
<confederation>
<config>
<member-as>48</member-as>
<identifier>600</identifier>
</config>
<state>
<member-as>48</member-as>
<identifier>600</identifier>
</state>
</confederation>
<state>
<as>100</as>
<router-id>1.2.3.4</router-id>
</state>
</global>
</bgp>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
<state>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</state>
</protocol>
</protocols>
<tables>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</state>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</state>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</state>
</table>
</tables>
</network-instance>
</network-instances>
Restrictions
The /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/add-paths are available only on network-instance instance named “default”.
The container /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global/graceful-restart are available only on network-instance instance named “default”.
The container /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global/route-selection-options are available only on network-instance instance named “default”.
On the first time /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global paths are configured, those configuration needs the respective AFI-SAFI configuration that be present to indicate AFI type:
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global/afi-safis
this information is necessary for the OcNOS model to generate the following paths:
/ipi-bgp:bgp/bgp-instance/address-family
/ipi-bgp:bgp/bgp-instance/peer-group/address-families
/ipi-bgp:bgp/bgp-instance/address-family-vrf
After the /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global paths are configured on equipment, on the further configurations on those paths the user does not need to indicate the AFI-SAFI, the translation will look for this information on the equipment database.
Create BGP neighbors
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
Use this XML command to configure neighbors in non-default VRF of BGP.
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>123</name>
<bgp>
<global>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<as>123</as>
</config>
</global>
<neighbors>
<neighbor>
<neighbor-address>10.1.1.1</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<ipv4-unicast>
<config>
<send-default-route>true</send-default-route>
</config>
<prefix-limit>
<config>
<max-prefixes>5</max-prefixes>
<warning-threshold-pct>60</warning-threshold-pct>
</config>
</prefix-limit>
</ipv4-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<graceful-restart>
<config>
<enabled>true</enabled>
</config>
</graceful-restart>
</afi-safi>
</afi-safis>
<config>
<enabled>true</enabled>
<remove-private-as
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:PRIVATE_AS_REMOVE_ALL</remove-private-as>
<neighbor-address>10.1.1.1</neighbor-address>
<peer-as>100</peer-as>
<local-as>300</local-as>
</config>
<enable-bfd>
<config>
<enabled>true</enabled>
</config>
</enable-bfd>
<transport>
<config>
<local-address>eth1</local-address>
</config>
</transport>
<timers>
<config>
<keepalive-interval>30.00</keepalive-interval>
<hold-time>120.00</hold-time>
</config>
</timers>
<ebgp-multihop>
<config>
<multihop-ttl>5</multihop-ttl>
<enabled>true</enabled>
</config>
</ebgp-multihop>
</neighbor>
<neighbor>
<neighbor-address>11.1.1.1</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<ipv4-unicast>
<prefix-limit>
<config>
<max-prefixes>7</max-prefixes>
<warning-threshold-pct>70</warning-threshold-pct>
<prevent-teardown>true</prevent-teardown>
</config>
</prefix-limit>
</ipv4-unicast>
<apply-policy>
<config>
<import-policy>rmap1</import-policy>
<export-policy>rmap1</export-policy>
</config>
</apply-policy>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<add-paths>
<config>
<receive>true</receive>
<send>true</send>
</config>
</add-paths>
</afi-safi>
</afi-safis>
<config>
<enabled>true</enabled>
<neighbor-address>11.1.1.1</neighbor-address>
<peer-as>123</peer-as>
</config>
</neighbor>
</neighbors>
</bgp>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>123</name>
<enabled>true</enabled>
</config>
</protocol>
</protocols>
<tables>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
</tables>
</network-instance>
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<route-distinguisher>1.2.3.4:56</route-distinguisher>
</config>
<protocols>
<protocol>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
</protocol>
<protocol>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>123</name>
<bgp>
<global>
<config>
<as>123</as>
</config>
</global>
<neighbors>
<neighbor>
<neighbor-address>20.1.1.2</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<apply-policy>
<config>
<import-policy>rmap2</import-policy>
<export-policy>rmap2</export-policy>
</config>
</apply-policy>
<ipv4-unicast>
<config>
<send-default-route>true</send-default-route>
</config>
</ipv4-unicast>
</afi-safi>
</afi-safis>
<config>
<neighbor-address>20.1.1.2</neighbor-address>
<remove-private-as xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:PRIVATE_AS_REMOVE_ALL</remove-private-as>
<description>ebgp_VRF1</description>
<local-as>300</local-as>
<peer-as>200</peer-as>
</config>
</neighbor>
<neighbor>
<neighbor-address>21.1.1.2</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<ipv4-unicast>
<prefix-limit>
<config>
<max-prefixes>5</max-prefixes>
<warning-threshold-pct>80</warning-threshold-pct>
<prevent-teardown>true</prevent-teardown>
</config>
</prefix-limit>
</ipv4-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<graceful-restart>
<config>
<enabled>true</enabled>
</config>
</graceful-restart>
</afi-safi>
</afi-safis>
<config>
<neighbor-address>21.1.1.2</neighbor-address>
<peer-as>123</peer-as>
<enabled>true</enabled>
</config>
</neighbor>
</neighbors>
</bgp>
<config>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>123</name>
<enabled>true</enabled>
</config>
</protocol>
</protocols>
<tables>
<table>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
<table>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
</table>
<table>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
</tables>
</network-instance>
</network-instances>
OcNOS CLI Command
ip vrf VRF1
rd 100:200
exit
router bgp 123
neighbor 10.1.1.1 remote-as 100
neighbor 10.1.1.1 local-as 300
neighbor 10.1.1.1 fall-over bfd
neighbor 11.1.1.1 remote-as 123
neighbor 10.1.1.1 ebgp-multihop 5
neighbor 10.1.1.1 update-source eth1
neighbor 10.1.1.1 timers 30 120
!
address-family ipv4 unicast
neighbor 10.1.1.1 activate
neighbor 10.1.1.1 remove-private-AS
neighbor 10.1.1.1 maximum-prefix 5 60
neighbor 10.1.1.1 capability graceful-restart
neighbor 10.1.1.1 default-originate
neighbor 11.1.1.1 activate
neighbor 11.1.1.1 additional-paths send-receive
neighbor 11.1.1.1 maximum-prefix 7 70 warning-only
neighbor 11.1.1.1 route-map rmap1 in
neighbor 11.1.1.1 route-map rmap1 out
exit-address-family
!
address-family ipv4 vrf VRF1
neighbor 20.1.1.2 remote-as 200
neighbor 20.1.1.2 local-as 300
neighbor 20.1.1.2 activate
neighbor 20.1.1.2 remove-private-AS
neighbor 20.1.1.2 route-map rmap2 in
neighbor 20.1.1.2 route-map rmap2 out
neighbor 20.1.1.2 default-originate
neighbor 21.1.1.2 remote-as 123
neighbor 21.1.1.2 activate
neighbor 21.1.1.2 maximum-prefix 5 80 warning-only
neighbor 21.1.1.2 capability graceful-restart
neighbor 20.1.1.2 description ebgp_VRF1
exit-address-family
!
OcNOS NETCONF Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
<config>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<config>
<vrf-name>VRF1</vrf-name>
</config>
<bgp-vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp-vrf">
<config>
<rd-string>100:200</rd-string>
</config>
</bgp-vrf>
</vrf>
</network-instance>
</network-instances>
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>123</bgp-as>
<config>
<bgp-as>123</bgp-as>
</config>
<address-family>
<afi>ipv4</afi>
<safi>unicast</safi>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
</config>
</address-family>
<peer>
<peer-address>10.1.1.1</peer-address>
<address-family>
<afi>ipv4</afi>
<safi>unicast</safi>
<maximum-prefixes>
<prefix-count>5</prefix-count>
<config>
<prefix-count>5</prefix-count>
<threshold-percentage>60</threshold-percentage>
</config>
</maximum-prefixes>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
<activate/>
<peer-remove-private-as/>
<capability-graceful-restart/>
<default-peer-route-map-name/>
</config>
</address-family>
<config>
<peer-address>10.1.1.1</peer-address>
<peer-as>100</peer-as>
<enable-peer-bfd/>
<peer-local-as>300</peer-local-as>
<source-identifier>eth1</source-identifier>
</config>
<timers>
<config>
<keep-alive>30</keep-alive>
<hold-time>120</hold-time>
</config>
</timers>
<ebgp-multihop>
<config>
<maximum-hop-count>5</maximum-hop-count>
<enabled/>
</config>
</ebgp-multihop>
</peer>
<peer>
<peer-address>11.1.1.1</peer-address>
<address-family>
<afi>ipv4</afi>
<safi>unicast</safi>
<maximum-prefixes>
<prefix-count>7</prefix-count>
<config>
<prefix-count>7</prefix-count>
<threshold-percentage>70</threshold-percentage>
<warning-only/>
</config>
</maximum-prefixes>
<route-map-filter>
<route-map-direction>in</route-map-direction>
<config>
<route-map-direction>in</route-map-direction>
<route-map-name>rmap1</route-map-name>
</config>
</route-map-filter>
<route-map-filter>
<route-map-direction>out</route-map-direction>
<config>
<route-map-direction>out</route-map-direction>
<route-map-name>rmap1</route-map-name>
</config>
</route-map-filter>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
<additional-paths-mode>receive send</additional-paths-mode>
<activate/>
</config>
</address-family>
<config>
<peer-address>11.1.1.1</peer-address>
<peer-as>123</peer-as>
</config>
</peer>
<address-family-vrf>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>VRF1</vrf-name>
<vrf-peer>
<peer-address>20.1.1.2</peer-address>
<route-map-filter>
<route-map-direction>in</route-map-direction>
<config>
<route-map-direction>in</route-map-direction>
<route-map-name>rmap2</route-map-name>
</config>
</route-map-filter>
<route-map-filter>
<route-map-direction>out</route-map-direction>
<config>
<route-map-direction>out</route-map-direction>
<route-map-name>rmap2</route-map-name>
</config>
</route-map-filter>
<config>
<peer-address>20.1.1.2</peer-address>
<peer-as>200</peer-as>
<peer-local-as>300</peer-local-as>
<activate/>
<peer-remove-private-as/>
<default-peer-route-map-name/>
</config>
</vrf-peer>
<vrf-peer>
<peer-address>21.1.1.2</peer-address>
<maximum-prefixes>
<prefix-count>5</prefix-count>
<config>
<prefix-count>5</prefix-count>
<threshold-percentage>80</threshold-percentage>
<warning-only/>
</config>
</maximum-prefixes>
<config>
<peer-address>21.1.1.2</peer-address>
<peer-as>123</peer-as>
<activate/>
<capability-graceful-restart/>
</config>
</vrf-peer>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>VRF1</vrf-name>
</config>
</address-family-vrf>
</bgp-instance>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>123</name>
<bgp>
<global>
<config>
<as>123</as>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
</global>
<neighbors>
<neighbor>
<neighbor-address>10.1.1.1</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<ipv4-unicast>
<config>
<send-default-route>true</send-default-route>
</config>
<prefix-limit>
<config>
<max-prefixes>5</max-prefixes>
<warning-threshold-pct>60</warning-threshold-pct>
</config>
</prefix-limit>
</ipv4-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<graceful-restart>
<config>
<enabled>true</enabled>
</config>
</graceful-restart>
</afi-safi>
</afi-safis>
<config>
<enabled>true</enabled>
<neighbor-address>10.1.1.1</neighbor-address>
<peer-as>100</peer-as>
<local-as>300</local-as>
<remove-private-as
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:PRIVATE_AS_REMOVE_ALL</remove-private-as>
</config>
<enable-bfd>
<config>
<enabled>true</enabled>
</config>
</enable-bfd>
<ebgp-multihop>
<config>
<enabled>true</enabled>
<multihop-ttl>5</multihop-ttl>
</config>
</ebgp-multihop>
<transport>
<config>
<local-address>eth1</local-address>
</config>
</transport>
<timers>
<config>
<keepalive-interval>30.00</keepalive-interval>
<hold-time>120.00</hold-time>
</config>
</timers>
</neighbor>
<neighbor>
<neighbor-address>11.1.1.1</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<ipv4-unicast>
<prefix-limit>
<config>
<max-prefixes>7</max-prefixes>
<warning-threshold-pct>70</warning-threshold-pct>
<prevent-teardown>true</prevent-teardown>
</config>
</prefix-limit>
</ipv4-unicast>
<apply-policy>
<config>
<import-policy>rmap1</import-policy>
<export-policy>rmap1</export-policy>
</config>
</apply-policy>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<add-paths>
<config>
<receive>true</receive>
<send>true</send>
</config>
</add-paths>
</afi-safi>
</afi-safis>
<config>
<enabled>true</enabled>
<neighbor-address>11.1.1.1</neighbor-address>
<peer-as>123</peer-as>
</config>
</neighbor>
</neighbors>
</bgp>
</protocol>
</protocols>
</network-instance>
<network-instance>
<name>management</name>
</network-instance>
<network-instance>
<name>VRF1</name>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>123</name>
<bgp>
<global>
<config>
<as>123</as>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
</global>
<neighbors>
<neighbor>
<neighbor-address>20.1.1.2</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<apply-policy>
<config>
<import-policy>rmap2</import-policy>
<export-policy>rmap2</export-policy>
</config>
</apply-policy>
<ipv4-unicast>
<config>
<send-default-route>true</send-default-route>
</config>
</ipv4-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<apply-policy>
<config>
<import-policy>rmap2</import-policy>
<export-policy>rmap2</export-policy>
</config>
</apply-policy>
<config>
<neighbor-address>20.1.1.2</neighbor-address>
<peer-as>200</peer-as>
<local-as>300</local-as>
<enabled>true</enabled>
<remove-private-as
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:PRIVATE_AS_REMOVE_ALL</remove-private-as>
</config>
</neighbor>
<neighbor>
<neighbor-address>21.1.1.2</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<ipv4-unicast>
<prefix-limit>
<config>
<max-prefixes>5</max-prefixes>
<warning-threshold-pct>80</warning-threshold-pct>
<prevent-teardown>true</prevent-teardown>
</config>
</prefix-limit>
</ipv4-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<graceful-restart>
<config>
<enabled>true</enabled>
</config>
</graceful-restart>
</afi-safi>
</afi-safis>
<config>
<neighbor-address>21.1.1.2</neighbor-address>
<peer-as>123</peer-as>
<enabled>true</enabled>
</config>
</neighbor>
</neighbors>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
Restrictions
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/config/remove-private-as
This leaf must have this value PRIVATE_AS_REMOVE_ALL.
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/apply-policy
This leaf was not supported by the current implementation but this feature is supported at afi-safi level of each neighbor
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/graceful-restart
This leaf was not supported by the current implementation at neighbor level, but this feature is supported at afi-safi level of each neighbor as well as at global level /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global/graceful-restart
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/use-multiple-paths
This leaf was not supported by the current implementation at neighbor level, but this feature is supported at global level /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths
/network-instances/network-instance/interfaces/interface/config/id
This leaf is limited to 32 characters and must have the format “<interface>.<subinterface>”, e.g., eth2.10.
On the first time /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbor paths are configured, those configuration needs the respective AFI-SAFI configuration that be present to indicate AFI type:
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis
this information is necessary for the OcNOS model to generate the following paths:
/ipi-bgp:bgp/bgp-instance/address-family
/ipi-bgp:bgp/bgp-instance/peer-group/address-families
/ip.i-bgp:bgp/bgp-instance/address-family-vrf
After the /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors paths are configured on equipment, on the further configurations on those paths the user does not need to indicate the AFI-SAFI, the translation will look for this information on the equipment database.
Configure eBGP neighbor with TTL
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
Use this xml config to define the eBGP neighbor.
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<route-distinguisher>1.2.3.4:56</route-distinguisher>
</config>
<protocols>
<protocol>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
</protocol>
<protocol>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
</config>
</global>
<neighbors>
<neighbor>
<neighbor-address>1.1.1.2</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<neighbor-address>1.1.1.2</neighbor-address>
<peer-as>200</peer-as>
</config>
<ebgp-multihop>
<config>
<enabled>true</enabled>
<multihop-ttl>20</multihop-ttl>
</config>
</ebgp-multihop>
</neighbor>
</neighbors>
</bgp>
<config>
<identifier xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
</protocol>
</protocols>
<tables>
<table>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
<table>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
</table>
<table>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
</tables>
</network-instance>
</network-instances>
OcNOS CLI Command
router bgp 100
!
address-family ipv4 vrf VRF1
neighbor 1.1.1.2 remote-as 200
neighbor 1.1.1.2 activate
neighbor 1.1.1.2 ebgp-multihop 20
exit-address-family
!
OcNOS NETCONF Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
<config>
<instance-name>VRF1</instance-name>
<instance-type>vrf</instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<config>
<vrf-name>VRF1</vrf-name>
</config>
<bgp-vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp-vrf">
<config>
<rd-string>1.2.3.4:56</rd-string>
</config>
</bgp-vrf>
</vrf>
</network-instance>
</network-instances>
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>100</bgp-as>
<config>
<bgp-as>100</bgp-as>
</config>
<address-family-vrf>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>VRF1</vrf-name>
<vrf-peer>
<peer-address>1.1.1.2</peer-address>
<config>
<peer-address>1.1.1.2</peer-address>
<peer-as>200</peer-as>
</config>
<ebgp-multihop>
<config>
<maximum-hop-count>20</maximum-hop-count>
</enabled>
</config>
</ebgp-multihop>
</vrf-peer>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>VRF1</vrf-name>
</config>
</address-family-vrf>
</bgp-instance>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<config>
<name>VRF1</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<route-distinguisher>1.2.3.4:56</route-distinguisher>
</config>
<state>
<name>VRF1</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<enabled>true</enabled>
<route-distinguisher>1.2.3.4:56</route-distinguisher>
</state>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
</config>
<state>
<as>100</as>
</state>
</global>
<neighbors>
<neighbor>
<neighbor-address>1.1.1.2</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<neighbor-address>1.1.1.2</neighbor-address>
<peer-as>200</peer-as>
<enabled>true</enabled>
</config>
<ebgp-multihop>
<config>
<enabled>true</enabled>
<multihop-ttl>20</multihop-ttl>
</config>
<state>
<enabled>true</enabled>
<multihop-ttl>20</multihop-ttl>
</state>
</ebgp-multihop>
<state>
<neighbor-address>1.1.1.2</neighbor-address>
<peer-as>200</peer-as>
<enabled>true</enabled>
</state>
</neighbor>
</neighbors>
</bgp>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
<state>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</state>
</protocol>
</protocols>
<tables>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
</tables>
</network-instance>
</network-instances>
Restrictions
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/config/peer-type
This leaf was not supported
On the first time /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbor paths are configured, those configuration needs the respective AFI-SAFI configuration that be present to indicate AFI type:
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis
this information is necessary for the OcNOS model to generate the following paths:
/ipi-bgp:bgp/bgp-instance/address-family
/ipi-bgp:bgp/bgp-instance/peer-group/address-families
/ipi-bgp:bgp/bgp-instance/address-family-vrf
After the /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors paths are configured on equipment, on the further configurations on those paths the user does not need to indicate the AFI-SAFI, the translation will look for this information on the equipment database.
Create BGP peer-groups with default VRF
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Peer groups are configurations that can be used elsewhere without the need to repeat them.
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
</config>
<route-selection-options>
<config>
<enable-aigp>true</enable-aigp>
</config>
<state>
<enable-aigp>true</enable-aigp>
</state>
</route-selection-options>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_LABELED_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_LABELED_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_LABELED_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_LABELED_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:L3VPN_IPV6_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:L3VPN_IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
</global>
<peer-groups>
<peer-group>
<peer-group-name>ABC</peer-group-name>
<config>
<auth-password>0x9603e78694ace534ea912b9ab53f8a55</auth-password>
<peer-group-name>ABC</peer-group-name>
<peer-as>100</peer-as>
<description>Non VRF peer-group configs</description>
</config>
<enable-bfd>
<config>
<enabled>true</enabled>
</config>
</enable-bfd>
<timers>
<config>
<connect-retry>300.00</connect-retry>
<minimum-advertisement-interval>20.00</minimum-advertisement-interval>
<keepalive-interval>300.00</keepalive-interval>
<hold-time>8200.00</hold-time>
</config>
</timers>
<transport>
<config>
<local-address>10.1.1.1</local-address>
<passive-mode>true</passive-mode>
</config>
</transport>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<ipv4-unicast>
<prefix-limit>
<config>
<max-prefixes>4294967295</max-prefixes>
<warning-threshold-pct>100</warning-threshold-pct>
<prevent-teardown>true</prevent-teardown>
</config>
</prefix-limit>
<config>
<send-default-route>true</send-default-route>
</config>
</ipv4-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<apply-policy>
<config>
<import-policy>in-map</import-policy>
<export-policy>out-map</export-policy>
</config>
</apply-policy>
</afi-safi>
</afi-safis>
<route-reflector>
<config>
<route-reflector-client>true</route-reflector-client>
</config>
</route-reflector>
</peer-group>
<peer-group>
<peer-group-name>peer1</peer-group-name>
<config>
<auth-password>0x9a20ef22549ad84b</auth-password>
<peer-group-name>peer1</peer-group-name>
<peer-as>200</peer-as>
</config>
<ebgp-multihop>
<config>
<enabled>true</enabled>
</config>
</ebgp-multihop>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_LABELED_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_LABELED_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
</peer-group>
<peer-group>
<peer-group-name>peer2</peer-group-name>
<config>
<auth-password>0x9603e78694ace534e74f24019f5bfeb5</auth-password>
<peer-group-name>peer2</peer-group-name>
<peer-as>300</peer-as>
</config>
<enable-bfd>
<config>
<enabled>true</enabled>
</config>
</enable-bfd>
<ebgp-multihop>
<config>
<multihop-ttl>10</multihop-ttl>
<enabled>true</enabled>
</config>
</ebgp-multihop>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_LABELED_UNICAST</afi-safi-name>
<ipv6-labeled-unicast>
<prefix-limit>
<config>
<max-prefixes>1</max-prefixes>
<prevent-teardown>true</prevent-teardown>
</config>
</prefix-limit>
</ipv6-labeled-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_LABELED_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:L3VPN_IPV6_UNICAST</afi-safi-name>
<l3vpn-ipv6-unicast>
<prefix-limit>
<config>
<max-prefixes>12345</max-prefixes>
</config>
</prefix-limit>
</l3vpn-ipv6-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:L3VPN_IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
OcNOS CLI Commands
!
router bgp 100
neighbor ABC peer-group
neighbor ABC remote-as 100
neighbor ABC fall-over bfd multihop
neighbor peer1 peer-group
neighbor peer1 remote-as 200
neighbor peer2 peer-group
neighbor peer2 remote-as 300
neighbor peer2 fall-over bfd
neighbor ABC description Non VRF peer-group configs
neighbor ABC passive
neighbor ABC update-source 10.1.1.1
neighbor ABC authentication-key 0x9603e78694ace534ea912b9ab53f8a55
neighbor ABC advertisement-interval 20
neighbor ABC timers 300 8200
neighbor ABC timers connect 300
neighbor peer1 ebgp-multihop
neighbor peer1 authentication-key 0x9a20ef22549ad84b
neighbor peer2 ebgp-multihop 10
neighbor peer2 authentication-key 0x9603e78694ace534e74f24019f5bfeb5
!
address-family ipv4 unicast
neighbor ABC activate
neighbor ABC route-reflector-client
neighbor ABC default-originate
neighbor ABC maximum-prefix 4294967295 100 warning-only
neighbor ABC route-map in-map in
neighbor ABC route-map out-map out
exit-address-family
!
address-family ipv4 labeled-unicast
neighbor peer1 activate
exit-address-family
!
address-family vpnv6 unicast
neighbor peer2 allow-ebgp-vpn
neighbor peer2 activate
neighbor peer2 maximum-prefix 12345
exit-address-family
!
address-family ipv6 labeled-unicast
neighbor peer2 activate
neighbor peer2 maximum-prefix 1 warning-only
exit-address-family
!
OcNOS NETCONF Payload
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>100</bgp-as>
<config>
<bgp-as>100</bgp-as>
</config>
<state>
<bgp-as>100</bgp-as>
<version>4</version>
<table-version>1</table-version>
<total-prefixes>0</total-prefixes>
<router-run-time-ip-address>0.0.0.0</router-run-time-ip-address>
<scan-remain-time>49</scan-remain-time>
</state>
<rib>
<address-family>
<safi>link-state</safi>
<afi>link-state</afi>
<state>
<safi>link-state</safi>
<afi>link-state</afi>
</state>
</address-family>
</rib>
<address-family>
<afi>ipv4</afi>
<safi>unicast</safi>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
</config>
<state>
<afi>ipv4</afi>
<safi>unicast</safi>
</state>
</address-family>
<address-family>
<afi>ipv4</afi>
<safi>labeled-unicast</safi>
<config>
<afi>ipv4</afi>
<safi>labeled-unicast</safi>
</config>
<state>
<afi>ipv4</afi>
<safi>labeled-unicast</safi>
</state>
</address-family>
<address-family>
<afi>ipv6</afi>
<safi>labeled-unicast</safi>
<config>
<afi>ipv6</afi>
<safi>labeled-unicast</safi>
</config>
<state>
<afi>ipv6</afi>
<safi>labeled-unicast</safi>
</state>
</address-family>
<address-family>
<afi>ipv6</afi>
<safi>vpn-unicast</safi>
<config>
<afi>ipv6</afi>
<safi>vpn-unicast</safi>
</config>
<state>
<afi>ipv6</afi>
<safi>vpn-unicast</safi>
</state>
</address-family>
<peer-group>
<peer-group-tag>ABC</peer-group-tag>
<bgp-password>
<password>0x9603e78694ace534ea912b9ab53f8a55</password>
<config>
<password>0x9603e78694ace534ea912b9ab53f8a55</password>
<auth-key-encrypt>1</auth-key-encrypt>
</config>
<state>
<password>0x9603e78694ace534ea912b9ab53f8a55</password>
<auth-key-encrypt>1</auth-key-encrypt>
</state>
</bgp-password>
<config>
<peer-group-tag>ABC</peer-group-tag>
<peer-group-range>static</peer-group-range>
<peer-as>100</peer-as>
<enable-peer-bfd/>
<enable-peer-bfd-multihop/>
<peer-description>Non VRF peer-group configs</peer-description>
<peer-connect-interval>300</peer-connect-interval>
<min-route-advertisement-interval>20</min-route-advertisement-interval>
<source-identifier>10.1.1.1</source-identifier>
<neighbor-passive/>
</config>
<state>
<peer-group-tag>ABC</peer-group-tag>
<peer-group-range>static</peer-group-range>
<peer-as>100</peer-as>
<enable-peer-bfd/>
<enable-peer-bfd-multihop/>
<peer-description>Non VRF peer-group configs</peer-description>
<peer-connect-interval>300</peer-connect-interval>
<min-route-advertisement-interval>20</min-route-advertisement-interval>
<source-identifier>10.1.1.1</source-identifier>
<neighbor-passive/>
</state>
<timers>
<config>
<keep-alive>300</keep-alive>
<hold-time>8200</hold-time>
</config>
<state>
<keep-alive>300</keep-alive>
<hold-time>8200</hold-time>
</state>
</timers>
<address-families>
<address-family>
<afi>ipv4</afi>
<safi>unicast</safi>
<maximum-prefixes>
<prefix-count>4294967295</prefix-count>
<config>
<prefix-count>4294967295</prefix-count>
<threshold-percentage>100</threshold-percentage>
<warning-only/>
</config>
<state>
<prefix-count>4294967295</prefix-count>
<threshold-percentage>100</threshold-percentage>
<warning-only/>
</state>
</maximum-prefixes>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
<activate/>
<default-peer-route-map-name/>
<peer-route-reflector/>
</config>
<state>
<afi>ipv4</afi>
<safi>unicast</safi>
<activate/>
<default-peer-route-map-name/>
<peer-route-reflector/>
</state>
<route-map-filters>
<route-map-filter>
<route-map-direction>in</route-map-direction>
<config>
<route-map-direction>in</route-map-direction>
<route-map-name>in-map</route-map-name>
</config>
<state>
<route-map-direction>in</route-map-direction>
<route-map-name>in-map</route-map-name>
</state>
</route-map-filter>
<route-map-filter>
<route-map-direction>out</route-map-direction>
<config>
<route-map-direction>out</route-map-direction>
<route-map-name>out-map</route-map-name>
</config>
<state>
<route-map-direction>out</route-map-direction>
<route-map-name>out-map</route-map-name>
</state>
</route-map-filter>
</route-map-filters>
</address-family>
</address-families>
</peer-group>
<peer-group>
<peer-group-tag>peer1</peer-group-tag>
<bgp-password>
<password>0x9a20ef22549ad84b</password>
<config>
<password>0x9a20ef22549ad84b</password>
<auth-key-encrypt>1</auth-key-encrypt>
</config>
<state>
<password>0x9a20ef22549ad84b</password>
<auth-key-encrypt>1</auth-key-encrypt>
</state>
</bgp-password>
<config>
<peer-group-tag>peer1</peer-group-tag>
<peer-group-range>static</peer-group-range>
<peer-as>200</peer-as>
</config>
<state>
<peer-group-tag>peer1</peer-group-tag>
<peer-group-range>static</peer-group-range>
<peer-as>200</peer-as>
</state>
<ebgp-multihop>
<config>
<enabled/>
</config>
<state>
<enabled/>
</state>
</ebgp-multihop>
<address-families>
<address-family>
<afi>ipv4</afi>
<safi>labeled-unicast</safi>
<config>
<afi>ipv4</afi>
<safi>labeled-unicast</safi>
<activate/>
</config>
<state>
<afi>ipv4</afi>
<safi>labeled-unicast</safi>
<activate/>
</state>
</address-family>
</address-families>
</peer-group>
<peer-group>
<peer-group-tag>peer2</peer-group-tag>
<bgp-password>
<password>0x9603e78694ace534e74f24019f5bfeb5</password>
<config>
<password>0x9603e78694ace534e74f24019f5bfeb5</password>
<auth-key-encrypt>1</auth-key-encrypt>
</config>
<state>
<password>0x9603e78694ace534e74f24019f5bfeb5</password>
<auth-key-encrypt>1</auth-key-encrypt>
</state>
</bgp-password>
<config>
<peer-group-tag>peer2</peer-group-tag>
<peer-group-range>static</peer-group-range>
<peer-as>300</peer-as>
<enable-peer-bfd/>
</config>
<state>
<peer-group-tag>peer2</peer-group-tag>
<peer-group-range>static</peer-group-range>
<peer-as>300</peer-as>
<enable-peer-bfd/>
</state>
<ebgp-multihop>
<config>
<maximum-hop-count>10</maximum-hop-count>
<enabled/>
</config>
<state>
<maximum-hop-count>10</maximum-hop-count>
<enabled/>
</state>
</ebgp-multihop>
<address-families>
<address-family>
<afi>ipv6</afi>
<safi>labeled-unicast</safi>
<maximum-prefixes>
<prefix-count>1</prefix-count>
<config>
<prefix-count>1</prefix-count>
<maximum-prefix-warning/>
</config>
<state>
<prefix-count>1</prefix-count>
<maximum-prefix-warning/>
</state>
</maximum-prefixes>
<config>
<afi>ipv6</afi>
<safi>labeled-unicast</safi>
<activate/>
</config>
<state>
<afi>ipv6</afi>
<safi>labeled-unicast</safi>
<activate/>
</state>
</address-family>
<address-family>
<afi>ipv6</afi>
<safi>vpn-unicast</safi>
<maximum-prefixes>
<prefix-count>12345</prefix-count>
<config>
<prefix-count>12345</prefix-count>
</config>
<state>
<prefix-count>12345</prefix-count>
</state>
</maximum-prefixes>
<config>
<afi>ipv6</afi>
<safi>vpn-unicast</safi>
<activate/>
<peer-allow-ebgp-vpn/>
</config>
<state>
<afi>ipv6</afi>
<safi>vpn-unicast</safi>
<activate/>
<peer-allow-ebgp-vpn/>
</state>
</address-family>
</address-families>
</peer-group>
</bgp-instance>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
</config>
<route-selection-options>
<config>
<enable-aigp>true</enable-aigp>
</config>
<state>
<enable-aigp>true</enable-aigp>
</state>
</route-selection-options>
<state>
<as>100</as>
<total-prefixes>0</total-prefixes>
</state>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_LABELED_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_LABELED_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_LABELED_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_LABELED_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:L3VPN_IPV6_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:L3VPN_IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
</global>
<peer-groups>
<peer-group>
<peer-group-name>ABC</peer-group-name>
<config>
<auth-password>0x9603e78694ace534ea912b9ab53f8a55</auth-password>
<peer-group-name>ABC</peer-group-name>
<peer-as>100</peer-as>
<description>Non VRF peer-group configs</description>
</config>
<state>
<auth-password>0x9603e78694ace534ea912b9ab53f8a55</auth-password>
<peer-group-name>ABC</peer-group-name>
<peer-as>100</peer-as>
<description>Non VRF peer-group configs</description>
</state>
<enable-bfd>
<config>
<enabled>true</enabled>
</config>
<state>
<enabled>true</enabled>
</state>
</enable-bfd>
<timers>
<config>
<connect-retry>300.00</connect-retry>
<minimum-advertisement-interval>20.00</minimum-advertisement-interval>
<keepalive-interval>300.00</keepalive-interval>
<hold-time>8200.00</hold-time>
</config>
<state>
<connect-retry>300.00</connect-retry>
<minimum-advertisement-interval>20.00</minimum-advertisement-interval>
<keepalive-interval>300.00</keepalive-interval>
<hold-time>8200.00</hold-time>
</state>
</timers>
<transport>
<config>
<local-address>10.1.1.1</local-address>
<passive-mode>true</passive-mode>
</config>
<state>
<local-address>10.1.1.1</local-address>
<passive-mode>true</passive-mode>
</state>
</transport>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<ipv4-unicast>
<prefix-limit>
<config>
<max-prefixes>4294967295</max-prefixes>
<warning-threshold-pct>100</warning-threshold-pct>
<prevent-teardown>true</prevent-teardown>
</config>
<state>
<max-prefixes>4294967295</max-prefixes>
<warning-threshold-pct>100</warning-threshold-pct>
<prevent-teardown>true</prevent-teardown>
</state>
</prefix-limit>
<config>
<send-default-route>true</send-default-route>
</config>
<state>
<send-default-route>true</send-default-route>
</state>
</ipv4-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
<apply-policy>
<config>
<import-policy>in-map</import-policy>
<export-policy>out-map</export-policy>
</config>
<state>
<import-policy>in-map</import-policy>
<export-policy>out-map</export-policy>
</state>
</apply-policy>
</afi-safi>
</afi-safis>
<route-reflector>
<config>
<route-reflector-client>true</route-reflector-client>
</config>
<state>
<route-reflector-client>true</route-reflector-client>
</state>
</route-reflector>
</peer-group>
<peer-group>
<peer-group-name>peer1</peer-group-name>
<config>
<auth-password>0x9a20ef22549ad84b</auth-password>
<peer-group-name>peer1</peer-group-name>
<peer-as>200</peer-as>
</config>
<state>
<auth-password>0x9a20ef22549ad84b</auth-password>
<peer-group-name>peer1</peer-group-name>
<peer-as>200</peer-as>
</state>
<ebgp-multihop>
<config>
<enabled>true</enabled>
</config>
<state>
<enabled>true</enabled>
</state>
</ebgp-multihop>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_LABELED_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_LABELED_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_LABELED_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
</afi-safi>
</afi-safis>
</peer-group>
<peer-group>
<peer-group-name>peer2</peer-group-name>
<config>
<auth-password>0x9603e78694ace534e74f24019f5bfeb5</auth-password>
<peer-group-name>peer2</peer-group-name>
<peer-as>300</peer-as>
</config>
<state>
<auth-password>0x9603e78694ace534e74f24019f5bfeb5</auth-password>
<peer-group-name>peer2</peer-group-name>
<peer-as>300</peer-as>
</state>
<enable-bfd>
<config>
<enabled>true</enabled>
</config>
<state>
<enabled>true</enabled>
</state>
</enable-bfd>
<ebgp-multihop>
<config>
<multihop-ttl>10</multihop-ttl>
<enabled>true</enabled>
</config>
<state>
<enabled>true</enabled>
<multihop-ttl>10</multihop-ttl>
</state>
</ebgp-multihop>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_LABELED_UNICAST</afi-safi-name>
<ipv6-labeled-unicast>
<prefix-limit>
<config>
<max-prefixes>1</max-prefixes>
<prevent-teardown>true</prevent-teardown>
</config>
<state>
<max-prefixes>1</max-prefixes>
<prevent-teardown>true</prevent-teardown>
</state>
</prefix-limit>
</ipv6-labeled-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_LABELED_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_LABELED_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
</afi-safi>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:L3VPN_IPV6_UNICAST</afi-safi-name>
<l3vpn-ipv6-unicast>
<prefix-limit>
<config>
<max-prefixes>12345</max-prefixes>
</config>
<state>
<max-prefixes>12345</max-prefixes>
</state>
</prefix-limit>
</l3vpn-ipv6-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:L3VPN_IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:L3VPN_IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
</afi-safi>
</afi-safis>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
Restrictions
The first time /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/peer-groups and /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors paths are configured, those configuration needs the respective AFI-SAFI configuration that is present to indicate AFI type:
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis
this information is necessary for the OcNOS model to generate the following paths:
/ipi-bgp:bgp/bgp-instance/address-family
/ipi-bgp:bgp/bgp-instance/peer-group/address-families
/ipi-bgp:bgp/bgp-instance/address-family-vrf
After the /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/peer-groups and /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors paths are configured on equipment, on the further configurations on those paths the user does not need to indicate the AFI-SAFI, the translation will look for this information on the equipment database.
Create BGP peer-groups with user-defined VRFs
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
Peer groups are configurations that can be used elsewhere without the need to repeat them.
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
</config>
<route-selection-options>
<config>
<enable-aigp>true</enable-aigp>
</config>
<state>
<enable-aigp>true</enable-aigp>
</state>
</route-selection-options>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
<network-instance>
<name>management</name>
</network-instance>
<network-instance>
<name>vrfA</name>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
</global>
<peer-groups>
<peer-group>
<peer-group-name>peerA</peer-group-name>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<ipv4-unicast>
<prefix-limit>
<config>
<max-prefixes>2331</max-prefixes>
<warning-threshold-pct>100</warning-threshold-pct>
<prevent-teardown>true</prevent-teardown>
</config>
</prefix-limit>
<config>
<send-default-route>true</send-default-route>
</config>
</ipv4-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<auth-password>0x9603e78694ace534ea912b9ab53f8a55</auth-password>
<peer-group-name>peerA</peer-group-name>
<peer-as>100</peer-as>
<description>VRFA peer-group configs</description>
</config>
<transport>
<config>
<local-address>2.2.2.2</local-address>
<passive-mode>true</passive-mode>
</config>
</transport>
<timers>
<config>
<connect-retry>900.00</connect-retry>
<minimum-advertisement-interval>65535.00</minimum-advertisement-interval>
<keepalive-interval>100.00</keepalive-interval>
<hold-time>300.00</hold-time>
</config>
</timers>
<enable-bfd>
<config>
<enabled>true</enabled>
</config>
</enable-bfd>
<route-reflector>
<config>
<route-reflector-client>true</route-reflector-client>
</config>
</route-reflector>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
<network-instance>
<name>vrfB</name>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
</global>
<peer-groups>
<peer-group>
<peer-group-name>peerB</peer-group-name>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<ipv6-unicast>
<prefix-limit>
<config>
<max-prefixes>3123</max-prefixes>
<prevent-teardown>true</prevent-teardown>
</config>
</prefix-limit>
<config>
<send-default-route>true</send-default-route>
</config>
</ipv6-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<auth-password>0x9a20ef22549ad84b</auth-password>
<peer-group-name>peerB</peer-group-name>
<peer-as>200</peer-as>
<local-as>300</local-as>
<description>VRFB peer-group configs</description>
</config>
<enable-bfd>
<config>
<enabled>true</enabled>
</config>
</enable-bfd>
<ebgp-multihop>
<config>
<multihop-ttl>100</multihop-ttl>
<enabled>true</enabled>
</config>
</ebgp-multihop>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
OcNOS CLI Commands
!
ip vrf vrfA
rd 1:1
!
ip vrf vrfB
rd 1:2
!
!
router bgp 100
!
address-family ipv4 vrf vrfA
neighbor peerA peer-group
neighbor peerA remote-as 100
neighbor peerA fall-over bfd
neighbor peerA activate
neighbor peerA authentication-key 0x9603e78694ace534ea912b9ab53f8a55
neighbor peerA route-reflector-client
neighbor peerA default-originate
neighbor peerA maximum-prefix 2331 100 warning-only
neighbor peerA description VRFA peer-group configs
neighbor peerA passive
neighbor peerA update-source 2.2.2.2
neighbor peerA advertisement-interval 65535
neighbor peerA timers 100 300
neighbor peerA timers connect 900
exit-address-family
!
address-family ipv6 vrf vrfB
neighbor peerB peer-group
neighbor peerB remote-as 200
neighbor peerB local-as 300
neighbor peerB fall-over bfd multihop
neighbor peerB activate
neighbor peerB authentication-key 0x9a20ef22549ad84b
neighbor peerB default-originate
neighbor peerB maximum-prefix 3123 warning-only
neighbor peerB description VRFB peer-group configs
neighbor peerB ebgp-multihop 100
exit-address-family
!
OcNOS NETCONF Payload
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>100</bgp-as>
<config>
<bgp-as>100</bgp-as>
</config>
<state>
<bgp-as>100</bgp-as>
<version>4</version>
<table-version>1</table-version>
<total-prefixes>0</total-prefixes>
<router-run-time-ip-address>0.0.0.0</router-run-time-ip-address>
<scan-remain-time>36</scan-remain-time>
</state>
<rib>
<address-family>
<safi>link-state</safi>
<afi>link-state</afi>
<state>
<safi>link-state</safi>
<afi>link-state</afi>
</state>
</address-family>
</rib>
<address-family-vrf>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>vrfA</vrf-name>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>vrfA</vrf-name>
</config>
<state>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>vrfA</vrf-name>
</state>
<peer-group>
<peer-group-tag>peerA</peer-group-tag>
<bgp-password>
<password>0x9603e78694ace534ea912b9ab53f8a55</password>
<config>
<password>0x9603e78694ace534ea912b9ab53f8a55</password>
<auth-key-encrypt>1</auth-key-encrypt>
</config>
<state>
<password>0x9603e78694ace534ea912b9ab53f8a55</password>
<auth-key-encrypt>1</auth-key-encrypt>
</state>
</bgp-password>
<maximum-prefixes>
<prefix-count>2331</prefix-count>
<config>
<prefix-count>2331</prefix-count>
<threshold-percentage>100</threshold-percentage>
<warning-only/>
</config>
<state>
<prefix-count>2331</prefix-count>
<threshold-percentage>100</threshold-percentage>
<warning-only/>
</state>
</maximum-prefixes>
<config>
<peer-group-tag>peerA</peer-group-tag>
<peer-group-range>static</peer-group-range>
<peer-as>100</peer-as>
<source-identifier>2.2.2.2</source-identifier>
<peer-connection-interval>900</peer-connection-interval>
<neighbor-passive/>
<min-route-advertisement-interval>65535</min-route-advertisement-interval>
<peer-description>VRFA peer-group configs</peer-description>
<enable-peer-bfd/>
<activate/>
<default-peer-route-map-name/>
<peer-route-reflector/>
</config>
<state>
<peer-group-tag>peerA</peer-group-tag>
<peer-group-range>static</peer-group-range>
<peer-as>100</peer-as>
<source-identifier>2.2.2.2</source-identifier>
<peer-connection-interval>900</peer-connection-interval>
<neighbor-passive/>
<min-route-advertisement-interval>65535</min-route-advertisement-interval>
<peer-description>VRFA peer-group configs</peer-description>
<enable-peer-bfd/>
<activate/>
<default-peer-route-map-name/>
<peer-route-reflector/>
</state>
<timers>
<config>
<keep-alive>100</keep-alive>
<hold-time>300</hold-time>
</config>
<state>
<keep-alive>100</keep-alive>
<hold-time>300</hold-time>
</state>
</timers>
</peer-group>
</address-family-vrf>
<address-family-vrf>
<afi>ipv6</afi>
<safi>unicast</safi>
<vrf-name>vrfB</vrf-name>
<config>
<afi>ipv6</afi>
<safi>unicast</safi>
<vrf-name>vrfB</vrf-name>
</config>
<state>
<afi>ipv6</afi>
<safi>unicast</safi>
<vrf-name>vrfB</vrf-name>
</state>
<peer-group>
<peer-group-tag>peerB</peer-group-tag>
<bgp-password>
<password>0x9a20ef22549ad84b</password>
<config>
<password>0x9a20ef22549ad84b</password>
<auth-key-encrypt>1</auth-key-encrypt>
</config>
<state>
<password>0x9a20ef22549ad84b</password>
<auth-key-encrypt>1</auth-key-encrypt>
</state>
</bgp-password>
<maximum-prefixes>
<prefix-count>3123</prefix-count>
<config>
<prefix-count>3123</prefix-count>
<maximum-prefix-warning/>
</config>
<state>
<prefix-count>3123</prefix-count>
<maximum-prefix-warning/>
</state>
</maximum-prefixes>
<config>
<peer-group-tag>peerB</peer-group-tag>
<peer-group-range>static</peer-group-range>
<peer-as>200</peer-as>
<peer-local-as>300</peer-local-as>
<peer-description>VRFB peer-group configs</peer-description>
<enable-peer-bfd/>
<enable-peer-bfd-multihop/>
<activate/>
<default-peer-route-map-name/>
</config>
<state>
<peer-group-tag>peerB</peer-group-tag>
<peer-group-range>static</peer-group-range>
<peer-as>200</peer-as>
<peer-local-as>300</peer-local-as>
<peer-description>VRFB peer-group configs</peer-description>
<enable-peer-bfd/>
<enable-peer-bfd-multihop/>
<activate/>
<default-peer-route-map-name/>
</state>
<ebgp-multihop>
<config>
<maximum-hop-count>100</maximum-hop-count>
<enabled/>
</config>
<state>
<maximum-hop-count>100</maximum-hop-count>
<enabled/>
</state>
</ebgp-multihop>
</peer-group>
</address-family-vrf>
</bgp-instance>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
</config>
<route-selection-options>
<config>
<enable-aigp>true</enable-aigp>
</config>
<state>
<enable-aigp>true</enable-aigp>
</state>
</route-selection-options>
<state>
<as>100</as>
<total-prefixes>0</total-prefixes>
</state>
</global>
</bgp>
</protocol>
</protocols>
</network-instance>
<network-instance>
<name>management</name>
</network-instance>
<network-instance>
<name>vrfA</name>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
</state>
</afi-safi>
</afi-safis>
<state>
<as>100</as>
</state>
</global>
<peer-groups>
<peer-group>
<peer-group-name>peerA</peer-group-name>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<ipv4-unicast>
<prefix-limit>
<config>
<max-prefixes>2331</max-prefixes>
<warning-threshold-pct>100</warning-threshold-pct>
<prevent-teardown>true</prevent-teardown>
</config>
<state>
<max-prefixes>2331</max-prefixes>
<warning-threshold-pct>100</warning-threshold-pct>
<prevent-teardown>true</prevent-teardown>
</state>
</prefix-limit>
<config>
<send-default-route>true</send-default-route>
</config>
<state>
<send-default-route>true</send-default-route>
</state>
</ipv4-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
</afi-safi>
</afi-safis>
<config>
<auth-password>0x9603e78694ace534ea912b9ab53f8a55</auth-password>
<peer-group-name>peerA</peer-group-name>
<peer-as>100</peer-as>
<description>VRFA peer-group configs</description>
</config>
<state>
<auth-password>0x9603e78694ace534ea912b9ab53f8a55</auth-password>
<peer-group-name>peerA</peer-group-name>
<peer-as>100</peer-as>
<description>VRFA peer-group configs</description>
</state>
<transport>
<config>
<local-address>2.2.2.2</local-address>
<passive-mode>true</passive-mode>
</config>
<state>
<local-address>2.2.2.2</local-address>
<passive-mode>true</passive-mode>
</state>
</transport>
<timers>
<config>
<connect-retry>900.00</connect-retry>
<minimum-advertisement-interval>65535.00</minimum-advertisement-interval>
<keepalive-interval>100.00</keepalive-interval>
<hold-time>300.00</hold-time>
</config>
<state>
<connect-retry>900.00</connect-retry>
<minimum-advertisement-interval>65535.00</minimum-advertisement-interval>
<keepalive-interval>100.00</keepalive-interval>
<hold-time>300.00</hold-time>
</state>
</timers>
<enable-bfd>
<config>
<enabled>true</enabled>
</config>
<state>
<enabled>true</enabled>
</state>
</enable-bfd>
<route-reflector>
<config>
<route-reflector-client>true</route-reflector-client>
</config>
<state>
<route-reflector-client>true</route-reflector-client>
</state>
</route-reflector>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
<network-instance>
<name>vrfB</name>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<bgp>
<global>
<config>
<as>100</as>
</config>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
</state>
</afi-safi>
</afi-safis>
<state>
<as>100</as>
</state>
</global>
<peer-groups>
<peer-group>
<peer-group-name>peerB</peer-group-name>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<ipv6-unicast>
<prefix-limit>
<config>
<max-prefixes>3123</max-prefixes>
<prevent-teardown>true</prevent-teardown>
</config>
<state>
<max-prefixes>3123</max-prefixes>
<prevent-teardown>true</prevent-teardown>
</state>
</prefix-limit>
<config>
<send-default-route>true</send-default-route>
</config>
<state>
<send-default-route>true</send-default-route>
</state>
</ipv6-unicast>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
</afi-safi>
</afi-safis>
<config>
<auth-password>0x9a20ef22549ad84b</auth-password>
<peer-group-name>peerB</peer-group-name>
<peer-as>200</peer-as>
<local-as>300</local-as>
<description>VRFB peer-group configs</description>
</config>
<state>
<auth-password>0x9a20ef22549ad84b</auth-password>
<peer-group-name>peerB</peer-group-name>
<peer-as>200</peer-as>
<local-as>300</local-as>
<description>VRFB peer-group configs</description>
</state>
<enable-bfd>
<config>
<enabled>true</enabled>
</config>
<state>
<enabled>true</enabled>
</state>
</enable-bfd>
<ebgp-multihop>
<config>
<multihop-ttl>100</multihop-ttl>
<enabled>true</enabled>
</config>
<state>
<enabled>true</enabled>
<multihop-ttl>100</multihop-ttl>
</state>
</ebgp-multihop>
</peer-group>
</peer-groups>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
Restrictions
The first time /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/peer-groups and /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors paths are configured, those configuration needs the respective AFI-SAFI configuration that is present to indicate AFI type:
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis
this information is necessary for the OcNOS model to generate the following paths:
/ipi-bgp:bgp/bgp-instance/address-family
/ipi-bgp:bgp/bgp-instance/peer-group/address-families
/ipi-bgp:bgp/bgp-instance/address-family-vrf
After the /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/peer-groups and /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors paths are configured on equipment, on the further configurations on those paths the user does not need to indicate the AFI-SAFI, the translation will look for this information on the equipment database.
Configure update-source on neighbor
Release
This configuration was introduced in OcNOS version 5.0.
Configuration
Use this XML config to allow internal BGP sessions to use any operating interface for TCP connections.
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<config>
<identifier>oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
<bgp>
<global>
<config>
<as>100</as>
</config>
</global>
<neighbors>
<neighbor>
<afi-safis>
<afi-safi>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<neighbor-address>1.1.1.1</neighbor-address>
<config>
<neighbor-address>1.1.1.1</neighbor-address>
<peer-as>100</peer-as>
</config>
<transport>
<config>
<local-address>2.2.2.2</local-address>
</config>
</transport>
</neighbor>
</neighbors>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
OcNOS CLI Command
router bgp 100
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source 2.2.2.2
!
OcNOS NETCONF Payload
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>100</bgp-as>
<config>
<bgp-as>100</bgp-as>
</config>
<peer>
<peer-address>1.1.1.1</peer-address>
<config>
<peer-address>1.1.1.1</peer-address>
<source-identifier>2.2.2.2</source-identifier>
<peer-as>100</peer-as>
</config>
</peer>
</bgp-instance>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<state>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
</state>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
<enabled>true</enabled>
</config>
<bgp>
<global>
<config>
<as>100</as>
</config>
<state>
<as>100</as>
</state>
</global>
<neighbors>
<neighbor>
<neighbor-address>1.1.1.1</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<neighbor-address>1.1.1.1</neighbor-address>
<peer-as>100</peer-as>
</config>
<transport>
<config>
<local-address>2.2.2.2</local-address>
</config>
<state>
<local-address>2.2.2.2</local-address>
</state>
</transport>
<state>
<neighbor-address>1.1.1.1</neighbor-address>
<peer-as>100</peer-as>
</state>
</neighbor>
</neighbors>
</bgp>
<state>
<enabled>true</enabled>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
</state>
</protocol>
</protocols>
</network-instance>
</network-instances>
Restrictions
None
Double link in load balance
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
This scenario is the configuration in which there are two links to guarantee service availability and all traffic should be routed throughout both links at the same time if any of them has failure all traffic should be routed by the available link.
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>TEST_A9</name>
<config>
<name>TEST_A9</name>
<type>L3VRF</type>
<route-distinguisher>65000:100</route-distinguisher>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
</config>
<protocols>
<protocol>
<identifier>BGP</identifier>
<name>65000</name>
<config>
<identifier>BGP</identifier>
<name>65000</name>
<enabled>true</enabled>
</config>
<bgp>
<peer-groups>
<peer-group>
<afi-safis>
<afi-safi>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<peer-group-name>PPAL_BGP_L3</peer-group-name>
<config>
<peer-group-name>PPAL_BGP_L3</peer-group-name>
<peer-as>18746</peer-as>
</config>
</peer-group>
<peer-group>
<afi-safis>
<afi-safi>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<peer-group-name>BCK_BGP_L3</peer-group-name>
<config>
<peer-group-name>BCK_BGP_L3</peer-group-name>
<peer-as>18010</peer-as>
</config>
</peer-group>
</peer-groups>
<global>
<config>
<as>65000</as>
</config>
<use-multiple-paths>
<config>
<enabled>true</enabled>
</config>
<ebgp>
<config>
<maximum-paths>2</maximum-paths>
</config>
</ebgp>
</use-multiple-paths>
</global>
<neighbors>
<neighbor>
<afi-safis>
<afi-safi>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<neighbor-address>172.17.30.2</neighbor-address>
<config>
<peer-group>PPAL_BGP_L3</peer-group>
<neighbor-address>172.17.30.2</neighbor-address>
<peer-as>18747</peer-as>
<local-as>65001</local-as>
<description>PPAL_SESSION</description>
</config>
</neighbor>
<neighbor>
<afi-safis>
<afi-safi>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<neighbor-address>172.17.40.2</neighbor-address>
<config>
<peer-group>BCK_BGP_L3</peer-group>
<neighbor-address>172.17.40.2</neighbor-address>
<peer-as>18010</peer-as>
<local-as>65002</local-as>
<description>BCK_SESSION</description>
</config>
</neighbor>
</neighbors>
</bgp>
</protocol>
</protocols>
</network-instance>
</network-instances>
OcNOS CLI Command
!
ip vrf TEST_A9
rd 65000:100
!
router bgp 65000
!
address-family ipv4 vrf TEST_A9
max-paths ebgp 2
neighbor BCK_BGP_L3 peer-group
neighbor BCK_BGP_L3 remote-as 18010
neighbor BCK_BGP_L3 activate
neighbor PPAL_BGP_L3 peer-group
neighbor PPAL_BGP_L3 remote-as 18746
neighbor PPAL_BGP_L3 activate
neighbor 172.17.30.2 remote-as 18747
neighbor 172.17.30.2 peer-group PPAL_BGP_L3
neighbor 172.17.40.2 remote-as 18010
neighbor 172.17.40.2 peer-group BCK_BGP_L3
neighbor 172.17.30.2 description PPAL_SESSION
neighbor 172.17.40.2 description BCK_SESSION
exit-address-family
!
address-family ipv6 vrf TEST_A9
max-paths ebgp 2
exit-address-family
!
OcNOS NETCONF Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>TEST_A9</instance-name>
<instance-type>vrf</instance-type>
<config>
<instance-name>TEST_A9</instance-name>
<instance-type>vrf</instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<config>
<vrf-name>TEST_A9</vrf-name>
</config>
<bgp-vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp-vrf">
<config>
<rd-string>65000:100</rd-string>
</config>
</bgp-vrf>
</vrf>
</network-instance>
</network-instances>
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>65000</bgp-as>
<config>
<bgp-as>65000</bgp-as>
</config>
<address-family-vrf>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>TEST_A9</vrf-name>
<vrf-peer>
<peer-address>172.17.30.2</peer-address>
<config>
<peer-address>172.17.30.2</peer-address>
<peer-as>18747</peer-as>
<peer-description>PPAL_SESSION</peer-description>
<mapped-peer-group-tag-af>PPAL_BGP_L3</mapped-peer-group-tag-af>
</config>
</vrf-peer>
<vrf-peer>
<peer-address>172.17.40.2</peer-address>
<config>
<peer-address>172.17.40.2</peer-address>
<peer-as>18010</peer-as>
<peer-description>BCK_SESSION</peer-description>
<mapped-peer-group-tag-af>BCK_BGP_L3</mapped-peer-group-tag-af>
</config>
</vrf-peer>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>TEST_A9</vrf-name>
</config>
<maximum-paths>
<config>
<ebgp-max-path>2</ebgp-max-path>
</config>
</maximum-paths>
<peer-group>
<peer-group-tag>BCK_BGP_L3</peer-group-tag>
<config>
<peer-group-tag>BCK_BGP_L3</peer-group-tag>
<peer-group-range>static</peer-group-range>
<peer-as>18010</peer-as>
<activate/>
</config>
</peer-group>
<peer-group>
<peer-group-tag>PPAL_BGP_L3</peer-group-tag>
<config>
<peer-group-tag>PPAL_BGP_L3</peer-group-tag>
<peer-group-range>static</peer-group-range>
<peer-as>18746</peer-as>
<activate/>
</config>
</peer-group>
</address-family-vrf>
<address-family-vrf>
<afi>ipv6</afi>
<safi>unicast</safi>
<vrf-name>TEST_A9</vrf-name>
<config>
<afi>ipv6</afi>
<safi>unicast</safi>
<vrf-name>TEST_A9</vrf-name>
</config>
<maximum-paths>
<config>
<ebgp-max-path>2</ebgp-max-path>
</config>
</maximum-paths>
</address-family-vrf>
</bgp-instance>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>TEST_A9</name>
<config>
<name>TEST_A9</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
<route-distinguisher>65000:100</route-distinguisher>
</config>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>65000</name>
<bgp>
<global>
<config>
<as>65000</as>
</config>
<use-multiple-paths>
<config>
<enabled>true</enabled>
</config>
<ebgp>
<config>
<maximum-paths>2</maximum-paths>
</config>
</ebgp>
</use-multiple-paths>
</global>
<neighbors>
<neighbor>
<neighbor-address>172.17.30.2</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>false</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<enabled>false</enabled>
<neighbor-address>172.17.30.2</neighbor-address>
<peer-as>18747</peer-as>
<description>PPAL_SESSION</description>
<peer-group>PPAL_BGP_L3</peer-group>
</config>
</neighbor>
<neighbor>
<neighbor-address>172.17.40.2</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>false</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<enabled>false</enabled>
<neighbor-address>172.17.40.2</neighbor-address>
<peer-as>18010</peer-as>
<description>BCK_SESSION</description>
<peer-group>BCK_BGP_L3</peer-group>
</config>
</neighbor>
</neighbors>
<peer-groups>
<peer-group>
<peer-group-name>BCK_BGP_L3</peer-group-name>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<peer-group-name>BCK_BGP_L3</peer-group-name>
<peer-as>18010</peer-as>
</config>
</peer-group>
<peer-group>
<peer-group-name>PPAL_BGP_L3</peer-group-name>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
</afi-safi>
</afi-safis>
<config>
<peer-group-name>PPAL_BGP_L3</peer-group-name>
<peer-as>18746</peer-as>
</config>
</peer-group>
</peer-groups>
</bgp>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>65000</name>
<enabled>true</enabled>
</config>
</protocol>
</protocols>
<tables>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
</table>
</tables>
</network-instance>
</network-instances>
Restrictions
On the first time /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/peer-groups and /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors paths are configured, those configuration needs the respective AFI-SAFI configuration that be present to indicate AFI type:
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis
this information is necessary on OcNOS model to generate the follow paths:
/ipi-bgp:bgp/bgp-instance/address-family
/ipi-bgp:bgp/bgp-instance/peer-group/address-families
/ipi-bgp:bgp/bgp-instance/address-family-vrf
After the /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/peer-groups and /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/neighbors paths are configured on equipment, on the further configurations on those paths the user do not need to indicate the AFI-SAFE, the translation will look for this information on equipment database.
Delete BGP instance
Release
This configuration was introduced in OcNOS version 5.1.
Configuration
BGP instances are configured on network-instance on OpenConfig and on container BGP on OcNos side. Due this difference the delete process need to handle if the operation is trying to delete one VRF instance or the entire BGP instance.
When using OpenConfig, the BGP object on OcNOS database is only deleted by the delete on "default" network-instance. When the delete is execute on VRF network-instance it only deletes the given VRF instance.
If there are VRF instances configured and a delete operation is executed on "default" network-instance, it going to clean only entries configured on "default" network-instance. To remove VRF instances, the user needs to apply a operation delete on VRF instances.
OpenConfig NETCONF Payload
Delete VRF instance:
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>VRF1</name>
<protocols>
<protocol operation="delete">
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
</protocol>
</protocols>
</network-instance>
</network-instances>
Delete default instance:
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<protocols>
<protocol operation="delete">
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>100</name>
</protocol>
</protocols>
</network-instance>
</network-instances>
OcNOS NETCONF Payload
Delete VRF instance:
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>100</bgp-as>
<address-family-vrf operation="delete">
<afi>ipv4</afi>
<safi>unicast</safi>
<vrf-name>VRF1</vrf-name>
</address-family-vrf>
</bgp-instance>
</bgp>
Delete default instance:
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance operation="delete">
<bgp-as>100</bgp-as>
</bgp-instance>
</bgp>
Restrictions
None.
BGP RIB Counters IPv4
Release
This configuration was introduced in OcNOS version 6.2.
Configuration
The BGP RIB (Routing information base) is a set of counters to retrieve information about routes from neighbors. In this chapter will be discussed about BGP RIB IPv4.
The containers related to RIB are status only on both Open Config and OcNOS datamodels, and there are no configuration related to this.
On OcNOS the containers are available only after the BGP negotiate routers, before it this tables are empty and could not be retrieved.
The table below show which information each table displays.
OcNOS CLI
OcNOS XPath
Open Config XPath
show ip bgp neighbors <IP-address> routes
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route
show ip bgp neighbors <IP-address> received-routes
For default VRF instances: /ipi-bgp:bgp/bgp-instance/address-family-vrf/vrf-peer/peer-adj-in-route/next-hop
For non-default VRF instances: /ipi-bgp:bgp/bgp-instance/peer/address-family/peer-adj-in-route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-post/routes/route
show ip bgp neighbors <IP-address> advertised-routes
For default VRF instances: /ipi-bgp:bgp/bgp-instance/address-family-vrf/vrf-peer/peer-adj-out-route/next-hop
For non-default VRF instances: /ipi-bgp:bgp/bgp-instance/peer/address-family/peer-adj-out-route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-post/routes/route
To get “last update” information:
show ip bgp <IP-address>
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route
show ip bgp ipv4 unicast <IP-address>
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route
When have user-defined VRF:
show ip bgp vrf <VRF name>
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route
When have user-defined VRF:
show ip bgp vpnv4 vrf <VRF name>
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route
When have user-defined VRF:
show ip bgp vpnv4 vrf <VRF name> <IP-address>
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route
OpenConfig NETCONF Payload
N.A.
OcNOS CLI Command
The config below is just an example to illustrate to counters indicated.
To have a complete BGP RIB scenario it needs more than one equipment configured to work with BGP.
router bgp 200
neighbor 10.10.10.11 remote-as 300
!
address-family ipv4 unicast
redistribute connected
redistribute static
neighbor 10.10.10.11 activate
neighbor 10.10.10.11 soft-reconfiguration inbound
exit-address-family
!
OcNOS NETCONF Payload
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>200</bgp-as>
<config>
<bgp-as>200</bgp-as>
</config>
<state>
<bgp-as>200</bgp-as>
<version>4</version>
<table-version>1</table-version>
<total-prefixes>2</total-prefixes>
<router-run-time-ip-address>192.168.122.61</router-run-time-ip-address>
<scan-remain-time>16</scan-remain-time>
</state>
<rib>
<address-family>
<safi>unicast</safi>
<afi>ipv4</afi>
<state>
<safi>unicast</safi>
<afi>ipv4</afi>
</state>
<routes>
<route>
<route-distinguisher>0</route-distinguisher>
<network-address>10.10.10.0/24</network-address>
<next-hop>
<next-hop-address>0.0.0.0</next-hop-address>
<state>
<next-hop-address>0.0.0.0</next-hop-address>
<peer-network-weight>32768</peer-network-weight>
<bgp-as-path-string>Local</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<route-local-preference>100</route-local-preference>
<last-update-route>2022-12-04T17:50:28Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<nexthop-valid-route>true</nexthop-valid-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>sourced</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>-1</bgp-tx-path-id>
<bgp-rx-path-id>-1</bgp-rx-path-id>
</state>
</next-hop>
<next-hop>
<next-hop-address>10.10.10.11</next-hop-address>
<state>
<next-hop-address>10.10.10.11</next-hop-address>
<peer-network-weight>32768</peer-network-weight>
<bgp-as-path-string>Local</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<route-local-preference>100</route-local-preference>
<last-update-route>2022-12-04T17:50:28Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<nexthop-valid-route>true</nexthop-valid-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>sourced</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>-1</bgp-tx-path-id>
<bgp-rx-path-id>-1</bgp-rx-path-id>
</state>
</next-hop>
<state>
<route-distinguisher>0</route-distinguisher>
<network-address>10.10.10.0/24</network-address>
</state>
</route>
<route>
<route-distinguisher>0</route-distinguisher>
<network-address>192.168.122.0</network-address>
<next-hop>
<next-hop-address>0.0.0.0</next-hop-address>
<state>
<next-hop-address>0.0.0.0</next-hop-address>
<peer-network-weight>32768</peer-network-weight>
<bgp-as-path-string>Local</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<route-local-preference>100</route-local-preference>
<last-update-route>2022-12-04T17:50:28Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<nexthop-valid-route>true</nexthop-valid-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>sourced</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>-1</bgp-tx-path-id>
<bgp-rx-path-id>-1</bgp-rx-path-id>
</state>
</next-hop>
<next-hop>
<next-hop-address>10.10.10.11</next-hop-address>
<state>
<next-hop-address>10.10.10.11</next-hop-address>
<peer-network-weight>32768</peer-network-weight>
<bgp-as-path-string>Local</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<route-local-preference>100</route-local-preference>
<last-update-route>2022-12-04T17:50:28Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<nexthop-valid-route>true</nexthop-valid-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>sourced</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>-1</bgp-tx-path-id>
<bgp-rx-path-id>-1</bgp-rx-path-id>
</state>
</next-hop>
<state>
<route-distinguisher>0</route-distinguisher>
<network-address>192.168.122.0</network-address>
</state>
</route>
</routes>
</address-family>
<address-family>
<safi>link-state</safi>
<afi>link-state</afi>
<state>
<safi>link-state</safi>
<afi>link-state</afi>
</state>
</address-family>
</rib>
<address-family>
<afi>ipv4</afi>
<safi>unicast</safi>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
</config>
<state>
<afi>ipv4</afi>
<safi>unicast</safi>
</state>
<route-redistribute-list>
<protocol-type>connected</protocol-type>
<config>
<protocol-type>connected</protocol-type>
</config>
<state>
<protocol-type>connected</protocol-type>
</state>
</route-redistribute-list>
<route-redistribute-list>
<protocol-type>static</protocol-type>
<config>
<protocol-type>static</protocol-type>
</config>
<state>
<protocol-type>static</protocol-type>
</state>
</route-redistribute-list>
</address-family>
<peer>
<peer-address>10.10.10.11</peer-address>
<address-family>
<afi>ipv4</afi>
<safi>unicast</safi>
<peer-adj-out-route>
<network-address>10.10.10.0/24</network-address>
<next-hop>
<next-hop-address>10.10.10.10</next-hop-address>
<state>
<next-hop-address>10.10.10.10</next-hop-address>
<peer-network-weight>32768</peer-network-weight>
<bgp-as-path-string>Local</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<route-local-preference>100</route-local-preference>
<last-update-route>2022-12-04T17:50:28Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>sourced</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>-1</bgp-tx-path-id>
<bgp-rx-path-id>-1</bgp-rx-path-id>
</state>
</next-hop>
<state>
<network-address>10.10.10.0/24</network-address>
</state>
</peer-adj-out-route>
<peer-adj-out-route>
<network-address>192.168.122.0</network-address>
<next-hop>
<next-hop-address>10.10.10.10</next-hop-address>
<state>
<next-hop-address>10.10.10.10</next-hop-address>
<peer-network-weight>32768</peer-network-weight>
<bgp-as-path-string>Local</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<route-local-preference>100</route-local-preference>
<last-update-route>2022-12-04T17:50:28Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>sourced</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>-1</bgp-tx-path-id>
<bgp-rx-path-id>-1</bgp-rx-path-id>
</state>
</next-hop>
<state>
<network-address>192.168.122.0</network-address>
</state>
</peer-adj-out-route>
<peer-adj-in-route>
<network-address>10.10.10.0/24</network-address>
<next-hop>
<next-hop-address>10.10.10.11</next-hop-address>
<state>
<next-hop-address>10.10.10.11</next-hop-address>
<peer-network-weight>0</peer-network-weight>
<bgp-as-path-string>300</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<network-remote-address-route>192.168.122.60</network-remote-address-route>
<route-peer-address>10.10.10.11</route-peer-address>
<route-local-preference>100</route-local-preference>
<last-update-route>1970-01-01T00:00:00Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<nexthop-valid-route>false</nexthop-valid-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>external</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>0</bgp-tx-path-id>
<bgp-rx-path-id>0</bgp-rx-path-id>
</state>
</next-hop>
<state>
<network-address>10.10.10.0/24</network-address>
</state>
</peer-adj-in-route>
<peer-adj-in-route>
<network-address>192.168.122.0</network-address>
<next-hop>
<next-hop-address>10.10.10.11</next-hop-address>
<state>
<next-hop-address>10.10.10.11</next-hop-address>
<peer-network-weight>0</peer-network-weight>
<bgp-as-path-string>300</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<network-remote-address-route>192.168.122.60</network-remote-address-route>
<route-peer-address>10.10.10.11</route-peer-address>
<route-local-preference>100</route-local-preference>
<last-update-route>1970-01-01T00:00:00Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<nexthop-valid-route>false</nexthop-valid-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>external</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>0</bgp-tx-path-id>
<bgp-rx-path-id>0</bgp-rx-path-id>
</state>
</next-hop>
<state>
<network-address>192.168.122.0</network-address>
</state>
</peer-adj-in-route>
<config>
<afi>ipv4</afi>
<safi>unicast</safi>
<activate/>
<soft-reconfig-inbound/>
</config>
<state>
<afi>ipv4</afi>
<safi>unicast</safi>
<activate/>
<soft-reconfig-inbound/>
<community-count>0</community-count>
<address-family-capability>advertise-receive</address-family-capability>
<ipv6-next-hop-global>::</ipv6-next-hop-global>
<ipv6-next-hop-local>::</ipv6-next-hop-local>
<remote-port>179</remote-port>
<remote-address>10.10.10.11</remote-address>
<local-host>10.10.10.10</local-host>
<ipv4-next-hop>10.10.10.10</ipv4-next-hop>
<local-port>40394</local-port>
<peer-address-family-table-version>1</peer-address-family-table-version>
<address-family-table-version>1</address-family-table-version>
<prefix-count>2</prefix-count>
<send-prefix-count>2</send-prefix-count>
<count>1</count>
<connection-type>non_shared</connection-type>
<connection-established-count>1</connection-established-count>
<graceful-restart-time>0</graceful-restart-time>
<bgp-established-up-time>00:02:24</bgp-established-up-time>
<last-read-time>00:00:23</last-read-time>
<bgp-peer-state>established</bgp-peer-state>
<link-type>external</link-type>
<router-id>192.168.122.60</router-id>
<advertisement-interval>30</advertisement-interval>
<calculated-hold-time>90</calculated-hold-time>
<calculated-keepalive>30</calculated-keepalive>
<route-refresh-capability>advertised-and-received-old-and-new</route-refresh-capability>
<counters>
<keepalive-in-messages>6</keepalive-in-messages>
<keepalive-out-messages>6</keepalive-out-messages>
<open-messages-in>1</open-messages-in>
<open-messages-out>1</open-messages-out>
<as-path-count>2</as-path-count>
<update-message-in>1</update-message-in>
<update-message-out>1</update-message-out>
<received-packet-count>8</received-packet-count>
<notification-in>0</notification-in>
<notification-out>0</notification-out>
<packet-in-queue>0</packet-in-queue>
<packet-out-queue>0</packet-out-queue>
<sent-packet-count>8</sent-packet-count>
<refresh-received-packet-count>0</refresh-received-packet-count>
<refresh-sent-packet-count>0</refresh-sent-packet-count>
</counters>
</state>
<peer-index>
<state>
<peer-index>1</peer-index>
<offset>0</offset>
<mask>0x2</mask>
</state>
</peer-index>
</address-family>
<config>
<peer-address>10.10.10.11</peer-address>
<peer-as>300</peer-as>
</config>
<state>
<peer-address>10.10.10.11</peer-address>
<peer-as>300</peer-as>
</state>
</peer>
</bgp-instance>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<state>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</state>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>200</name>
<bgp>
<global>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
</afi-safi>
</afi-safis>
<config>
<as>200</as>
</config>
<state>
<as>200</as>
<total-prefixes>2</total-prefixes>
</state>
</global>
<rib>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<ipv4-unicast>
<loc-rib>
<routes>
<route>
<prefix>10.10.10.0/24</prefix>
<origin>0.0.0.0</origin>
<path-id>0</path-id>
<state>
<prefix>10.10.10.0/24</prefix>
<origin>0.0.0.0</origin>
<path-id>0</path-id>
<last-modified>1670176228</last-modified>
<valid-route>true</valid-route>
</state>
</route>
<route>
<prefix>192.168.122.0</prefix>
<origin>0.0.0.0</origin>
<path-id>0</path-id>
<state>
<prefix>192.168.122.0</prefix>
<origin>0.0.0.0</origin>
<path-id>0</path-id>
<last-modified>1670176228</last-modified>
<valid-route>true</valid-route>
</state>
</route>
</routes>
</loc-rib>
<neighbors>
<neighbor>
<neighbor-address>10.10.10.11</neighbor-address>
<state>
<neighbor-address>10.10.10.11</neighbor-address>
</state>
<adj-rib-out-post>
<routes>
<route>
<prefix>10.10.10.0/24</prefix>
<path-id>0</path-id>
<state>
<prefix>10.10.10.0/24</prefix>
<path-id>0</path-id>
<last-modified>1670176228</last-modified>
<valid-route>true</valid-route>
</state>
</route>
<route>
<prefix>192.168.122.0</prefix>
<path-id>0</path-id>
<state>
<prefix>192.168.122.0</prefix>
<path-id>0</path-id>
<last-modified>1670176228</last-modified>
<valid-route>true</valid-route>
</state>
</route>
</routes>
</adj-rib-out-post>
<adj-rib-in-post>
<routes>
<route>
<prefix>10.10.10.0/24</prefix>
<path-id>0</path-id>
<state>
<prefix>10.10.10.0/24</prefix>
<path-id>0</path-id>
<last-modified>0</last-modified>
<valid-route>true</valid-route>
</state>
</route>
<route>
<prefix>192.168.122.0</prefix>
<path-id>0</path-id>
<state>
<prefix>192.168.122.0</prefix>
<path-id>0</path-id>
<last-modified>0</last-modified>
<valid-route>true</valid-route>
</state>
</route>
</routes>
</adj-rib-in-post>
</neighbor>
</neighbors>
</ipv4-unicast>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
</state>
</afi-safi>
</afi-safis>
</rib>
<neighbors>
<neighbor>
<neighbor-address>10.10.10.11</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV4_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
</afi-safi>
</afi-safis>
<config>
<enabled>true</enabled>
<neighbor-address>10.10.10.11</neighbor-address>
<peer-as>300</peer-as>
</config>
<state>
<enabled>true</enabled>
<neighbor-address>10.10.10.11</neighbor-address>
<peer-as>300</peer-as>
</state>
</neighbor>
</neighbors>
</bgp>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>200</name>
<enabled>true</enabled>
</config>
<state>
<enabled>true</enabled>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>200</name>
</state>
</protocol>
</protocols>
<tables>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</state>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</state>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</state>
</table>
</tables>
<table-connections>
<table-connection>
<src-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</src-protocol>
<dst-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</dst-protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<dst-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</dst-protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<dst-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">200</dst-instance>
<default-import-policy>ACCEPT_ROUTE</default-import-policy>
<src-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</src-protocol>
</config>
</table-connection>
<table-connection>
<src-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:STATIC</src-protocol>
<dst-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</dst-protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<dst-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</dst-protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<dst-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">200</dst-instance>
<default-import-policy>ACCEPT_ROUTE</default-import-policy>
<src-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:STATIC</src-protocol>
</config>
</table-connection>
</table-connections>
</network-instance>
</network-instances>
Restrictions
The containers related to RIB are status only on both Open Config and OcNOS datamodels, and there are no configuration related to this.
On OcNOS the containers are available only after the BGP negotiate routers, before it this tables are empty and could not be retrieved.
The paths /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safi/afi-safi/ipv4-unicast/loc-rib/routes/route and /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safi/afi-safi/ipv6-unicast/loc-rib/routes/route have some keys with fixed values, the table below show the values. Note the “X” indicate that is valid for IPv4 and IPv6 containers.
Open Config xpath
OcNOS xpath
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipvX-unicast/loc-rib/routes/route/origin
Use fixed value:
IPV4: “0.0.0.0”    
IPV6: “0::0”
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipvX-unicast/loc-rib/routes/route/path-id
Fixed value “0”
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipvX-unicast/loc-rib/routes/route/prefix
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/network-address
BGP RIB Counters IPv6
Release
This configuration was introduced in OcNOS version 6.2.
Configuration
The BGP RIB (Routing information base) is a set of counters to retrieve information about routes from neighbors. In this chapter will be discussed about BGP RIB IPv6.
The containers related to RIB are status only on both Open Config and OcNOS datamodels, and there are no configuration related to this.
On OcNOS the containers are available only after the BGP negotiate routers, before it this tables are empty and could not be retrieved.
The table below show which information each table displays.
OcNOS CLI
OcNOS XPath
Open Config XPath
show bgp ipv6 neighbors <IP-address IPv6> routes
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route
show bgp ipv6 neighbors <IP-address IPv6> received-routes
For default VRF instances: /ipi-bgp:bgp/bgp-instance/address-family-vrf/vrf-peer/peer-adj-in-route/next-hop
For non-default VRF instances: /ipi-bgp:bgp/bgp-instance/peer/address-family/peer-adj-in-route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-post/routes/route
show bgp ipv6 neighbors <IP-address IPv6> advertised-routes
For default VRF instances: /ipi-bgp:bgp/bgp-instance/address-family-vrf/vrf-peer/peer-adj-out-route/next-hop
For non-default VRF instances: /ipi-bgp:bgp/bgp-instance/peer/address-family/peer-adj-out-route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-post/routes/route
To get “last update” information:
show bgp ipv6 <IP-address IPv6>
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route
show bgp ipv6 unicast <IP-address IPv6>
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route
When have user-defined VRF, to get “last update” information:
show ip bgp vpnv6 vrf <VRF name>
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route
When have user-defined VRF, to get “last update” information:
show ip bgp vpnv6 vrf <VRF name> <IP-address IPv6>
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route
show bgp ipv6 summary
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/next-hop
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route
OpenConfig NETCONF Payload
N.A.
OcNOS CLI Command
The config below is just an example to illustrate to counters indicated.
To have a complete BGP RIB scenario it needs more than one equipment configured to work with BGP.
interface eth1
ipv6 address f0ca::11/48
!
router bgp 200
neighbor f0ca::10 remote-as 300
!
address-family ipv6 unicast
redistribute connected
redistribute static
neighbor f0ca::10 activate
neighbor f0ca::10 soft-reconfiguration inbound
exit-address-family
!
OcNOS NETCONF Payload
<bgp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bgp">
<bgp-instance>
<bgp-as>200</bgp-as>
<config>
<bgp-as>200</bgp-as>
</config>
<state>
<bgp-as>200</bgp-as>
<version>4</version>
<table-version>1</table-version>
<total-prefixes>0</total-prefixes>
<router-run-time-ip-address>192.168.122.60</router-run-time-ip-address>
<scan-remain-time>38</scan-remain-time>
</state>
<rib>
<address-family>
<safi>unicast</safi>
<afi>ipv6</afi>
<state>
<safi>unicast</safi>
<afi>ipv6</afi>
</state>
<routes>
<route>
<route-distinguisher>0</route-distinguisher>
<network-address>b0b0::/64</network-address>
<next-hop>
<next-hop-address>::</next-hop-address>
<state>
<next-hop-address>::</next-hop-address>
<peer-network-weight>32768</peer-network-weight>
<bgp-as-path-string>Local</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<route-local-preference>100</route-local-preference>
<last-update-route>2022-11-20T22:42:24Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<nexthop-valid-route>true</nexthop-valid-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>sourced</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>-1</bgp-tx-path-id>
<bgp-rx-path-id>-1</bgp-rx-path-id>
</state>
</next-hop>
<next-hop>
<next-hop-address>f0ca::10(fe80::5054:ff:fe78:1f3)</next-hop-address>
<state>
<next-hop-address>f0ca::10(fe80::5054:ff:fe78:1f3)</next-hop-address>
<peer-network-weight>32768</peer-network-weight>
<bgp-as-path-string>Local</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<route-local-preference>100</route-local-preference>
<last-update-route>2022-11-20T22:42:24Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<nexthop-valid-route>true</nexthop-valid-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>sourced</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>-1</bgp-tx-path-id>
<bgp-rx-path-id>-1</bgp-rx-path-id>
</state>
</next-hop>
<state>
<route-distinguisher>0</route-distinguisher>
<network-address>b0b0::/64</network-address>
</state>
</route>
<route>
<route-distinguisher>0</route-distinguisher>
<network-address>f0ca::/24</network-address>
<next-hop>
<next-hop-address>f0ca::10(fe80::5054:ff:fe78:1f3)</next-hop-address>
<state>
<next-hop-address>f0ca::10(fe80::5054:ff:fe78:1f3)</next-hop-address>
<peer-network-weight>0</peer-network-weight>
<bgp-med-value>0</bgp-med-value>
<bgp-as-path-string>300</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<network-remote-address-route>192.168.122.52</network-remote-address-route>
<originator-id-route>192.168.122.52</originator-id-route>
<route-peer-address>f0ca::10</route-peer-address>
<route-local-preference>100</route-local-preference>
<last-update-route>2022-11-20T22:43:26Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<nexthop-valid-route>true</nexthop-valid-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>external</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>-1</bgp-tx-path-id>
<bgp-rx-path-id>-1</bgp-rx-path-id>
</state>
</next-hop>
<state>
<route-distinguisher>0</route-distinguisher>
<network-address>f0ca::/24</network-address>
</state>
</route>
<route>
<route-distinguisher>0</route-distinguisher>
<network-address>f0ca::/48</network-address>
<next-hop>
<next-hop-address>::</next-hop-address>
<state>
<next-hop-address>::</next-hop-address>
<peer-network-weight>32768</peer-network-weight>
<bgp-as-path-string>Local</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<route-local-preference>100</route-local-preference>
<last-update-route>2022-11-20T22:42:24Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<nexthop-valid-route>true</nexthop-valid-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>sourced</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>-1</bgp-tx-path-id>
<bgp-rx-path-id>-1</bgp-rx-path-id>
</state>
</next-hop>
<state>
<route-distinguisher>0</route-distinguisher>
<network-address>f0ca::/48</network-address>
</state>
</route>
</routes>
</address-family>
<address-family>
<safi>link-state</safi>
<afi>link-state</afi>
<state>
<safi>link-state</safi>
<afi>link-state</afi>
</state>
</address-family>
</rib>
<address-family>
<afi>ipv6</afi>
<safi>unicast</safi>
<config>
<afi>ipv6</afi>
<safi>unicast</safi>
</config>
<state>
<afi>ipv6</afi>
<safi>unicast</safi>
</state>
<route-redistribute-list>
<protocol-type>connected</protocol-type>
<config>
<protocol-type>connected</protocol-type>
</config>
<state>
<protocol-type>connected</protocol-type>
</state>
</route-redistribute-list>
<route-redistribute-list>
<protocol-type>static</protocol-type>
<config>
<protocol-type>static</protocol-type>
</config>
<state>
<protocol-type>static</protocol-type>
</state>
</route-redistribute-list>
</address-family>
<peer>
<peer-address>f0ca::10</peer-address>
<address-family>
<afi>ipv6</afi>
<safi>unicast</safi>
<peer-adj-out-route>
<network-address>b0b0::/64</network-address>
<next-hop>
<next-hop-address>f0ca::11(fe80::5054:ff:fed0:8295)</next-hop-address>
<state>
<next-hop-address>f0ca::11(fe80::5054:ff:fed0:8295)</next-hop-address>
<peer-network-weight>32768</peer-network-weight>
<bgp-as-path-string>Local</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<route-local-preference>100</route-local-preference>
<last-update-route>2022-11-20T22:42:24Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>sourced</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>-1</bgp-tx-path-id>
<bgp-rx-path-id>-1</bgp-rx-path-id>
</state>
</next-hop>
<state>
<network-address>b0b0::/64</network-address>
</state>
</peer-adj-out-route>
<peer-adj-out-route>
<network-address>f0ca::/48</network-address>
<next-hop>
<next-hop-address>f0ca::11(fe80::5054:ff:fed0:8295)</next-hop-address>
<state>
<next-hop-address>f0ca::11(fe80::5054:ff:fed0:8295)</next-hop-address>
<peer-network-weight>32768</peer-network-weight>
<bgp-as-path-string>Local</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<route-local-preference>100</route-local-preference>
<last-update-route>2022-11-20T22:42:24Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>sourced</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>-1</bgp-tx-path-id>
<bgp-rx-path-id>-1</bgp-rx-path-id>
</state>
</next-hop>
<state>
<network-address>f0ca::/48</network-address>
</state>
</peer-adj-out-route>
<peer-adj-in-route>
<network-address>b0b0::/64</network-address>
<next-hop>
<next-hop-address>f0ca::10(fe80::5054:ff:fe78:1f3)</next-hop-address>
<state>
<next-hop-address>f0ca::10(fe80::5054:ff:fe78:1f3)</next-hop-address>
<peer-network-weight>0</peer-network-weight>
<bgp-as-path-string>300</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<network-remote-address-route>192.168.122.52</network-remote-address-route>
<route-peer-address>f0ca::10</route-peer-address>
<route-local-preference>100</route-local-preference>
<last-update-route>1970-01-01T00:00:00Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<nexthop-valid-route>false</nexthop-valid-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>external</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>0</bgp-tx-path-id>
<bgp-rx-path-id>0</bgp-rx-path-id>
</state>
</next-hop>
<state>
<network-address>b0b0::/64</network-address>
</state>
</peer-adj-in-route>
<peer-adj-in-route>
<network-address>f0ca::/24</network-address>
<next-hop>
<next-hop-address>f0ca::10(fe80::5054:ff:fe78:1f3)</next-hop-address>
<state>
<next-hop-address>f0ca::10(fe80::5054:ff:fe78:1f3)</next-hop-address>
<peer-network-weight>0</peer-network-weight>
<bgp-as-path-string>300</bgp-as-path-string>
<bgp-as-path-4-byte-origin>incomplete</bgp-as-path-4-byte-origin>
<ibgp-metric-route>0</ibgp-metric-route>
<network-remote-address-route>192.168.122.52</network-remote-address-route>
<route-peer-address>f0ca::10</route-peer-address>
<route-local-preference>100</route-local-preference>
<last-update-route>1970-01-01T00:00:00Z</last-update-route>
<reflector-client-route>false</reflector-client-route>
<route-dampening-active>false</route-dampening-active>
<history-route>false</history-route>
<nexthop-valid-route>false</nexthop-valid-route>
<med-flag-type-route>false</med-flag-type-route>
<valid-route>true</valid-route>
<stale-route>false</stale-route>
<route-type>external</route-type>
<ecmp-multi-candidate-route>false</ecmp-multi-candidate-route>
<multi-installed-route>false</multi-installed-route>
<atomic-aggregate-route>false</atomic-aggregate-route>
<selected-route>true</selected-route>
<bgp-tx-path-id>0</bgp-tx-path-id>
<bgp-rx-path-id>0</bgp-rx-path-id>
</state>
</next-hop>
<state>
<network-address>f0ca::/24</network-address>
</state>
</peer-adj-in-route>
<config>
<afi>ipv6</afi>
<safi>unicast</safi>
<activate/>
<soft-reconfig-inbound/>
</config>
<state>
<afi>ipv6</afi>
<safi>unicast</safi>
<activate/>
<soft-reconfig-inbound/>
<community-count>0</community-count>
<ipv6-next-hop-global>f0ca::11</ipv6-next-hop-global>
<ipv6-next-hop-local>fe80::5054:ff:fed0:8295</ipv6-next-hop-local>
<remote-port>54786</remote-port>
<remote-address>f0ca::10</remote-address>
<local-host>f0ca::11</local-host>
<ipv4-next-hop>192.168.122.60</ipv4-next-hop>
<local-port>179</local-port>
<peer-address-family-table-version>2</peer-address-family-table-version>
<address-family-table-version>2</address-family-table-version>
<prefix-count>2</prefix-count>
<send-prefix-count>2</send-prefix-count>
<count>1</count>
<connection-type>shared</connection-type>
<connection-established-count>1</connection-established-count>
<graceful-restart-time>0</graceful-restart-time>
<bgp-established-up-time>00:00:33</bgp-established-up-time>
<last-read-time>00:00:05</last-read-time>
<bgp-peer-state>established</bgp-peer-state>
<link-type>external</link-type>
<router-id>192.168.122.52</router-id>
<advertisement-interval>30</advertisement-interval>
<calculated-hold-time>90</calculated-hold-time>
<calculated-keepalive>30</calculated-keepalive>
<route-refresh-capability>advertised-and-received-old-and-new</route-refresh-capability>
<capability-ipv6-unicast>advertised-and-received</capability-ipv6-unicast>
<counters>
<keepalive-in-messages>2</keepalive-in-messages>
<keepalive-out-messages>2</keepalive-out-messages>
<open-messages-in>1</open-messages-in>
<open-messages-out>2</open-messages-out>
<as-path-count>2</as-path-count>
<update-message-in>1</update-message-in>
<update-message-out>1</update-message-out>
<received-packet-count>4</received-packet-count>
<notification-in>0</notification-in>
<notification-out>0</notification-out>
<packet-in-queue>0</packet-in-queue>
<packet-out-queue>0</packet-out-queue>
<sent-packet-count>5</sent-packet-count>
<refresh-received-packet-count>0</refresh-received-packet-count>
<refresh-sent-packet-count>0</refresh-sent-packet-count>
</counters>
</state>
<peer-index>
<state>
<peer-index>1</peer-index>
<offset>0</offset>
<mask>0x2</mask>
</state>
</peer-index>
</address-family>
<config>
<peer-address>f0ca::10</peer-address>
<peer-as>300</peer-as>
</config>
<state>
<peer-address>f0ca::10</peer-address>
<peer-as>300</peer-as>
</state>
</peer>
</bgp-instance>
</bgp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<state>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</state>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>200</name>
<bgp>
<global>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
</afi-safi>
</afi-safis>
<config>
<as>200</as>
</config>
<state>
<as>200</as>
<total-prefixes>0</total-prefixes>
</state>
</global>
<rib>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<ipv6-unicast>
<loc-rib>
<routes>
<route>
<prefix>b0b0::/64</prefix>
<origin>0::0</origin>
<path-id>0</path-id>
<state>
<prefix>b0b0::/64</prefix>
<origin>0.0.0.0</origin>
<path-id>0</path-id>
<last-modified>1668984144</last-modified>
<valid-route>true</valid-route>
</state>
</route>
<route>
<prefix>f0ca::/24</prefix>
<origin>0::0</origin>
<path-id>0</path-id>
<state>
<prefix>f0ca::/24</prefix>
<origin>0.0.0.0</origin>
<path-id>0</path-id>
<last-modified>1668984206</last-modified>
<valid-route>true</valid-route>
</state>
</route>
<route>
<prefix>f0ca::/48</prefix>
<origin>0::0</origin>
<path-id>0</path-id>
<state>
<prefix>f0ca::/48</prefix>
<origin>0.0.0.0</origin>
<path-id>0</path-id>
<last-modified>1668984144</last-modified>
<valid-route>true</valid-route>
</state>
</route>
</routes>
</loc-rib>
<neighbors>
<neighbor>
<neighbor-address>f0ca::10</neighbor-address>
<state>
<neighbor-address>f0ca::10</neighbor-address>
</state>
<adj-rib-out-post>
<routes>
<route>
<prefix>b0b0::/64</prefix>
<path-id>0</path-id>
<state>
<prefix>b0b0::/64</prefix>
<path-id>0</path-id>
<last-modified>1668984144</last-modified>
<valid-route>true</valid-route>
</state>
</route>
<route>
<prefix>f0ca::/48</prefix>
<path-id>0</path-id>
<state>
<prefix>f0ca::/48</prefix>
<path-id>0</path-id>
<last-modified>1668984144</last-modified>
<valid-route>true</valid-route>
</state>
</route>
</routes>
</adj-rib-out-post>
<adj-rib-in-post>
<routes>
<route>
<prefix>b0b0::/64</prefix>
<path-id>0</path-id>
<state>
<prefix>b0b0::/64</prefix>
<path-id>0</path-id>
<last-modified>0</last-modified>
<valid-route>true</valid-route>
</state>
</route>
<route>
<prefix>f0ca::/24</prefix>
<path-id>0</path-id>
<state>
<prefix>f0ca::/24</prefix>
<path-id>0</path-id>
<last-modified>0</last-modified>
<valid-route>true</valid-route>
</state>
</route>
</routes>
</adj-rib-in-post>
</neighbor>
</neighbors>
</ipv6-unicast>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
</state>
</afi-safi>
</afi-safis>
</rib>
<neighbors>
<neighbor>
<neighbor-address>f0ca::10</neighbor-address>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<config>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</config>
<state>
<afi-safi-name
xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types">oc-bgp-types:IPV6_UNICAST</afi-safi-name>
<enabled>true</enabled>
</state>
</afi-safi>
</afi-safis>
<config>
<enabled>true</enabled>
<neighbor-address>f0ca::10</neighbor-address>
<peer-as>300</peer-as>
</config>
<state>
<enabled>true</enabled>
<neighbor-address>f0ca::10</neighbor-address>
<peer-as>300</peer-as>
</state>
</neighbor>
</neighbors>
</bgp>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>200</name>
<enabled>true</enabled>
</config>
<state>
<enabled>true</enabled>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</identifier>
<name>200</name>
</state>
</protocol>
</protocols>
<tables>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</state>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</state>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</state>
</table>
</tables>
<interfaces>
<interface>
<id>eth0</id>
<config>
<id>eth0</id>
<interface>eth0</interface>
</config>
</interface>
<interface>
<id>eth1</id>
<config>
<id>eth1</id>
<interface>eth1</interface>
</config>
</interface>
<interface>
<id>eth2</id>
<config>
<id>eth2</id>
<interface>eth2</interface>
</config>
</interface>
<interface>
<id>eth3</id>
<config>
<id>eth3</id>
<interface>eth3</interface>
</config>
</interface>
<interface>
<id>eth4</id>
<config>
<id>eth4</id>
<interface>eth4</interface>
</config>
</interface>
<interface>
<id>eth5</id>
<config>
<id>eth5</id>
<interface>eth5</interface>
</config>
</interface>
<interface>
<id>eth6</id>
<config>
<id>eth6</id>
<interface>eth6</interface>
</config>
</interface>
<interface>
<id>eth7</id>
<config>
<id>eth7</id>
<interface>eth7</interface>
</config>
</interface>
<interface>
<id>eth8</id>
<config>
<id>eth8</id>
<interface>eth8</interface>
</config>
</interface>
<interface>
<id>lo</id>
<config>
<id>lo</id>
<interface>lo</interface>
</config>
</interface>
</interfaces>
<table-connections>
<table-connection>
<src-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</src-protocol>
<dst-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</dst-protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<dst-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</dst-protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<dst-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">200</dst-instance>
<default-import-policy>ACCEPT_ROUTE</default-import-policy>
<src-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</src-protocol>
</config>
</table-connection>
<table-connection>
<src-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:STATIC</src-protocol>
<dst-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</dst-protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<dst-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:BGP</dst-protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<dst-instance xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments">200</dst-instance>
<default-import-policy>ACCEPT_ROUTE</default-import-policy>
<src-protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:STATIC</src-protocol>
</config>
</table-connection>
</table-connections>
</network-instance>
<network-instance>
<name>management</name>
<config>
<name>management</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
</config>
<state>
<name>management</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:L3VRF</type>
<enabled>true</enabled>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</enabled-address-families>
<enabled-address-families
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</enabled-address-families>
</state>
<protocols>
<protocol>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<config>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</config>
<state>
<identifier
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</identifier>
<name>DIRECTLY_CONNECTED</name>
<enabled>true</enabled>
</state>
</protocol>
</protocols>
<tables>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV4</address-family>
</state>
</table>
<table>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
<config>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</config>
<state>
<protocol
xmlns:oc-pol-types="http://openconfig.net/yang/policy-types">oc-pol-types:DIRECTLY_CONNECTED</protocol>
<address-family
xmlns:oc-types="http://openconfig.net/yang/openconfig-types">oc-types:IPV6</address-family>
</state>
</table>
</tables>
</network-instance>
</network-instances>
Restrictions
The containers related to RIB are status only on both Open Config and OcNOS datamodels, and there are no configuration related to this.
On OcNOS the containers are available only after the BGP negotiate routers, before it this tables are empty and could not be retrived.
The paths /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safi/afi-safi/ipv4-unicast/loc-rib/routes/route and /oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safi/afi-safi/ipv6-unicast/loc-rib/routes/route have some keys with fixed values, the table below show the values. Note the “X” indicate that is valid for IPv4 and IPv6 containers.
Open Config xpath
OcNOS xpath
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipvX-unicast/loc-rib/routes/route/origin
Use fixed value:
IPV4: “0.0.0.0”    
IPV6: “0::0”
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipvX-unicast/loc-rib/routes/route/path-id
Fixed value “0”
/oc-netinst:network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipvX-unicast/loc-rib/routes/route/prefix
/ipi-bgp:bgp/bgp-instance/rib/address-family/routes/route/network-address
Last modified date: 07/14/2023