Skip to content
Sandro Mathys edited this page Dec 16, 2015 · 2 revisions

MidoNet is a software-defined virtual network which operates in a decentralized fashion over an underlying IP fabric. It is designed with the needs of VM stack deployments in mind, and the open source MidoNet release includes an implementation of MidoNet's client interface that integrates with OpenStack's Neutron.

MidoNet deployments are onto nodes which are connected by an IP network. MidoNet establishes tunnels between the points where traffic may enter and leave the virtual network it implements. These nodes are controlled locally by a JVM daemon called Midolman, using the open datapath (ODP) protocol over netlink, which at this time means they must be Linux kernels with the Open vSwitch kernel module. A MidoNet deployment also has nodes running ZooKeeper and Cassandra to provide distributed consistent storage for use by the Midolman daemons.

The MidoNet software distribution is divided into three projects:

  • OpenStack plugin integration, which makes OpenStack a MidoNet north-bound API
  • Python client library and CLI. This project provides a python API to talk to the MidoNet REST API service. It also provides a CLI to configure MidoNet.
  • MidoNet Core, which implements the virtual network

OpenStack Integration

MidoNet integrates into OpenStack by being a Neutron plugin. This plugin turns requests made by OpenStack for network services to the vNICs into calls to MidoNet's client interface which attach and manage MidoNet traffic using those vNICs' taps as the entry/exit point for the traffic.

The Python library used to access MidoNet's REST API is included as a subproject. These API calls are handled by the MidoNet API server and change the data in MidoNet's !ZooKeeper cluster to reflect the network service OpenStack requests, causing ZooKeeper to notify the appropriate Midolman daemons of the changes, which then alter their behavior and make any changes to the datapath required (such as starting or stopping listening to traffic on the tap interface or making a tunnel to a new node). The integration layer also uses ZooKeeper to store data it needs to store persistently in order to translate between Neutron requests and MidoNet API calls.

MidoNet Core

The MidoNet Core project implements a virtual network. The virtual network may contain an arbitrary number of routers (IP switches) and bridges (Ethernet switches) with arbitrary connections between them and to external interfaces. This virtual network is defined by data stored in the ZooKeeper cluster, which all Midolman daemons are in continuous contact with. The Midolman daemons are also in continuous contact with a Cassandra cluster, to provide storage for per-connection state for L4 features (the connection tracking performed by SecurityGroups and NAT).

This project is divided into several subprojects:

  • Midolman: This is the daemon which performs the calculations to implement the virtual network. It does this by requesting the datapath send it packets which it has not yet instructed the datapath how to handle, calculating how the equipment of the virtual network would handle it, and instructing the datapath to do that for the packet and all others like it.
  • netlink: This is a Java implementation of the netlink protocol. Midolman uses this to communicate ODP messages with the Open vSwitch kernel module, but there are many other interfaces in Linux which use netlink to connect userspace to the kernel.
  • ODP: This implements "open datapath", the protocol used by the Open vSwitch kernel module for control. MidoNet uses it to instruct the kernel to open/close tunnels and how to handle packets.
  • MidoNet API server: This is a server which provides a REST API for controlling MidoNet. It makes the virtual network's definition in ZooKeeper available through HTTP queries by translating them into ZooKeeper queries. Requests for changes to the virtual network are translated into updates on the data stored, and written to ZooKeeper.
  • Java client: This is an implementation of a client to the REST API which translates Java API calls to HTTP calls. JVM programs can use it to interact with MidoNet in a supervisory capacity.
  • Python client: Python implementation of the MidoNet REST API client. It also includes the MidoNet CLI.
Clone this wiki locally