Networking

For an OpenStack production deployment, most nodes must have these network interface cards:

  • One network interface card for external network traffic

  • Another card to communicate with other OpenStack nodes.

For simple test cases, you can use machines with a single network interface card.

The following example configures Networking on two networks with static IP addresses and manually manages a list of host names on each machine. If you manage a large network, you might already have systems in place to manage this. If so, you can skip this section but note that the rest of this guide assumes that each node can reach the other nodes on the internal network by using the controller and compute1 host names.

Configure both eth0 and eth1. The examples in this guide use the 192.168.0.x IP addresses for the internal network and the 10.0.0.x IP addresses for the external network. Make sure to connect your network devices to the correct network.

In this guide, the controller node uses the 192.168.0.10 and 10.0.0.10 IP addresses. When you create the compute node, use the 192.168.0.11 and 10.0.0.11 addresses instead. Additional nodes that you add in subsequent chapters also follow this pattern.

 

Figure 2.1. Basic architecture


 

Example 2.1. /etc/network/interfaces

# Internal Network
auto eth0
iface eth0 inet static
    address 192.168.0.10
    netmask 255.255.255.0

# External Network
auto eth1
iface eth1 inet static
    address 10.0.0.10
    netmask 255.255.255.0

After you configure the network, restart the daemon for changes to take effect:

# service networking restart

Set the host name of each machine. Name the controller node controller and the first compute node compute1. The examples in this guide use these host names.

Use the hostname command to set the host name:

# hostname controller

To configure this host name to be available when the system reboots, you must specify it in the /etc/hostname file, which contains a single line with the host name.

Finally, ensure that each node can reach the other nodes by using host names. You must manually edit the /etc/hosts file on each system. For large-scale deployments, use DNS or a configuration management system like Puppet.

127.0.0.1       localhost
192.168.0.10    controller
192.168.0.11    compute1
Log a bug against this page


loading table of contents...