Adding and removing BGP routes to/from the network
This recipe will address how to add IPv4 routes using the BGP RESTful API. As a prerequisite the recipe will guide you through the manual configuration to enable the OpenDaylight controller to accept incoming BGP connections, which essentially means allowing it to behave like a BGP Speaker.
Getting ready
As a prerequisite for this recipe, it is assumed that the RIB is configured and a regular BGP is also configured as described in the first recipe. In order to add IPv4 routes, that is, to populate the application RIB of a BGP peer, we need to configure the BGP speaker and set up an application peer.
BGP Speaker functionality configuration: This functionality can be enabled using the XML file 41-bgp-example.xml
. Update the default binding address from 0.0.0.0
to localhost, that is, 127.0.0.1
and change the default binding port from 179
to 1790
:
<module> <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"...