Jump to: navigation, search

BGP LS PCEP:Helium User Guide

In case this guide does not lead to desired results, please consult also the thoubleshooting page.

BGP

OpenDaylight SP edition comes pre-configured with baseline BGP configuration. You can find it in the opendaylight/configuration/initial directory and it consists of two files:

  • 31-bgp.xml, which defines the basic parser and RIB support. Unless you need to add a new AFI/SAFI, you should keep this file as is
  • 41-bgp-example.xml, which contains a sample configuration which needs to be customized to your deployment.

Currently the configuration for BGP peer is ignored in the configuration, to prevent the client from starting with default configuration. Therefore the first step is to uncomment ALL the commented parts in this file.

BGP Client configuration

1. Adjust values for initial BGP Open message

<module>
    <type>prefix:rib-impl</type>
    <name>example-bgp-rib</name>
    <rib-id>example-bgp-rib</rib-id>
    <local-as>64496</local-as>         // Our AS number, we use this in best path selection
    <bgp-id>192.0.2.2</bgp-id>         // Our BGP identifier, we use this in best path selection

2. Specify IP address of your BGP speaker

<module>
    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
    <name>example-bgp-peer</name>
    <host>192.0.2.1</host>                         // IP address or hostname of the speaker
    <holdtimer>180</holdtimer>

You can also add more BGP peers with different instance name and hostname.

<module>
    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
    <name>example-bgp-peer2</name>
    <host>192.0.2.2</host>
    <holdtimer>180</holdtimer>

3. Configure connection attributes (all in milliseconds)

<module>
   <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:reconnectstrategy">prefix:timed-reconnect-strategy</type>
   <name>example-reconnect-strategy</name>
   <min-sleep>1000</min-sleep>             // Minimum sleep time in between reconnect tries
   <max-sleep>180000</max-sleep>           // Maximum sleep time in between reconnect tries
   <sleep-factor>2.00</sleep-factor>       // Power factor of the sleep time between reconnect tries
   <connect-time>5000</connect-time>       // How long we should wait for the TCP connect attempt, overrides default connection timeout dictated by TCP retransmits
   <executor>
       <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-event-executor</type>
       <name>global-event-executor</name>
   </executor>
</module>

BGP Speaker configuration

Previous entries addressed the configuration of a BGP connection initiated by ODL. ODL also supports BGP Speaker functionality and accepts incoming BGP connections.

The configuration of BGP speaker is located in: 41-bgp-example.xml :

<module>
   <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-acceptor</type>
   <name>bgp-peer-server</name>
   <!--Default parameters-->
    <!--<binding-address>0.0.0.0</binding-address>-->
    <!--<binding-port>179</binding-port>-->
   <bgp-dispatcher>
       <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-dispatcher</type>
       <name>global-bgp-dispatcher</name>
   </bgp-dispatcher>
   <!--Drops or accepts incoming BGP connection, every BGP Peer that should be accepted needs to be added to this registry-->
   <peer-registry>
       <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
       <name>global-bgp-peer-registry</name>
   </peer-registry>
</module>

1. Changing speaker configuration

  • Changing binding address: Uncomment tag binding-address and change the address to e.g. 127.0.0.1. The default binding address is 0.0.0.0.
  • Changing binding port: Uncomment tag binding-port and change the port to e.g. 1790. The default binding port is 179 as specified in BGP RFC.

2. Configuring incoming BGP connections

By default, the BGP speaker drops all BGP connections from unknown BGP peers. The decision is made in component bgp-peer-registry that is injected into the speaker (The registry is configured in 31-bgp.xml).

To add BGP Peer configuration into the registry, it is necessary to configure regular BGP peer just like in example in 41-bgp-example.xml. Notice that the BGP peer depends on the same bgp-peer-registry as bgp-speaker:

<module>
    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
    <name>example-bgp-peer</name>
    <host>192.0.2.1</host>
    ...
    <peer-registry>
        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
        <name>global-bgp-peer-registry</name>
    </peer-registry>
    ...
</module>

BGP peer registers itself into the registry, which allows incoming BGP connections handled by the bgp-speaker. (Config attribute peer-registry is optional for now to preserve backwards compatibility). With this configuration, the connection to 192.0.2.1 is initiated by ODL but will also be accepted from 192.0.2.1. In case both connections are being established, only one of them will be preserved and the other will be dropped. The connection initiated from device with lower bgp id will be dropped by the registry.

There is a way to configure the peer only for incoming connections (The connection will not be initiated by the ODL, ODL will only wait for incoming connection from the peer. The peer is identified by its IP address). To configure peer only for incoming connection add attribute initiate-connection to peer's configuration:

<module>
    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
    <name>example-bgp-peer</name>
    <host>192.0.2.1</host>                         // IP address or hostname of the speaker
    <holdtimer>180</holdtimer>
    <initiate-connection>false</initiate-connection>  // Connection will not be initiated by ODL
    ...
</module>

The attribute initiate-connection is optional with the default value set to true.

Application Peer configuration

Application Peer is a special type of BGP peer. It has it's own BGP RIB. This RIB can be populated through RESTCONF. If ODL is set as BGP speaker, the changes are sent to other BGP clients as well. To properly configure application peer, add following lines to: 41-bgp-example.xml and make appropriate changes.

<module>
 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-application-peer</type>
 <name>example-bgp-peer-app</name>
 <bgp-peer-id>10.1.9.9</bgp-peer-id> <!-- Your local BGP-ID that will be used in BGP Best Path Selection algorithm -->
 <target-rib>
  <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:rib-instance</type>
  <name>example-bgp-rib</name> <!-- RIB where the changes from application RIB should be propagated -->
 </target-rib>
 <application-rib-id>example-app-rib</application-rib-id>  <!-- Your application RIB identifier -->
 <data-broker>
  <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
  <name>binding-data-broker</name>
 </data-broker>
</module>

PCEP

OpenDaylight SP edition comes pre-configured with baseline PCEP configuration.The default shipped configuration will start a PCE server on port 4189.

Configure draft versions

There are already two extensions for PCEP:
draft-ietf-pce-stateful-pce - in versions 02 and 07
draft-ietf-pce-pce-initiated-lsp - versions crabbe-initiated-00 and ietf-initiated-00

Note, that they extend each other, so it is vital to load the extensions with compatible versions. In this case crabbe-initiated-00 is compatible with stateful-02 and ietf-initiated-00 is compatible with stateful-07. Default configuration is to use newest versions of the drafts.

You have to complete all three steps in order to get stateful02 PCEP connection running and synchronized.

If you want to use older version:
1. Switch commented code to ignore stateful-7 and ietf-initiated-00 versions in 32-pcep.xml:

 <!-- This block is draft-ietf-pce-stateful-pce-07 + draft-ietf-pce-inititated-pce-00 -->
 <!--extension>
  <type>pcepspi:extension</type>
  <name>pcep-parser-ietf-stateful07</name>
 </extension>
 <extension>
  <type>pcepspi:extension</type>
  <name>pcep-parser-ietf-initiated00</name>
 </extension-->
 <!-- This block is draft-ietf-pce-stateful-pce-02 + draft-crabbe-pce-inititated-pce-00 -->
<extension>
 <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
 <name>pcep-parser-ietf-stateful02</name>
</extension>
<extension>
 <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
 <name>pcep-parser-crabbe-initiated00</name>
</extension>

2. In the same file, make sure the proposal matches your chosen draft version. Change stateful07-proposal to stateful02-proposal :

<pcep-session-proposal-factory>
    <type>pcep:pcep-session-proposal-factory</type>
    <name>stateful02-proposal</name>
</pcep-session-proposal-factory>

3. In 39-pcep-provider.xml, stateful-plugin also needs to match. Change stateful07 to stateful02:

<stateful-plugin>
    <type>prefix:pcep-topology-stateful</type>
    <name>stateful02</name>
</stateful-plugin>

Configure PCEP Segment Routing

draft-sivabalan-pce-segment-routing-02 PCEP extension for Segment Routing

PCEP Segment Routing initial configuration:

  • To use Segment Routing uncomment two commented blocks
  • Activate parsers/serializes extension:
    • Crete pcep-parser-segment-routing02 instance
    • Reconfigure (inject into list of extensions) global-pcep-extensions
<module>
    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:sr02:cfg">prefix:pcep-parser-segment-routing02</type>
    <name>pcep-parser-segment-routing02</name>
</module>
 
<module>
    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">prefix:pcep-extensions-impl</type>
    <name>global-pcep-extensions</name>
    <extension>
        <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
        <name>pcep-parser-segment-routing02</name>
    </extension>
</module>
.
.
.
<services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
    <service>
        <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
        <instance>
            <name>pcep-parser-segment-routing02</name>
            <provider>/config/modules/module[name='pcep-parser-segment-routing02']/instance[name='pcep-parser-segment-routing02']</provider>
        </instance>
    </service>
</services>


  • Advertise Segment Routing capability in Open Message:
    • Instantiate pcep-session-proposal-factory-sr02
    • Reconfigure global-pcep-dispatcher
<module>
    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:sr02:cfg">prefix:pcep-session-proposal-factory-sr02</type>
    <name>pcep-session-proposal-factory-sr02</name>
</module>
<module>
    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:impl">prefix:pcep-dispatcher-impl</type>
    <name>global-pcep-dispatcher</name>
    <pcep-session-proposal-factory>
        <type xmlns:pcep="urn:opendaylight:params:xml:ns:yang:controller:pcep">pcep:pcep-session-proposal-factory</type>
        <name>pcep-session-proposal-factory-sr02</name>
    </pcep-session-proposal-factory>
</module>
.
.
.
<services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
    <service>
        <type xmlns:pcep="urn:opendaylight:params:xml:ns:yang:controller:pcep">pcep:pcep-session-proposal-factory</type>
        <instance>
            <name>pcep-session-proposal-factory-sr02</name>
            <provider>/config/modules/module[name='pcep-session-proposal-factory-sr02']/instance[name='pcep-session-proposal-factory-sr02']</provider>
        </instance>
    </service>
</services>

Mailing Lists

If you have any questions, feel free to write to one of our mailing lists: