An emitter library for configuring OpenDaylight Lithium's BGP speaker implementation using the Routing Policy Specification Language and rpsl4j-generator. The library provides emitters for generating the OpenDaylight BGPCEP configuration file (41-bgp.xml) and an online and offline variants of a route prefix emitter.
$ mvn package
$ mvn dependency:copy-dependencies
$ java -cp dependencies/*:rpsl4j-opendaylight.jar org.rpsl4j.App --list-emitters
Available emitters: org.rpsl4j.emitters.XMLEmitter, org.rpsl4j.emitters.NullEmitter, org.rpsl4j.emitters.odlconfig.ODLConfigEmitter, org.rpsl4j.emitters.odlroutes.ODLRouteRestconfEmitter, org.rpsl4j.emitters.odlroutes.ODLRouteScriptEmitter
$ java -cp dependencies/*:rpsl4j-opendaylight.jar org.rpsl4j.App --emitter org.rpsl4j.odlconfig.ODLConfigEmitter --input example.rpsl --output 41-bgp.xml
for deployment instructions, refer to the rpsl4j-generator
The library consists of the following three emitters.
Generating the XML based configuration file used by OpenDaylight to configure its BGP speaker implementation. When run, the emitter will generate the contents of the 41-bgp.xml file corresponding to the provided RPSL document.
- BGP_RECONNCET_CONNECT_TIME: Length of connection attempt (ms, default: 5000)
- BGP_RECONNECT_SLEEP_MAX: Maximum time to wait between BGP reconnect attempts (ms, default: 180,000)
- BGP_RECONNCET_SLEEP_FACTOR: Factor to increase sleep time by on successive reconnect attempts (decimal, default: 2.0)
- BGP_RECONNECT_SLEEP_MIN: Minimum time to wait between BGP reconnect attempts (ms, default: 1000)
This emitter instantiates a BGP Speaker for each ifaddr
of an inet-rtr
object, and establishes a peering connection to each peer of the same inet-rtr
.
A BGP "Application peer" is also instantiated for each real peer to facilitate the injection of routes by the other two emitters.
The module does not add any routes to the peer's outgoing routing tabes; this can only be done via RESTConf and is handled by the other two emitters.
Post the route objects exported to configured peer's based on the provided aut-num
routing policies.
This module uses the OpenDaylight RESTConf interface.
- RESTCONF_PORT: Port of RESTCONF instance (default: 8181)
- RESTCONF_PASSWORD : Password to authenticate to RESTCONF with (default: nil)
- RESTCONF_ADDRESS: IP address of RESTCONF instance (default: 127.0.0.1)
- TARGET_PEER: Name of peer to filter route injection to (default: nil)
- RESTCONF_USERNAME: Username to authenticate to RESTCONF with (default: nil)
Before posting the exported routes to a peers outgoing routing table, it will first drop any existing routes from the table. By default the emitter will update the routes of all configured peers, however by providing the TARGET_PEER argument, the operation can be constrained to a single peer. This emitter is dependent on the configuration generated by the ODLConfigEmitter being installed in the OpenDaylight instance.
Post the route objects exported to configured peers based on the provided aut-num
routing policies.
The emitter generates a bash script that installs the routes of configured peers via RESTConf and curl and is mainly used for testing purposes.
This emitter does not accept any arguments.
The emitter generates a bash script that installs the routes of configured peers via RESTConf and curl.
It otherwise behaves the same as the ODLRouteRestconfEmitter
.
This project is licensed under the GNU Affero General Public License.