RIB Policy Configuration

The OpenDaylight BGP implementation supports configurable RIB policies that allow the modification of import and export policies.

Note

Default ODL BGP RIB Config Policy is provided. Default policy is compliant with default behaviour from RFC8212. Any config policy to be used by Protocol must be configured and present before than Protocol configuration is added. If policy is reconfigured, protocol must be re configured again.

URL: /rests/data/openconfig-routing-policy:routing-policy?content=config

Method: GET

Content-Type: application/xml

Request Body:

 1<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
 2    <defined-sets>
 3        <bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
 4            <cluster-id-sets xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
 5                ...
 6            </cluster-id-sets>
 7            <role-sets xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
 8                ...
 9            </role-sets>
10            <originator-id-sets xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
11                ...
12            </originator-id-sets>
13        </bgp-defined-sets>
14    </defined-sets>
15    <policy-definitions>
16        <policy-definition>
17            <name>default-odl-export-policy</name>
18            <statements>
19                <statement>
20                    <name>to-odl-internal</name>
21                    <actions>
22                        <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
23                            ...
24                        </bgp-actions>
25                    </actions>
26                    <conditions>
27                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
28                            ...
29                        </bgp-conditions>
30                    </conditions>
31                </statement>
32                ...
33            </statements>
34        </policy-definition>
35        <policy-definition>
36            <name>default-odl-import-policy</name>
37            ...
38        </policy-definition>
39    </policy-definitions>
40</routing-policy>

@line 2: BGP defined sets.

@line 15: Policy definitions.

Policy Configuration

Conditions may include multiple match or comparison operations; similarly, actions may consist of a multitude of changes to route attributes or a final disposition regarding the acceptance or rejection of the route.

URL: /rests/data/openconfig-routing-policy:routing-policy/openconfig-routing-policy:policy-definitions

Method: POST

Content-Type: application/xml

Request Body:

 1<policy-definition xmlns="http://openconfig.net/yang/routing-policy">
 2    <name>odl-policy-example</name>
 3    <statements>
 4        <statement>
 5            <name>reject-all-incoming-routes</name>
 6            <actions>
 7                <reject-route/>
 8            </actions>
 9            <conditions>
10                <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
11                    <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
12                        <from-role>
13                           <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="all"]</role-set>
14                        </from-role>
15                    </match-role-set>
16                </bgp-conditions>
17            </conditions>
18        </statement>
19    </statements>
20</policy-definition>

@line 2: The unique policy instance identifier.

@line 5: Policy Statement Identifier.

@line 7: Actions.

@line 10: BGP Conditions.


The new instance presence can be verified via REST:

URL: /rests/data/openconfig-routing-policy:routing-policy/openconfig-routing-policy:policy-definitions/policy-definition=odl-policy-example

Method: GET

Response Body:

 1<policy-definition xmlns="http://openconfig.net/yang/routing-policy">
 2    <name>odl-policy-example</name>
 3    <statements>
 4        <statement>
 5            <name>reject-all-incoming-routes</name>
 6            <actions>
 7                <reject-route></reject-route>
 8            </actions>
 9            <conditions>
10                <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
11                    <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
12                        <from-role>
13                            <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="all"]</role-set>
14                            <match-set-options>ANY</match-set-options>
15                        </from-role>
16                    </match-role-set>
17                </bgp-conditions>
18            </conditions>
19        </statement>
20    </statements>
21</policy-definition>

@line 2: Policy definition Identifier.

@line 5: Policy Statement Identifier.

Actions

ODL BGP by default provides support for a group of BGP Actions.

Accept

Default policy to accept the route.

1<actions>
2    <accept-route/>
3</actions>

Reject

Default policy to reject the route.

1<actions>
2   <reject-route/>
3</actions>

As-path prepend

Action to prepend local AS number to the AS-path

1<actions>
2   <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
3       <set-as-path-prepend/>
4   </bgp-actions>
5</actions>

Originator Id prepend

Action to prepend Originator Id. In case there is non Originator Id present, local Originator Id is prepend.

  • Local

1<bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
2   <set-originator-id-prepend xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"/>
3</bgp-actions>
  • By value

1<bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
2    <set-originator-id-prepend xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
3        <originator-id>192.0.2.1</originator-id>
4    </set-originator-id-prepend>
5</bgp-actions>

Cluster Id prepend

Action to prepend local Cluster Id to Cluster Id List.

1<actions>
2    <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
3        <set-cluster-id-prepend xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"/>
4    </bgp-actions>
5</actions>

Set Route Origin

Set the origin attribute to the specified value.

1<actions>
2    <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
3        <set-route-origin>IGP</set-route-origin>
4    </bgp-actions>
5</actions>

Set Local Preference

Set the local pref attribute on the route update.

1<actions>
2    <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
3        <set-local-pref>100</set-local-pref>
4    </bgp-actions>
5</actions>

Set NextHop

Set the next-hop attribute in the route update.

  • Local

1<actions>
2    <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
3        <set-next-hop>SELF</set-next-hop>
4    </bgp-actions>
5</actions>
  • By value

1<actions>
2    <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
3        <set-next-hop>4.5.6.7</set-next-hop>
4    </bgp-actions>
5</actions>

Set MED

Set the med metric attribute in the route update.

1<actions>
2    <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
3        <set-med>15</set-med>
4    </bgp-actions>
5</actions>

Community set prepend

Action to set the community attributes of the route, along with options to modify how the community is modified.

  • Inline

 1<actions>
 2    <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <set-community>
 4            <communities>
 5                <as-number>65</as-number>
 6                <semantics>10</semantics>
 7            </communities>
 8            <communities>
 9                <as-number>66</as-number>
10                <semantics>11</semantics>
11            </communities>
12            <options>ADD</options>
13        </set-community>
14    </bgp-actions>
15</actions>

@line 3: Set Community.

  • By reference

 1<actions>
 2    <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <set-community>
 4            <community-set-ref>
 5                /rpol:routing-policy/rpol:defined-sets/rpol:community-sets/community-set[community-set-name="community-set-name-example"]
 6            </community-set-ref>
 7            <options>ADD</options>
 8        </set-community>
 9    </bgp-actions>
10</actions>

@line 3: Set Community.

@line 5: Community set reference.

@line 7: Options are ADD, REMOVE, REPLACE.


Defined set

 1<defined-sets>
 2    <bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
 3        <community-sets>
 4            <community-set>
 5                <community-set-name>community-set-name-test</community-set-name>
 6                <communities>
 7                    <as-number>65</as-number>
 8                    <semantics>10</semantics>
 9                </communities>
10                <communities>
11                    <as-number>66</as-number>
12                    <semantics>11</semantics>
13                </communities>
14            </community-set>
15        </community-sets>
16    </bgp-defined-sets>
17</defined-sets>

@line 3: Community set.

Extended Community set action

Action to set the extended community attributes of the route, along with options to modify how the community is modified.

  • Inline

 1<actions>
 2    <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <set-ext-community>
 4            <ext-community-member>
 5                <encapsulation-extended-community>
 6                    <tunnel-type>vxlan</tunnel-type>
 7                </encapsulation-extended-community>
 8            </ext-community-member>
 9            <ext-community-member>
10                <as-4-route-origin-extended-community>
11                    <as-4-specific-common>
12                        <as-number>65000</as-number>
13                        <local-administrator>123</local-administrator>
14                    </as-4-specific-common>
15                </as-4-route-origin-extended-community>
16            </ext-community-member>
17            <options>ADD</options>
18        </set-ext-community>
19    </bgp-actions>
20</actions>

@line 3: Set Extended Community.

  • By reference

 1<actions>
 2    <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <set-ext-community>
 4            <ext-community-set-ref>
 5                /rpol:routing-policy/rpol:defined-sets/rpol:ext-community-sets/ext-community-set[ext-community-set-name="ext-community-set-name-example"]
 6            </ext-community-set-ref>
 7            <options>REMOVE</options>
 8        </set-ext-community>
 9    </bgp-actions>
10</actions>

@line 3: Set Extended Community.

@line 5: Extended Community set reference.

@line 7: Options are ADD, REMOVE, REPLACE.


Defined set

 1<defined-sets>
 2    <bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
 3        <ext-community-sets>
 4            <ext-community-set>
 5                <ext-community-set-name>ext-community-set-name-test</ext-community-set-name>
 6                <ext-community-member>
 7                    <encapsulation-extended-community>
 8                        <tunnel-type>vxlan</tunnel-type>
 9                    </encapsulation-extended-community>
10                </ext-community-member>
11                <ext-community-member>
12                    <as-4-route-origin-extended-community>
13                        <as-4-specific-common>
14                            <as-number>65000</as-number>
15                            <local-administrator>123</local-administrator>
16                        </as-4-specific-common>
17                    </as-4-route-origin-extended-community>
18                </ext-community-member>
19            </ext-community-set>
20        </ext-community-sets>
21    </bgp-defined-sets>
22</defined-sets>

@line 3: Extendend Community set.

@line 5: Extendend Community set name.

Filter Non transitive attributes

Filters attributes, removing non transitive attributes.

1<actions>
2    <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
3        <non-transitive-attributes-filter xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"/>
4    </bgp-actions>
5</actions>

Client Attribute Prepend

Replace attributes per any VPN Route attributes from client Peer, if present.

1<actions>
2    <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
3        <client-attribute-prepend xmlns="urn:opendaylight:params:xml:ns:yang:bgp:route:target:constrain"/>
4    </bgp-actions>
5</actions>

Conditions

ODL BGP by default provides support for a group of BGP Conditions.

Match BGP Neighbor Set

 1<conditions>
 2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <match-bgp-neighbor-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
 4            <from-neighbor>
 5                <neighbor-set>/rpol:routing-policy/rpol:defined-sets/rpol:neighbor-sets/neighbor-set[neighbor-set-name="bgp-neighbor-set-example"]</neighbor-set>
 6                <match-set-options>INVERT</match-set-options>
 7            </from-neighbor>
 8        </match-bgp-neighbor-set>
 9    </bgp-conditions>
10</conditions>

@line 3: Match BGP Neighbor Condition set.

@line 4: Match BGP Neighbor from whom we receive the route.

@line 5: Match BGP Neighbor Set reference.

@line 6: Match Set Options (ANY, INVERT)

 1<conditions>
 2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <match-bgp-neighbor-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
 4            <to-neighbor>
 5                <neighbor-set>/rpol:routing-policy/rpol:defined-sets/rpol:neighbor-sets/neighbor-set[neighbor-set-name="bgp-neighbor-set-example"]</neighbor-set>
 6                <match-set-options>INVERT</match-set-options>
 7            </to-neighbor>
 8        </match-bgp-neighbor-set>
 9    </bgp-conditions>
10</conditions>

@line 3: Match BGP Neighbor Condition set.

@line 4: Match BGP Neighbor to whom we send the route.

@line 5: Match BGP Neighbor Set reference.

@line 6: Match Set Options (ANY, INVERT)

 1<conditions>
 2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <match-bgp-neighbor-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
 4            <from-neighbor>
 5                <neighbor-set>/rpol:routing-policy/rpol:defined-sets/rpol:neighbor-sets/neighbor-set[neighbor-set-name="bgp-neighbor-set-example"]</neighbor-set>
 6            </from-neighbor>
 7            <to-neighbor>
 8                <neighbor-set>/rpol:routing-policy/rpol:defined-sets/rpol:neighbor-sets/neighbor-set[neighbor-set-name="bgp-neighbor-set-example"]</neighbor-set>
 9                <match-set-options>INVERT</match-set-options>
10            </to-neighbor>
11        </match-bgp-neighbor-set>
12    </bgp-conditions>
13</conditions>

@line 3: Match BGP Neighbor Condition set.

@line 4: Match BGP Neighbor from whom we receive the route.

@line 5: Match BGP Neighbor Set reference.

@line 7: Match BGP Neighbor to whom we send the route.

@line 8: Match BGP Neighbor Set reference.

@line 9: Match Set Options (ANY, INVERT)


Defined set

 1<defined-sets>
 2    <neighbor-sets>
 3        <neighbor-set>
 4            <neighbor-set-name>bgp-neighbor-set-example</neighbor-set-name>
 5            <neighbor>
 6                <address>127.0.0.1</address>
 7            </neighbor>
 8            <neighbor>
 9                <address>127.0.0.2</address>
10            </neighbor>
11        </neighbor-set>
12    </neighbor-sets>
13</defined-sets>

@line 3: Originator Id Set.

@line 5: Originator Id Set name.

Match Originator Id Set

 1<conditions>
 2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <match-originator-id-set-condition xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
 4            <originator-id-set>
 5                /rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/originator-id-sets/originator-id-set[originator-set-name="local-originator-id"]
 6            </originator-id-set>
 7            <match-set-options>INVERT</match-set-options>
 8        </match-originator-id-set-condition>
 9    </bgp-conditions>
10</conditions>

@line 3: Match Originator Id Condition set.

@line 5: Match Originator Id Set reference.

@line 7: Match Set Options (ANY, INVERT)


Defined set

 1<defined-sets>
 2    <bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
 3        <originator-id-sets xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
 4            <originator-id-set>
 5                <originator-id-set-name>local-originator-id</originator-id-set-name>
 6                <local/>
 7            </originator-id-set>
 8        </originator-id-sets>
 9    </bgp-defined-sets>
10</defined-sets>

@line 3: Originator Id Set.

@line 5: Originator Id Set name.

Match Cluster Id Set

 1<conditions>
 2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <match-cluster-id-set-condition xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
 4            <cluster-id-set>
 5                /rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/cluster-id-sets/cluster-id-set[cluster-set-name="local-cluster-id"]
 6            </cluster-id-set>
 7            <match-set-options>INVERT</match-set-options>
 8        </match-cluster-id-set-condition>
 9    </bgp-conditions>
10</conditions>

@line 3: Match Cluster Id Condition set.

@line 5: Match Cluster Id Set reference.


Defined set

 1<defined-sets>
 2    <bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
 3        <cluster-id-sets xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
 4            <cluster-id-set>
 5                <cluster-id-set-name>local-cluster-id</cluster-id-set-name>
 6                <local/>
 7            </cluster-id-set>
 8        </cluster-id-sets>
 9    </bgp-defined-sets>
10</defined-sets>

@line 3: Cluster Id Set.

@line 5: Cluster Id Set name.

Match Peer Role Set

 1<conditions>
 2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
 4            <from-role>
 5                <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-ibgp"]</role-set>
 6                <match-set-options>INVERT</match-set-options>
 7            </from-role>
 8            <to-role>
 9                <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="all"]</role-set>
10            <to-role>
11        </match-role-set>
12    </bgp-conditions>
13</conditions>

@line 3: Match Role Set.

@line 5: Match Role Set reference.

@line 6: Match Set Options (ANY, INVERT)


Defined set

 1<defined-sets>
 2    <bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
 3        <role-set>
 4            <role-set-name>all</role-set-name>
 5            <role>ebgp</role>
 6            <role>ibgp</role>
 7            <role>rr-client</role>
 8            <role>internal</role>
 9        </role-set>
10        <role-set>
11            <role-set-name>only-ibgp</role-set-name>
12            <role>ibgp</role>
13        </role-set>
14    </bgp-defined-sets>
15</defined-sets>

@line 3: Role Set.

@line 4: Role Set name.

@line 10: Role Set.

@line 11: Role Id Set name.

Match AS Path Set

 1<conditions>
 2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <match-as-path-set>
 4            <as-path-set>
 5                /rpol:routing-policy/rpol:defined-sets/bgp-pol:bgp-defined-sets/bgp-pol:as-path-sets/bgp-pol:as-path-set/[as-path-set-name="as-path-set-example"]
 6            </as-path-set>
 7            <match-set-options>ANY</match-set-options>
 8        </match-as-path-set>
 9    </bgp-conditions>
10</conditions>

@line 3: Match AS Path Set.

@line 5: AS Path Set reference.

@line 7: Match Set Option(ANY, ALL, INVERT).


Defined set

 1<defined-sets>
 2    <bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
 3        <as-path-sets>
 4            <as-path-set>
 5                <as-path-set-name>as-path-set-example</as-path-set-name>
 6                <as-path-set-member>65</as-path-set-member>
 7                <as-path-set-member>64</as-path-set-member>
 8                <as-path-set-member>63</as-path-set-member>
 9            </as-path-set>
10        </as-path-sets>
11    </bgp-defined-sets>
12</defined-sets>

@line 4: AS Path Set.

@line 5: AS Path Set name.

@line 6: AS Path set member

Match Community Set

 1<conditions>
 2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <match-community-set>
 4            <community-set>
 5                /rpol:routing-policy/rpol:defined-sets/rpol:community-sets/community-set[community-set-name="community-set-name-example"]
 6            </community-set>
 7            <match-set-options>ANY</match-set-options>
 8        </match-community-set>
 9    </bgp-conditions>
10</conditions>

@line 3: Match Community Set.

@line 5: Match Community Set reference.

@line 7: Match Set Option(ANY, ALL, INVERT).


Defined set

 1<defined-sets>
 2    <bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
 3        <community-sets>
 4            <community-set>
 5                <community-set-name>community-set-name-example</community-set-name>
 6                <communities>
 7                    <as-number>65</as-number>
 8                    <semantics>10</semantics>
 9                </communities>
10                <communities>
11                    <as-number>66</as-number>
12                    <semantics>11</semantics>
13                </communities>
14            </community-set>
15        </community-sets>
16    </bgp-defined-sets>
17</defined-sets>

@line 4: Community Set.

@line 5: Community Set name.

@line 6: Communities.

@line 10: Communities.

Match Extended Community Set

 1<conditions>
 2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
 3        <match-ext-community-set>
 4            <ext-community-set>
 5                /rpol:routing-policy/rpol:defined-sets/rpol:ext-community-sets/ext-community-set[ext-community-set-name="ext-community-set-name-test"]
 6            </ext-community-set>
 7            <match-set-options>ANY</match-set-options>
 8        </match-ext-community-set>
 9    </bgp-conditions>
10</conditions>

@line 3: Match Extended Community Set.

@line 5: Match Extended Community Set reference.

@line 7: Match Set Option(ANY, ALL, INVERT).


Defined set

 1<defined-sets>
 2    <bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
 3        <ext-community-sets>
 4            <ext-community-set>
 5                <ext-community-set-name>ext-community-set-name-test</ext-community-set-name>
 6                <ext-community-member>
 7                    <encapsulation-extended-community>
 8                        <tunnel-type>vxlan</tunnel-type>
 9                    </encapsulation-extended-community>
10                </ext-community-member>
11                <ext-community-member>
12                    <as-4-route-origin-extended-community>
13                        <as-4-specific-common>
14                            <as-number>65000</as-number>
15                            <local-administrator>123</local-administrator>
16                        </as-4-specific-common>
17                    </as-4-route-origin-extended-community>
18                </ext-community-member>
19            </ext-community-set>
20        </ext-community-sets>
21    </bgp-defined-sets>
22</defined-sets>

@line 4: Extended Community Set.

@line 5: Extended Community Set name.

@line 6: Extended Communities.

@line 11: Extended Communities.

Match in Afi Safi

1<conditions>
2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
3        <afi-safi-in xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-in>
4    </bgp-conditions>
5</conditions>

@line 3: Afi Safi match.

Match not in Afi Safi

1<conditions>
2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
3        <afi-safi-not-in xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"
4        xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-not-in>
5        <afi-safi-not-in xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"
6        xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-not-in>
7    </bgp-conditions>
8</conditions>

@line 3: Afi Safi not in match.

Match As Path Length

1<conditions>
2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
3        <as-path-length>
4            <operator xmlns:x="http://openconfig.net/yang/policy-types">x:attribute-eq</operator>
5            <value>2</value>
6        </as-path-length>
7    </bgp-conditions>
8</conditions>

@line 3: As Path Length match.

Match Local Pref

1<conditions>
2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
3        <local-pref-eq>100</local-pref-eq>
4    </bgp-conditions>
5</conditions>

@line 3: Local Preference match.

Match Origin

1<conditions>
2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
3        <origin-eq>IGP</origin-eq>
4    </bgp-conditions>
5</conditions>

@line 3: Origin match.

Match MED

1<conditions>
2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
3        <med-eq>100</med-eq>
4    </bgp-conditions>
5</conditions>

@line 3: MED match.

Match Next Hop

1<conditions>
2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
3        <next-hop-in>192.168.2.2</next-hop-in>
4        <next-hop-in>42.42.42.42</next-hop-in>
5    </bgp-conditions>
6</conditions>

@line 3: Next hop match.

Match VPN Non member

True if Route Targets attributes does not match with any Route Target Contrain advertized per Advertized peer.

1<conditions>
2    <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
3        <vpn-non-member xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"/>
4    </bgp-conditions>
5</conditions>

@line 3: VPN Non member match.