== BGP LS PCEP === 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: https://jenkins.opendaylight.org/integration/view/Integration%20jobs/job/integration-master-project-centralized-integration/lastSuccessfulBuild/artifact/distributions/serviceprovider/target/distributions-serviceprovider-0.2.0-SNAPSHOT-osgipackage/opendaylight/configuration/initial/31-bgp.xml[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. + https://jenkins.opendaylight.org/integration/view/Integration%20jobs/job/integration-master-project-centralized-integration/lastSuccessfulBuild/artifact/distributions/serviceprovider/target/distributions-serviceprovider-0.2.0-SNAPSHOT-osgipackage/opendaylight/configuration/initial/41-bgp-example.xml[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.* . Adjust values for initial BGP Open message + [literal] prefix:rib-impl example-bgp-rib example-bgp-rib 64496 // Our AS number, we use this in best path selection 192.0.2.2 // Our BGP identifier, we use this in best path selection . Specify IP address of your BGP speaker [literal] prefix:bgp-peer example-bgp-peer 192.0.2.1 // IP address or hostname of the speaker 180 You can also add more BGP peers with different instance name and hostname. [literal] prefix:bgp-peer example-bgp-peer2 192.0.2.2 180 [start = 3] . Configure connection attributes (all in milliseconds) [literal] prefix:timed-reconnect-strategy example-reconnect-strategy 1000 // Minimum sleep time in between reconnect tries 180000 // Maximum sleep time in between reconnect tries 2.00 // Power factor of the sleep time between reconnect tries 5000 // How long we should wait for the TCP connect attempt, overrides default connection timeout dictated by TCP retransmits netty:netty-event-executor global-event-executor ==== 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 https://jenkins.opendaylight.org/integration/view/Integration%20jobs/job/integration-master-project-centralized-integration/lastSuccessfulBuild/artifact/distributions/serviceprovider/target/distributions-serviceprovider-0.2.0-SNAPSHOT-osgipackage/opendaylight/configuration/initial/41-bgp-example.xml[41-bgp-example.xml]. --------------------- prefix:bgp-peer-acceptor bgp-peer-server prefix:bgp-dispatcher global-bgp-dispatcher prefix:bgp-peer-registry global-bgp-peer-registry --------------------- . 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. . 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 https://jenkins.opendaylight.org/integration/view/Integration%20jobs/job/integration-master-project-centralized-integration/lastSuccessfulBuild/artifact/distributions/serviceprovider/target/distributions-serviceprovider-0.2.0-SNAPSHOT-osgipackage/opendaylight/configuration/initial/41-bgp-example.xml[41-bgp-example.xml]. Notice that the BGP peer depends on the same _bgp-peer-registry as bgp-speaker_: [literal] prefix:bgp-peer example-bgp-peer 192.0.2.1 ... prefix:bgp-peer-registry global-bgp-peer-registry ... 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 configuration: [literal] prefix:bgp-peer example-bgp-peer 192.0.2.1 // IP address or hostname of the speaker 180 false // Connection will not be initiated by ODL ... 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 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 https://jenkins.opendaylight.org/integration/view/Integration%20jobs/job/integration-master-project-centralized-integration/lastSuccessfulBuild/artifact/distributions/serviceprovider/target/distributions-serviceprovider-0.2.0-SNAPSHOT-osgipackage/opendaylight/configuration/initial/41-bgp-example.xml[41-bgp-example.xml] and make appropriate changes. [literal] prefix:bgp-application-peer example-bgp-peer-app 10.1.9.9 prefix:rib-instance example-bgp-rib example-app-rib binding:binding-async-data-broker binding-data-broker === PCEP OpenDaylight is pre-configured with baseline PCEP configuration. The default shipped configuration will start a PCE server on port 4189. https://jenkins.opendaylight.org/integration/view/Integration%20jobs/job/integration-master-project-centralized-integration/lastSuccessfulBuild/artifact/distributions/serviceprovider/target/distributions-serviceprovider-0.2.0-SNAPSHOT-osgipackage/opendaylight/configuration/initial/32-pcep.xml[32-pcep.xml] - basic PCEP configuration, including session parameters https://jenkins.opendaylight.org/integration/view/Integration%20jobs/job/integration-master-project-centralized-integration/lastSuccessfulBuild/artifact/distributions/serviceprovider/target/distributions-serviceprovider-0.2.0-SNAPSHOT-osgipackage/opendaylight/configuration/initial/39-pcep-provider.xml[39-pcep-provider.xml] - configuration for PCEP provider ==== Configure draft versions + There are already two extensions for PCEP: https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-09[draft-ietf-pce-stateful-pce] - in versions 02 and 07 https://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp-01[draft-ietf-pce-pce-initiated-lsp] - versions crabbe-initiated-00 and ietf-initiated-00. NOTE: It is important to load the extensions with compatible versions because they extend each other. 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. Complete the following steps in order to get stateful02 PCEP connection running and synchronized. To use older version: . Switch commented code to ignore stateful-7 and ietf-initiated-00 versions in https://jenkins.opendaylight.org/integration/view/Integration%20jobs/job/integration-master-project-centralized-integration/lastSuccessfulBuild/artifact/distributions/serviceprovider/target/distributions-serviceprovider-0.2.0-SNAPSHOT-osgipackage/opendaylight/configuration/initial/32-pcep.xml[32-pcep.xml]: [literal] pcepspi:extension pcep-parser-ietf-stateful02 pcepspi:extension pcep-parser-crabbe-initiated00 . In the same file, make sure the proposal matches your chosen draft version. Change _stateful07-proposal_ to _stateful02-proposal_: [literal] pcep:pcep-session-proposal-factory stateful02-proposal . In https://jenkins.opendaylight.org/integration/view/Integration%20jobs/job/integration-master-project-centralized-integration/lastSuccessfulBuild/artifact/distributions/serviceprovider/target/distributions-serviceprovider-0.2.0-SNAPSHOT-osgipackage/opendaylight/configuration/initial/39-pcep-provider.xml[39-pcep-provider.xml], stateful-plugin also needs to match. Change _stateful07_ to _stateful02_: [literal] prefix:pcep-topology-stateful stateful02 ==== Configure PCEP segment routing http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02[draft-sivabalan-pce-segment-routing-02] PCEP extension for Segment Routing PCEP Segment Routing initial configuration: https://jenkins.opendaylight.org/bgpcep/job/bgpcep-nightly/ws/pcep/controller-config/src/main/resources/initial/33-pcep-segment-routing.xml[33-pcep-segment-routing.xml] + * To use Segment Routing uncomment two commented blocks + * Activate parsers/serializes extension: + ** Create _pcep-parser-segment-routing02_ instance ** Reconfigure (inject into list of extensions) global-pcep-extensions [literal] prefix:pcep-parser-segment-routing02 pcep-parser-segment-routing02 prefix:pcep-extensions-impl global-pcep-extensions pcepspi:extension pcep-parser-segment-routing02 . . . pcepspi:extension pcep-parser-segment-routing02 /config/modules/module[name='pcep-parser-segment-routing02']/instance[name='pcep-parser-segment-routing02'] * Advertise Segment Routing capability in Open Message: ** Instantiate pcep-session-proposal-factory-sr02 ** Reconfigure _global-pcep-dispatcher_ [literal] prefix:pcep-session-proposal-factory-sr02 pcep-session-proposal-factory-sr02 prefix:pcep-dispatcher-impl global-pcep-dispatcher pcep:pcep-session-proposal-factory pcep-session-proposal-factory-sr02 . . . pcep:pcep-session-proposal-factory pcep-session-proposal-factory-sr02 /config/modules/module[name='pcep-session-proposal-factory-sr02']/instance[name='pcep-session-proposal-factory-sr02']