Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The events generated by RouteService are handled by Route Server application. When new event is handled, the Route Server may install a Flow, which is constructed based on BGP Route object and translated into XMPP Event Notification (Message stanza). The Flow installation request is handled by XMPP Flow Provider, which generates XMPP Message stanza based on the Flow object and sends it to the appropriate devices.

Key implementation pieces of code

The code implementing XMPP protocol is located in Protocols and Providers layers. The source code of XMPP Core controller is already integrated with ONOS master branch. The source code of XMPP PubSub Controller, EVPN Provider and Route Server is available at :

The XMPP implementation follows ONOS code convention. The folder structure of Protocols layer's modules includes “api” subfolder  containing interface definitions and “ctl” containing implementation classes. The implementation uses also several external libraries:

  • Tinder, which provides XMPP abstractions. It is also used in open source XMPP server implementations such as Openfire.
  • Aalto-XML, which provides asynchronous, non-blocking XML parsing mechanism
  • Netty, which provides multi-threaded and efficient TCP Java-based server


  • interface implemented by tracks all connected XMPP devices, provides interface to obtain XMPP device and register/unregister listeners.

  • interface implemented by represents underlaying XMPP devices and allows to perform operations on them. With each object there is a Netty channel associated.

  • class implements identifier representation based on XMPP JID address.

  • The manages any XMPP device and its interactions with the ONOS core. It notifies ONOS Device Subsystem about already connected/disconnected devices.

  • The notifies the provider in ONOS core that XMPP device is connected/disconnected.

  • and implements Netty TCP server listening on XMPP connection on TCP 5269 port and configures Netty channel pipeline.

  • XMPP encoding and decoding is implemented by several classes in order to provide efficient XML stream parsing. class reads asynchronously incoming XML data using Aalto-XML library. class accumulates incoming XML events from and creates XML document. The class translates XML document into XMPP stanzas. The class translates Tinder objects into bytes ready to send over a network socket.

  • The class implements XMPP protocol state machine.

  • The XmppPubSubProvider interface implemented by implements provides XMPP Publish/Subscribe mechanism for parsing XMPP PubSub messages and sending XMPP Event Notifications.
  • The, and interfaces informs providers in the ONOS core other modules of ONOS about incoming XMPP stanzas. Currently, only the XmppIqListener is implemented by in XmppPubSubProvider, because XMPP Publish/Subscribe does not operate on the other XMPP stanzas.

  • The manages any XMPP device and its interactions with the ONOS core. It notifies ONOS Device Subsystem about already connected/disconnected devices.
  • The notifies the provider in ONOS core that XMPP device is connected/disconnected.


  • class implements the Route Provider. It listens to XMPP PubSub messages and translates the XML payload into BGP configuration.
  • The and interfaces are used to inform other modules of ONOS about new events related to XMPP publication and subscription. These interfaces are implemented by internal class contained in
  • The class implements the Flow Provider. It is invoked by Apps layer's modules. When Flow installation request is generated, the XmppFlowProvider translates FlowRule objects into XML message and sends a Message stanza (XMPP Event Notification) to underlaying devices.

Setting up Virtual Lab

As the main use case for XMPP implementation in ONOS, the XMPP-based BGP-signaled End-System IP/VPNs architecture has been implemented. This architecture in general consists of centralized control plane entity called End-System Route Server and distributed vRouters (or VPN Forwarders). For the experiments purposes the XMPP-enabled vRouter emulator (based on Mininet and Open vSwitch) has been implemented ( It provides basic functionalities of VPN Forwarder such as XMPP communication with server and VXLAN encapsulation.  There was   We have also developed the Proof-of-Concept Route Server application for ONOS providing VPN membership management and BGP route distribution logic, which is are the basic functionality of End-System Route Server.


  • Download vRouter emulator. Note that it is a prototype version.

    Code Block
    git clone

  • Configure vRouter.

    Code Block
    cd vrouter-client-py
    nano config.ini

    You should configure jid, vrouter.ip and controller.ip parameters. The jid parameter identifies XMPP client and should be unique for compute node. The vrouter.ip is an IP address of data network interface. The controller.ip parameter is an IP address of ONOS controller. Sample config:

    Code Block

  • Run vRouter console.

    Code Block
    sudo python
  • The vRouter emulator should establish XMPP stream with controller. You can choose the action to perform from command-line menu. Note that it is prototype (work in progress) application so far and not all function may work properly. Actually, the code from Gerrit patch handles only the device-related operations. As a result of above command you should see new device registered in the ONOS core.

Demo and Results


Widget Connector