All Downloads are FREE. Search and download functionalities are using the official Maven repository.

initial.routing-policy-config.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
  ~
  ~ This program and the accompanying materials are made available under the
  ~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
  ~ and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<routing-policy xmlns="http://openconfig.net/yang/routing-policy">
    <policy-definitions>
        <policy-definition>
            <name>default-odl-import-policy</name>
            <statements>
                <statement>
                    <name>from-external</name>
                    <conditions>
                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
                            <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <from-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-ebgp"]</role-set>
                                </from-role>
                            </match-role-set>
                        </bgp-conditions>
                    </conditions>
                    <actions>
                        <reject-route/>
                    </actions>
                </statement>
                <statement>
                    <name>from-non-external</name>
                    <conditions>
                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
                            <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <from-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-ebgp"]</role-set>
                                    <match-set-options>INVERT</match-set-options>
                                </from-role>
                            </match-role-set>
                            <!--https://tools.ietf.org/html/rfc4456#section-8-->
                            <match-originator-id-set-condition xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <originator-id-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/originator-id-sets/originator-id-set[originator-set-name="local-originator-id"]</originator-id-set>
                                <match-set-options>INVERT</match-set-options>
                            </match-originator-id-set-condition>
                            <match-cluster-id-set-condition xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <cluster-id-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/cluster-id-sets/cluster-id-set[cluster-set-name="local-cluster-id"]</cluster-id-set>
                                <match-set-options>INVERT</match-set-options>
                            </match-cluster-id-set-condition>
                        </bgp-conditions>
                    </conditions>
                    <actions>
                        <accept-route/>
                    </actions>
                </statement>
            </statements>
        </policy-definition>
        <policy-definition>
            <name>default-odl-export-policy</name>
            <statements>
                <statement>
                    <name>to-odl-internal</name>
                    <conditions>
                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
                            <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <to-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-internal"]</role-set>
                                </to-role>
                            </match-role-set>
                        </bgp-conditions>
                    </conditions>
                    <actions>
                        <reject-route/>
                    </actions>
                </statement>
                <statement>
                    <name>to-external</name>
                    <conditions>
                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
                            <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <from-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="all"]</role-set>
                                </from-role>
                                <to-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-ebgp"]</role-set>
                                </to-role>
                            </match-role-set>
                        </bgp-conditions>
                    </conditions>
                    <actions>
                        <reject-route/>
                    </actions>
                </statement>
                <statement>
                    <name>from-internal-to-internal</name>
                    <conditions>
                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
                            <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <from-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-ibgp"]</role-set>
                                </from-role>
                                <to-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-ibgp"]</role-set>
                                </to-role>
                            </match-role-set>
                        </bgp-conditions>
                    </conditions>
                    <actions>
                        <reject-route/>
                    </actions>
                </statement>
                <statement>
                    <name>from-external-to-internal</name>
                    <conditions>
                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
                            <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <from-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-ebgp"]</role-set>
                                </from-role>
                                <to-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-ibgp"]</role-set>
                                </to-role>
                            </match-role-set>
                        </bgp-conditions>
                    </conditions>
                    <actions>
                        <accept-route/>
                    </actions>
                </statement>
                <statement>
                    <name>from-odl-internal-to-internal-or-rr-client</name>
                    <conditions>
                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
                            <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <from-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-internal"]</role-set>
                                </from-role>
                                <to-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="ibgp-rr-client"]</role-set>
                                </to-role>
                            </match-role-set>
                        </bgp-conditions>
                    </conditions>
                    <actions>
                        <accept-route/>
                    </actions>
                </statement>
                <statement>
                    <name>from-rr-client-to-internal</name>
                    <conditions>
                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
                            <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <from-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-rr-client"]</role-set>
                                </from-role>
                                <to-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-ibgp"]</role-set>
                                </to-role>
                            </match-role-set>
                        </bgp-conditions>
                    </conditions>
                    <actions>
                        <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
                            <set-cluster-id-prepend xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"/>
                            <set-originator-id-prepend xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"/>
                        </bgp-actions>
                    </actions>
                </statement>
                <statement>
                    <name>from-external-to-route-reflector</name>
                    <conditions>
                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
                            <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <from-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-ebgp"]</role-set>
                                </from-role>
                                <to-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-rr-client"]</role-set>
                                </to-role>
                            </match-role-set>
                        </bgp-conditions>
                    </conditions>
                    <actions>
                        <accept-route/>
                    </actions>
                </statement>
                <statement>
                    <name>from-internal-or-rr-client-to-route-reflector</name>
                    <conditions>
                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
                            <afi-safi-not-in xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions"
                                             xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">x:ROUTE-TARGET-CONSTRAIN</afi-safi-not-in>
                            <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <from-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="ibgp-rr-client"]</role-set>
                                </from-role>
                                <to-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-rr-client"]</role-set>
                                </to-role>
                            </match-role-set>
                        </bgp-conditions>
                    </conditions>
                    <actions>
                        <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
                            <set-cluster-id-prepend xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"/>
                            <set-originator-id-prepend xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"/>
                        </bgp-actions>
                    </actions>
                </statement>
                <statement>
                    <name>from-internal-or-rr-client-to-route-RTC</name>
                    <conditions>
                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
                            <afi-safi-in xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">x:ROUTE-TARGET-CONSTRAIN</afi-safi-in>
                            <match-role-set xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                                <from-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="ibgp-rr-client"]</role-set>
                                </from-role>
                                <to-role>
                                    <role-set>/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set[role-set-name="only-rr-client"]</role-set>
                                </to-role>
                            </match-role-set>
                        </bgp-conditions>
                    </conditions>
                    <actions>
                        <bgp-actions xmlns="http://openconfig.net/yang/bgp-policy">
                            <set-originator-id-prepend xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"/>
                            <set-next-hop>SELF</set-next-hop>
                        </bgp-actions>
                    </actions>
                </statement>
                <statement>
                    <name>vpn-membership-RTC</name>
                    <conditions>
                        <bgp-conditions xmlns="http://openconfig.net/yang/bgp-policy">
                            <afi-safi-in xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-in>
                            <afi-safi-in xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV6-UNICAST</afi-safi-in>
                            <vpn-non-member xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"/>
                        </bgp-conditions>
                    </conditions>
                    <actions>
                        <reject-route/>
                    </actions>
                </statement>
            </statements>
        </policy-definition>
    </policy-definitions>
    <defined-sets>
        <bgp-defined-sets xmlns="http://openconfig.net/yang/bgp-policy">
            <role-sets xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                <role-set>
                    <role-set-name>only-ibgp</role-set-name>
                    <role>ibgp</role>
                </role-set>
                <role-set>
                    <role-set-name>only-rr-client</role-set-name>
                    <role>rr-client</role>
                </role-set>
                <role-set>
                    <role-set-name>only-ebgp</role-set-name>
                    <role>ebgp</role>
                </role-set>
                <role-set>
                    <role-set-name>only-internal</role-set-name>
                    <role>internal</role>
                </role-set>
                <role-set>
                    <role-set-name>ibgp-rr-client</role-set-name>
                    <role>ibgp</role>
                    <role>rr-client</role>
                </role-set>
                <role-set>
                    <role-set-name>all</role-set-name>
                    <role>ebgp</role>
                    <role>ibgp</role>
                    <role>rr-client</role>
                    <role>internal</role>
                </role-set>
            </role-sets>
            <originator-id-sets xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                <originator-id-set>
                    <originator-id-set-name>local-originator-id</originator-id-set-name>
                    <local/>
                </originator-id-set>
            </originator-id-sets>
            <cluster-id-sets xmlns="urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy">
                <cluster-id-set>
                    <cluster-id-set-name>local-cluster-id</cluster-id-set-name>
                    <local/>
                </cluster-id-set>
            </cluster-id-sets>
        </bgp-defined-sets>
    </defined-sets>
</routing-policy>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy