BGP LS

OpenDaylight comes pre-configured in the installation. 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.

  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>
  1. 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>

loading table of contents...