Skip to content

Configuration OpenStack OFAgent agent

yamt edited this page Sep 13, 2014 · 22 revisions

This page describes how to configure OFAgent agent, which uses Ryu as OpenFlow library, with OpenStack. If you are not familiar with OpenStack installation, please refer to OpenStack documentation.

Setup with devstack (Juno and later)

localrc

Q_ML2_PLUGIN_MECHANISM_DRIVERS=ofagent,l2population
Q_AGENT=ofagent

For example, the following localrc snippet makes devstack configure a VLAN network.

Q_PLUGIN=ml2
ENABLE_TENANT_VLANS=True
ML2_VLAN_RANGES=physnet1:100:199
PHYSICAL_NETWORK=physnet1
OVS_PHYSICAL_BRIDGE=br-eth0
Q_ML2_PLUGIN_MECHANISM_DRIVERS=ofagent,l2population
Q_AGENT=ofagent

Setup with devstack (IceHouse)

localrc

Q_ML2_PLUGIN_MECHANISM_DRIVERS=ofagent
Q_AGENT=ofagent

For example, the following localrc snippet makes devstack configure a VLAN network.

Q_PLUGIN=ml2
ENABLE_TENANT_VLANS=True
ML2_VLAN_RANGES=physnet1:100:199
PHYSICAL_NETWORK=physnet1
OVS_PHYSICAL_BRIDGE=br-eth0
Q_ML2_PLUGIN_MECHANISM_DRIVERS=ofagent
Q_AGENT=ofagent

Setup without devstack

Neutron Server Node

/etc/neutron/plugin/ml2/ml2_conf.ini (Juno and later)

Configure the following keys in addition to a ML2 configuration.

Specify ofagent and l2population mechanism driver. From Juno, ofagent does not support configuration without l2population.

[ml2]
mechanism_drivers = ofagent,l2population

/etc/neutron/plugin/ml2/ml2_conf.ini (Icehouse)

Configure the following keys in addition to a ML2 configuration.

Specify ofagent mechanism driver.

[ml2]
mechanism_drivers = ofagent

Compute Node

/etc/neutron/plugin/ml2/ml2_conf.ini

Configure general options.

[agent]
get_datapath_retry_times = 60

Configure either GRE or VLAN.

GRE tunneling

[ovs]
enable_tunneling=True
local_ip=<physical-net-ip>

[agent]
tunnel_types = gre

You must create a bridge preliminarily.

# ovs-vsctl add-br br-int

VLAN network (Juno and later)

[aget]
physical_interface_mappings = <physical-net-name>:<interface>

You must create bridges preliminarily.

# ovs-vsctl add-br br-int

If you want to connect other nodes,

# ovs-vsctl add-port <physical-net-bridge-name> <interface>

For example use a VLAN network on an one node.

# ovs-vsctl add-br br-int

# cat /etc/neutron/plugin/ml2/ml2_conf.ini
[ml2]
tenant_network_types = vlan
type_drivers = vlan
mechanism_drivers = ofagent,l2population

[ml2_type_vlan]
network_vlan_ranges = physnet1:100:199

[agent]
physical_interface_mappings = physnet1:eth1

VLAN network (IceHouse)

[ovs]
bridge_mappings = <physical-net-name>:<bridge-name>

You must create bridges preliminarily.

# ovs-vsctl add-br br-int
# ovs-vsctl add-br <physical-net-bridge-name>

And if you want to connect other nodes,

# ovs-vsctl add-port <physical-net-bridge-name> <interface>

For example use a VLAN network on an one node.

# ovs-vsctl add-br br-int
# ovs-vsctl add-br br-eth1

# cat /etc/neutron/plugin/ml2/ml2_conf.ini
[ml2]
tenant_network_types = vlan
type_drivers = vlan
mechanism_drivers = ofagent

[ml2_type_vlan]
network_vlan_ranges = physnet1:100:199

[ovs]
bridge_mappings = physnet1:br-eth1

Start the agent

$ cd /opt/stack/neutron
$ python /opt/stack/ryu/bin/neutron-ofagent-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini

NOTE: The OpenFlow Agent agent requires OpenFlow 1.3. Please check if your installation of OpenvSwich supports OpenFlow 1.3. For example:

$ ovs-ofctl --version
ovs-ofctl (Open vSwitch) 1.10.2
Compiled Sep 23 2013 14:53:13
OpenFlow versions 0x1:0x4
$