Book Image

OpenStack Networking Cookbook

Book Image

OpenStack Networking Cookbook

Overview of this book

Table of Contents (19 chapters)
OpenStack Networking Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating an instance with a specific IP address


The VM instances are typically used to host IT applications. Some applications require that a particular VM server should have a specific, fixed IP address. When DHCP is enabled, the virtual machine gets an IP address dynamically. This recipe shows you how we can assign a specific IP address to an instance.

Getting ready

A VM with a specific IP address can only be created using the OpenStack CLI. It involves a Port creation followed by an instance creation. As a prerequisite, ensure that a Network is created with the following attributes:

  • Network name: Cookbook-Network-5

  • Subnet name: Cookbook-Subnet-5

  • Subnet IP address range: 20.20.20.0/28

How to do it…

The following steps will show you how to create a VM instance with a specific IP address:

  1. Using the appropriate credentials, SSH into the OpenStack node where the Neutron client software packages are installed.

  2. Source the shell RC file to initialize the environment variables required for the CLI commands...