Additional Path Capability

The ADD-PATH capability allows to advertise multiple paths for the same address prefix. It can help with optimal routing and routing convergence in a network by providing potential alternate or backup paths.

Configuration

This section shows a way to enable ADD-PATH capability in BGP speaker and peer configuration.

Note

The capability is applicable for IP Unicast, IP Labeled Unicast and Flow Specification address families.

BGP Speaker

To enable ADD-PATH capability in BGP plugin, first configure BGP speaker instance:

URL: /restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols

RFC8040 URL: /rests/data/openconfig-network-instance:network-instances/network-instance=global-bgp/protocols

Method: POST

Content-Type: application/xml

Request Body:

 1<protocol xmlns="http://openconfig.net/yang/network-instance">
 2    <name>bgp-example</name>
 3    <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
 4    <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
 5        <global>
 6            <config>
 7                <router-id>192.0.2.2</router-id>
 8                <as>65000</as>
 9            </config>
10            <afi-safis>
11                <afi-safi>
12                    <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
13                    <receive>true</receive>
14                    <send-max>2</send-max>
15                </afi-safi>
16            </afi-safis>
17        </global>
18    </bgp>
19</protocol>

@line 14: Defines path selection strategy: send-max > 1 -> Advertise N Paths or send-max = 0 -> Advertise All Paths

Here is an example for update a specific family with enable ADD-PATH capability

URL: /restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/global/afi-safis/afi-safi/openconfig-bgp-types:IPV4%2DUNICAST

Method: PUT

Content-Type: application/xml

Request Body:

<afi-safi xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
    <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
    <receive>true</receive>
    <send-max>0</send-max>
</afi-safi>

BGP Peer

Here is an example for BGP peer configuration with enabled ADD-PATH capability.

URL: /restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors

Method: POST

Content-Type: application/xml

Request Body:

<neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
    <neighbor-address>192.0.2.1</neighbor-address>
    <afi-safis>
        <afi-safi>
            <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
        </afi-safi>
        <afi-safi>
            <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
            <receive>true</receive>
            <send-max>0</send-max>
        </afi-safi>
    </afi-safis>
</neighbor>

Note

The path selection strategy is not configurable on per peer basis. The send-max presence indicates a willingness to send ADD-PATH NLRIs to the neighbor.

Here is an example for update specific family BGP peer configuration with enabled ADD-PATH capability.

URL: /restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/192.0.2.1/afi-safis/afi-safi/openconfig-bgp-types:IPV4%2DUNICAST

Method: PUT

Content-Type: application/xml

Request Body:

<afi-safi xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
   <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
   <receive>true</receive>
   <send-max>0</send-max>
</afi-safi>

Usage

The IPv4 Unicast table with enabled ADD-PATH capability in an instance of the speaker’s Loc-RIB can be verified via REST:

URL: /restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes

Method: GET

Response Body:

 1<ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
 2    <ipv4-route>
 3        <path-id>1</path-id>
 4        <prefix>193.0.2.1/32</prefix>
 5        <attributes>
 6            <as-path></as-path>
 7            <origin>
 8                <value>igp</value>
 9            </origin>
10            <local-pref>
11                <pref>100</pref>
12            </local-pref>
13            <ipv4-next-hop>
14                <global>10.0.0.1</global>
15            </ipv4-next-hop>
16        </attributes>
17    </ipv4-route>
18    <ipv4-route>
19        <path-id>2</path-id>
20        <prefix>193.0.2.1/32</prefix>
21        <attributes>
22            <as-path></as-path>
23            <origin>
24                <value>igp</value>
25            </origin>
26            <local-pref>
27                <pref>100</pref>
28            </local-pref>
29            <ipv4-next-hop>
30                <global>10.0.0.2</global>
31            </ipv4-next-hop>
32        </attributes>
33    </ipv4-route>
34</ipv4-routes>

@line 3: The routes with the same destination are distinguished by path-id attribute.

References