Page tree

Have questions? Stuck? Please check our FAQ for some common questions and answers.

Skip to end of metadata
Go to start of metadata
Patrick LiuHuawei
Satish KHuawei


This project adds Border Gateway Protocol with Link State Distribution extension (BGP LS), flow specification and its extension to support route policy distribution as a southbound plug-in in ONOS controller.

Link State Distribution extension: Collects the topology information of the network. This network topology can be used by some applications like PCE would benefit from visibility outside one area or Autonomous System (AS) in order  to make better decisions for path computation.

Flow specification: Propagate filtering rules to mitigate attack(DDOS) scenario.

Route policy distribution: Distribute route to modify the routes based on routing policy.

Proposed work

Add BGP LS South Bound plugin to learn the Linkstate topology of the network and update ONOS core’s Node and Link subsystem along with the TE information. Implement BGP protocol handler, which acts as a BGP speaker to listen on BGP port 179 if user run ONOS as root user in linux otherwise listen on port 1790 to establish and manage session with BGP peers of the network. A channel handler will be created for each BGP session to maintain the state machine and state of each Peer. Implement BGP message handler, which will encode and decode BGP messages between ONOS BGP SBI and BGP peer on network. Currently the messages supported are open, KeepAlive, update, Notification and BGP Multiprotocol message with Link state descriptions and its attributes. Implement BGP LS topology provider to update Node and Link subsystem of ONOS core when any node or link gets added/deleted or modified. All communication between BGP Linkstate provider and ONOS Core uses Provider Service interface.

    Pre configurations required to learn network topology using BGP-LS in ONOS

   1. Enable BGP app: app activate org.onosproject.bgp

   2. Configure remote BGP peer in ONOS using below JSON, it uses network config service

            "apps": {

                    "org.onosproject.provider.bgp.cfg": {
                        "bgpapp": {
                                             "routerId": "",
                                             "localAs": 100,
                                             "maxSession": 20,
                                             "lsCapability": true,
                                            "holdTime": 180,
                                            "largeAsCapability": false,
                                            "flowSpecCapability": "IPV4",
                                            "bgpPeer":[ {"peerIp": "", "remoteAs": 100, "peerHoldTime": 120, "connectMode":"active"}]


                               routerId Local IP address.
                               localAs Local AS number
                               maxSession Max number of session BGP ONOS can maintain.
                               lsCapability BGP-LS capability
                               holdTime Hold Time
                               largeAsCapability 4-octet AS capability
                               flowSpecCapability flowspec capability
                               bgpPeer Remote BGP peer information
                               peerIp Remote BGP peer IP
                               remoteAs Remote BGP AS number
                               peerHoldTime Remote peer hold time (Depricated)
                               connectMode Session initiation, active or passive. In case of passive mode BGP is in listen mode.

   3. On network side, enable router to establish BGP session with ONOS using link state capability. Multiple routers can connect to ONOS for reliability purpose.

   4. On successful session establishement BGP export link-state topology information obtained using IGP protocol to ONOS.

   5. verify topology using commands devices/links or GUI respectively.


Figure: ONOS, BGP and IGP relation.





  • No labels