官术网_书友最值得收藏!

Initial network configuration

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

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:

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

compute01.learningneutron.com

compute02.learningneutron.com

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.

主站蜘蛛池模板: 翁牛特旗| 阳西县| 瑞金市| 安康市| 宣武区| 镇原县| 合山市| 台州市| 宝清县| 临城县| 拉萨市| 崇义县| 麦盖提县| 吉木萨尔县| 武山县| 凤庆县| 左云县| 岐山县| 多伦县| 虞城县| 同仁县| 林芝县| 朔州市| 乌兰察布市| 遂宁市| 彩票| 万年县| 山阳县| 营山县| 独山县| 襄垣县| 利辛县| 西丰县| 成武县| 长葛市| 泸定县| 兴安盟| 望都县| 平定县| 泾源县| 中江县|