Preparing Ubuntu server for Neutron
This OpenStack tutorial describes prerequisites to prepare your servers to leverage OpenStack Neutron with Ubuntu.
For a general description of Neutron networking concepts, refer to the tutorial Networking with OpenStack Neutron Basic Concepts.
Refer to Platform9 Managed OpenStack prerequisites for Linux/KVM for hardware requirements for Platform9 Managed OpenStack.
Prepare Your Linux/KVM Physical Servers for Neutron
The following image represents three hypervisors connected in a Managed OpenStack Neutron network.
In order to run a Managed OpenStack Neutron network, each of your physical hypervisors and the Neutron network nodes must be prepared with following steps.
Step 1: Install, enable, and start the NTP Daemon.
The NTP daemon is required for all components to have their time synchronized.
Run the following commands to install, enable and start the NTP daemon.
Step 2: Install required packages and load the modules needed for Neutron
Run the following commands to load the modules needed for Neutron.
Step 3: Add sysctl options
Run the following commands to add sysctl options.
Step 4: Add the Platform9 APT Repo
Run the following command to install the Platform9 APT repository.
Step 5: Install Open vSwitch
Run the following command to install Open vSwitch.
Step 6: Enable and start Open vSwitch
Run the following commands to enable and start Open vSwitch.
Step 7: Configure physical interfaces
Figure 1 in the article represents a sample Neutron network configuration. Steps 7 through 11 are based on the configuration shown in Figure 1 from the article. Steps 7 through 11 describe the configuration of physical interfaces into a Linux bond, addition of VLAN interfaces for management, VXLAN/GRE network traffic and storage.
You may or may not require one or more of these steps. The steps to follow would be based on your Neutron network configuration. For instance, if you do not plan on using VXLAN/GRE, you can skip the step to set up VXLAN/GRE tunneling interface.
The article assumes the interface names to be eth0 and eth1. Substitute eth0 and eth1 with the appropriate interface names per your configuration when you run the commands given for this step.
Similarly, the article assumes an MTU of 9000 throughout the data center (VXLAN requires an MTU of at least 1600). Ensure all physical switches are configured to handle the MTU configured on your servers.
Add the following to /etc/network/interfaces
Step 8: Set up the Bond interface
Add the following to /etc/network/interfaces to create the bond:
Step 9: Setup the Management interface
Step 10: Setup the VXLAN/GRE tunneling interface (Optional)
GRE and VXLAN require 24 bytes and 50 bytes of overhead, respectively. Platform9 recommends at least a minimum MTU of 1600 to accommodate this overhead, with a 9000 byte MTU preferred.
Run the following commands to VXLAN/GRE tunneling interface.
Step 11: Setup the Storage interface (Optional)
Run the following commands to set up the storage interface.
Step 12: Restart Networking
Run the following command to restart the network service.
Step 13: Create OVS Bridges
The number of OVS bridges you need will depend on how many physical networks your hosts connect to, and what types of networks you will be creating.
Let us look at some basic networking terminology before creating the bridges.
- An access port represents a single “flat” physical network or VLAN, and will carry untagged traffic.
- A trunk port logically groups together multiple VLANs. An 802.1Q “QTag” header will be inserted into the Ethernet frame for all VLAN traffic. All untagged traffic is implicitly assigned a default, native VLAN per your data center’s switch configuration.
When configuring Platform9 OpenStack’s Networking Config, each physical network is given a Label as a name, and that label mapped to a particular OVS bridge on the host during host authorization.
Let us look at two different examples of common host networking setups.
Example 1: Non-DVR setup with one external flat network, and trunk port for VLAN traffic
The following figure represents a non-DVR network setup with an external flat network, and a trunk port for VLAN traffic.
In Figure 2 above, the network has a trunk port consisting of eth0 and eth1 in a bond that will carry our VLAN-based networks (tenant, provider), as well as a dedicated port (eth2) that connects to a separate external network. This is a legacy, non-DVR setup where external connectivity and L3 capability is only on network nodes. Nodes that are hypervisors only carry the tenant network traffic, and need just 1 OVS bridge.
Run the following commands to add OVS bridges on the hypervisors. The steps below assume eth0/eth1 have already been configured in a Linux bond called "bond0". Please refer to steps 7-11 to set up your physical interfaces.
On our network node, we have a separate NIC that connects to a different physical network. For this, we need a separate OVS bridge.
Run the following commands to add an OVS bridge.
Example 2: DVR setup with a pair of NICs in a bond
The following figure represents a DVR network setup with a pair of NICs in a bond.
In the DVR setup seen in figure 3 above, every host has external L3 connectivity. Here, we only have a pair of NICs in a bond. Therefore this OVS Bridge can only support one Flat (untagged) network, and as many VLAN-tagged networks as your networking infrastructure allows. There are multiple external networks that are VLAN-based, in addition to our tenant networks.
Run the following commands to add an OVS bridge on all hosts.