Initial network configuration

To understand how networking should initially be configured on each host, refer to the following diagram:

Initial network configuration

Figure 2.1

In the preceding diagram, three interfaces are cabled to each host. The eth0 interface will serve as the management interface for OpenStack services and API access. The eth1 interface will be used for overlay network traffic between hosts. On the controller node, eth2 will be used for external network traffic to instances through Neutron routers. If VLAN tenant networks are used in lieu of overlay networks such as VXLAN and GRE, then eth2 will be configured on the compute nodes to support those networks.

At a minimum, the management interface should be configured with an IP address that has outbound access to the Internet. Internet access is required to download OpenStack packages from the Ubuntu package repository. Inbound access to the management address of the servers from a trusted network via SSH (TCP port 22) is recommended.

Example networks

Throughout the book, there will be examples on configuring and using various OpenStack services. The following table provides the VLANs and associated networks used for those services:

VLAN name

VLAN ID

Network

MGMT_NET

10

10.254.254.0/24

OVERLAY_NET

20

172.18.0.0/24

GATEWAY_NET

50

10.50.0.0/24

TENANT_NET30

30

10.30.0.0/24

TENANT_NET31

31

10.31.0.0/24

TENANT_NET32

32

10.32.0.0/24

TENANT_NET33

33

10.33.0.0/24

The following tables provide IP addresses and VLAN IDs recommended for each host interface, should you choose to follow along with the examples:

controller01.learningneutron.com

Interface

IP address

Switchport

VLAN ID

eth0

10.254.254.100

Access port

VLAN 10

(Untagged)

eth1

172.18.0.100

Access port

VLAN 20

(Untagged)

eth2

None

Trunk port

VLAN 30-33,50

(Tagged)

compute01.learningneutron.com

Interface

IP address

Switchport

VLAN ID

eth0

10.254.254.101

Access port

VLAN 10

(Untagged)

eth1

172.18.0.101

Access port

VLAN 20

(Untagged)

eth2

None

Trunk port

VLAN 30-33,50

(Tagged)

compute02.learningneutron.com

Interface

IP address

Switchport

VLAN ID

eth0

10.254.254.102

Access port

VLAN 10

(Untagged)

eth1

172.18.0.102

Access port

VLAN 20

(Untagged)

eth2

None

Trunk port

VLAN 30-33,50

(Tagged)

In the event of connectivity loss, out-of-band management access to the servers via DRAC, iLo, or some other IPMI mechanism is highly recommended.

Interface configuration

Ubuntu uses a configuration file found at /etc/network/interfaces that describes how network interfaces should be configured.

Using a text editor, update the network interface file on each host as follows:

For controller01:

auto eth0
iface eth0 inet static
  address 10.254.254.100
  netmask 255.255.255.0
  gateway 10.254.254.1
  dns-nameserver 8.8.8.8

auto eth1
iface eth1 inet static
  address 172.18.0.100
  netmask 255.255.255.0

auto eth2
iface eth2 inet manual 

For compute01:

auto eth0
iface eth0 inet static
  address 10.254.254.101
  netmask 255.255.255.0
  gateway 10.254.254.1
  dns-nameserver 8.8.8.8

auto eth1
iface eth1 inet static
  address 172.18.0.101
  netmask 255.255.255.0

auto eth2
iface eth2 inet manual

For compute02:

auto eth0
iface eth0 inet static
  address 10.254.254.102
  netmask 255.255.255.0
  gateway 10.254.254.1
  dns-nameserver 8.8.8.8

auto eth1
iface eth1 inet static
  address 172.18.0.102
  netmask 255.255.255.0

auto eth2
iface eth2 inet manual

Tip

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

The eth2 interface will be used in a network bridge described in further detail in Chapter 4, Building a Virtual Switching Infrastructure. To activate the changes, cycle the interfaces using the ifdown and ifup commands on each node:

# ifdown --all; ifup --all

Note

For more information on configuring network interfaces, refer to the Ubuntu man page found at http://manpages.ubuntu.com/manpages/trusty/man5/interfaces.5.html.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset