Jump to: navigation, search

Difference between revisions of "Neutron/Metering/Bandwidth"

(CLI)
(CLI)
Line 37: Line 37:
 
= CLI =
 
= CLI =
 
Creation of a metering label :
 
Creation of a metering label :
  # quantum metering-label-create NAME
+
  # neutron metering-label-create NAME
  
 
Add some rules to this label :
 
Add some rules to this label :
  # quantum metering-label-rule-create METERING_LABEL_ID REMOTE_IP_PREFIX --direction egress --excluded=true
+
  # neutron metering-label-rule-create METERING_LABEL_ID REMOTE_IP_PREFIX --direction egress --excluded=true
  
 
= Authorization =
 
= Authorization =

Revision as of 12:22, 10 July 2013

Overview

The idea is to meter this as the L3 routers levels. The point is to allow operators to configure IP ranges and to assign a label to them. For example we will be able to set two labels; one for the internal traffic, and the other one for the external traffic. Each label will measure the traffic for a specific set of ip range. Then, bandwidth measurement will be send for each label to the Oslo notification system and could be collected by Ceilometer.

Blueprints

https://blueprints.launchpad.net/neutron/+spec/bandwidth-router-label

https://blueprints.launchpad.net/neutron/+spec/bandwidth-router-measurement

https://blueprints.launchpad.net/ceilometer/+spec/ceilometer-quantum-bw-metering

Implementation overview

The metering of the bandwidth can be realized by set up some IPtables rules on each l3 namespaces.

  1. Add a global rule for the metering on the FORWARD chain of each router.
  2. Add rules to the metering chain for each traffic that we want to measure.
  3. These rules will point to a specific chain used to collect the traffic (packets, bytes). This chain will represent the metering label.
  4. Add an agent to get the bandwidth information from IPtables chain. This agent will populate bandwidth usage informations as delta with the Oslo notifications mechanism.

Technical implementation

Data Model

MeteringDataModel.jpg

Iptables Chain Model

MeteringIptablesModel.jpg

The packet will be set as MARK in order to avoid to count them twice.

Implementation plan

The implementation of this extension follow the next plan:

  1. Add metering chain to IPtables at the router creation
  2. L3 Agent modifications
  3. Database model and API modifications
  4. Add new command to CLI

CLI

Creation of a metering label :

# neutron metering-label-create NAME

Add some rules to this label :

# neutron metering-label-rule-create METERING_LABEL_ID REMOTE_IP_PREFIX --direction egress --excluded=true

Authorization

Only admin user will be authorized to manipulate the metering labels/rules/associations.

Plugin Support

This extension will be added to the OVS plugin to begin.