OpenStack Networking (Network Controller)
Open vSwitch
To configure Open vSwitch
Install the packages:
# apt-get install neutron-plugin-openvswitch-agent \
neutron-dhcp-agent neutron-l3-agent
# yum install openstack-neutron openstack-neutron-openvswitch\
openvswitch-switch
# zypper install openstack-neutron openstack-neutron-openvswitch-agent \
openvswitch-switch
In Fedora, the Open
vSwitch kernel module is compiled without tunnel
support. If you need gre tunnels and network
namespaces, you must recompile this package from
source. For information, see the Open vSwitch
site. If you recompile the kernel module, you must
remove and delete the existing one.
Start Open vSwitch:
# service openvswitch-switch start
# chkconfig openvswitch-switch on
# service openvswitch-switch start
# systemctl start openvswitch-switch.service
# systemctl enable openvswitch-switch.service
Create an internal and external network bridge.
The introduction in this guide describes the
purposes of these bridges.
# ovs-vsctl add-br br-ex
# ovs-vsctl add-port br-ex eth1
# ovs-vsctl add-br br-int
To configure the bridges, complete the
following steps:
Change the eth1
entry in
/etc/network/interfaces, as
follows:
auto eth1
iface eth1 inet manual
up ip address add 0/0 dev $IFACE
up ip link set $IFACE up
down ip link set $IFACE down
Add br-ex to
/etc/network/interfaces,
as follows:
auto br-ex
iface br-ex inet static
address 10.0.0.9
netmask 255.255.255.0
gateway 10.0.0.1
Edit
/etc/sysconf/network-scripts/ifcfg-eth1,
as follows:
# External
DEVICE=eth1
TYPE=Ethernet
BOOTPROTO=none
NM_CONTROLLED=no
BRIDGE=br-ex
ONBOOT=yes
Edit
/etc/sysconf/network-scripts/ifcfg-br-ex,
as follows:
#Public Bridge
DEVICE=br-ex
TYPE=Bridge
BOOTPROTO=static
IPADDR=10.10.10.9
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
Remove the IP address from
eth1 add it to
br-ex, as
follows:
# ip addr del 10.0.0.9/24 dev eth1
# ip addr add 10.0.0.9/24 dev br-ex
Restart networking, as
follows:
# service networking restart
Enable a simple NAT service so that
Compute nodes can access the Internet through the
Cloud Controller:
# iptables -A FORWARD -i eth0 -o br-ex -s 10.10.10.0/24 -m conntrack \
--ctstate NEW -j ACCEPT
# iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
# iptables -A POSTROUTING -s 10.10.10.0/24 -t nat -j MASQUERADE
These rules are lost on reboot. To save or restore the rules, use an appropriate tool from your
distribution to save and restore them.
OpenStack Networking
To configure the OpenStack Networking services
Edit
/etc/neutron/neutron.conf,
as follows:
[DEFAULT]
verbose = True
rabbit_password = password
rabbit_host = 10.10.10.10
[keystone_authtoken]
auth_host = 10.10.10.10
admin_tenant_name = service
admin_user = neutron
admin_password = password[DEFAULT]
verbose = True
rpc_backend = cinder.openstack.common.rpc.impl_qpid
sql_connection = mysql://cinder:password@localhost/cinder
qpid_user = guest
qpid_password = quest
[keystone_authtoken]
auth_host = 10.10.10.10
admin_tenant_name = service
admin_user = neutron
admin_password = password[DEFAULT]
verbose = True
rabbit_password = password
rabbit_host = 10.10.10.10
[keystone_authtoken]
auth_host = 10.10.10.10
admin_tenant_name = service
admin_user = neutron
admin_password = password
Edit
/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini,
as follows: [database]
connection = mysql://neutron:password@10.10.10.10/neutron
[ovs]
tenant_network_type = gre
tunnel_id_ranges = 1:1000
enable_tunneling = True
local_ip = 10.10.10.9
[securitygroup]
firewall_driver = \
neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
Choose tunnel
mode because you do not
have to configure your physical switches
for VLANs.
Edit
/etc/neutron/dhcp_agent.ini,
as follows:
[DEFAULT]
enable_isolated_metadata = True
enable_metadata_network = True
Edit
/etc/neutron/metadata_agent.ini,
as follows:
[DEFAULT]
auth_url = http://10.10.10.10:35357/v2.0
auth_region = RegionOne
admin_tenant_name = service
admin_user = neutron
admin_password = password
nova_metadata_ip = 10.10.10.10
metadata_proxy_shared_secret = password
Start the services, as follows:
# service neutron-plugin-openvswitch-agent start
# service neutron-dhcp-agent restart
# service neutron-metadata-agent restart
# service neutron-l3-agent restart
# service neutron-server restart
# service neutron-openvswitch-agent restart
# service neutron-dhcp-agent restart
# service neutron-l3-agent restart
# chkconfig neutron-server on
# chkconfig neutron-openvswitch-agent on
# chkconfig neutron-dhcp-agent on
# chkconfig neutron-l3-agent on
# systemctl restart neutron-server
# systemctl restart neutron-openvswitch-agent
# systemctl restart neutron-dhcp-agent
# systemctl restart neutron-l3-agent
# systemctl enable neutron-server
# systemctl enable neutron-openvswitch-agent
# systemctl enable neutron-dhcp-agent
# systemctl enable neutron-l3-agent
To debug errors that prevent the Networking Service from
starting, review the
/var/log/neutron/*.log
files.