La documentation technique et administrative

Outils pour utilisateurs

Outils du site



OpenDayLight provides a plugin for BGP which features:

  • inter/intra-AS peering
  • routes advertising
  • routes originating
  • routes storage


This is a short tutorial to build a BGP-LS tunnel communication.

  • Install the feature:
     feature:install odl-bgpcep-bgp 


1. Debugging

a. Get network topology:

curl -u "admin:admin" -X GET

b. Debug

  • Check that BGP speaker is listenning on TCP port 1790 (BGP port of ODL):
     netstat -lapute | grep 1790 
  • Check that BGP peer is listening for BGP connection :
     telnet <peer-ip-address> <bgp-port> 

2. First attempt

  • Create bgp-rib.xml file
<config xmlns="">
  • Add BGP RIB
curl -u "admin:admin" -H "Content-Type: text/xml"  -d @bgp-rib.xml -X PUT
  • Check values are right
curl -u "admin:admin" -X GET

3. Second Attempt

a. Configure BGP Speaker - Local BGP

curl -u "admin:admin" -X GET | python -m json.tool
<protocol xmlns="">
    <identifier xmlns:x="">x:BGP</identifier>
    <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
 curl -u "admin:admin" -X POST -H "Content-Type: text/xml" -d @bgp-config.xml

b. Check the RIB

curl -u "admin:admin" -X GET | python -m json.tool

c. Configure BGP server listening port

“BGP uses TCP as its transport protocol, by default listens on port 179. OpenDaylight BGP plugin is configured to listen on port 1790, due to privileged ports restriction for non-root users. One of the workarounds is to use port redirection. In case other port is desired to be used instead, we can reconfigure it.” [1]

<bgp-peer-acceptor-config xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-peer-acceptor-config">
curl -u "admin:admin" -d @bgp-port.xml -X PUT

It does not work. Please refer to the following

Edit 41-bgp-example.xml file

 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-acceptor</type>

d. Configure peer BGP

<neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
            <afi-safi-name xmlns:x="">x:IPV4-UNICAST</afi-safi-name>
            <send-max>0</send-max> <!-- Npath again for this peer -->
curl -u "admin:admin" -X POST -H "Content-Type: text/xml" -d @bgp-peer.xml

Check peer configuration :

curl -u "admin:admin" -X GET | python -m json.tool


wiki/sdn/opendaylight/bgpcepls.txt · Dernière modification: 2020/06/27 18:16 (modification externe)