Dash is an extremely powerful web-based UI that helps users efficiently manage their cloud infrastructure. While we aim to make the initial setup process as quick and simple as possible, we also want to give administrators the flexibility to create networks and systems that fit exactly to their needs. Due to the variety of options and settings that users are presented with when setting their infrastructure up for the first time, we provide an Introduction Wizard to guide them through the process of creating a network, volumes, and instances. However, some of the choices for getting a core network setup and ready to place instances on can be confusing for beginners.
Step 1 – Creating Your Network
Before getting into subnets and routing, we must first create a network. In OpenStack, a network is simply a named container which houses one or more subnets. You can add networks either via the “Networks” or “Network Topology” screens. For the purpose of this guide, we are going to use the Networks screen.
Next, we will want to click on the “Create Network” button.
This will bring us to the “Create Network” overlay screen. To make things easier, Dash includes tabs to create a subnet in the same overlay. To get started, let’s name our new network. I’m going to call mine “App1 Net” for the purposes of this guide, but you should give yours a name that makes sense for your project.
Ok great, we have named our network container. Easy right?
Step 2 – Creating Your Subnet
Now that we have our network named, let’s go ahead and create our first subnet. Without a subnet, we will be unable to assign our instances internal (and external) IP addresses. Click on the “Subnet” tab at the top of the “Create Network” overlay. You can see an example subnet in the screenshot below:
If you are somewhat familiar with networking, this screen will be fairly self-explanatory. For those of you that aren’t, here is a quick description of what the individual components are:
- Subnet Name: This is an arbitrary name used to identify the subnet to the user. You should fill in something that makes sense for your project. For example, if you are setting up a subnet for your My Backup App, a good name might be “My Backup App Subnet”.
- Network Address: This is the actual IP subnet that will be used to assign addresses to your instances which belong to this subnet. This must be filled out in CIDR format (for example, 192.168.0.0/24 or 10.0.0.0/8). You can use a handy subnet calculator to figure out what your subnet will/should look like.
- IP Version: You have the option to use either IPv4 or IPv6 for your instances. If you are uncertain what to use, or you don’t have a specific reason to use IPv6, we highly recommend using IPv4. At the time of this writing, IPv6 is experimental.
- Gateway IP: This is the IP address that will be assigned to your virtual router when you add this subnet to one of its ports. If you don’t have a specific reason to change this, we recommend leaving this field blank. Doing so will assign the first IP in your subnet to the router.
As a final step, we are going to add some DNS servers to our subnet. These will be pushed out to the instances so that they can resolve hostnames. Click on the “Subnet Detail” tab.
Here, we use Google’s public DNS name servers, which are 126.96.36.199 and 188.8.131.52. These are good defaults if you don’t have specific name servers you would like to use.
Worth noting is the Allocation Pools field. Here, you can actually specify the section(s) of the subnet that you would like to automatically allocate to instances. This is useful if you want to save space for later use, or wish to start at a certain value for organizational reasons. The field is typically left empty, which means that all addresses in the subnet will be available for assignment.
Step 4 – Creating Your Router
Now that we have a network that contains a subnet which we can pull IP addresses from, we need a router to connect our instances in. The virtual router will create a virtual network much like your physical network in your office, home, or server environment, where the instances can communicate with each other, as well as the outside world if you chose. Let’s go to the “Routers” screen to get started.
The Routers screen will display a list of routers that you have created, their status, as well as whether or not they are connected to an external network. From this screen, you can create and delete routers, as well as connect and disconnect routers from the outside world. We want to create a router by clicking on the (you guessed it) “Create Router” button.
Like a network, a router simply takes a name when creating it. Be sure to name yours something appropriate for your project. As an example, we have called ours “App1 Router”
Now you have your first virtual router, congrats! Let’s go about configuring it. The first thing we want to do is connect it to the external network so that we can talk to the internet. This is done by simply clicking on the “Set Gateway” button to the right of your router.
This will popup a “Set Gateway” overlay. Here, we just want to select “Ext-Net” from the drop-down menu under “External Network” and click “Set Gateway”.
Next, we want to add our network to the router we have just created. Click on the router’s name (App1 Router in our example) to get to the “Router Details” screen.
Here, you will see several details about your virtual router. Its name, unique identifier (UUID), status, and external connectivity information are all displayed. The UUID is useful when working with your infrastructure via the OpenStack APIs.
To connect our router to a network, we want to actually create a “port” or “interface” on the router which belongs to the network. This is done by clicking on the “Add Interface” button, which will bring up an “Add Interface” overlay. Here, we will want to select the subnet which we will be connecting this port to (App1 Net in our example). For the sake of this guide, we will leave the IP Address field blank to allow DHCP to assign us an appropriate address.
Once you have added the interface, you will be brought back to the Router Details screen. Here, you will now see your newly created port as well as some information about it. The “Status” may show DOWN for the first few seconds while the system schedules and processes the port creation.
Et voilà! We now have a working network with a subnet and router, which is ready to attach to instances. To give you a high-level view of your network, take a look at the “Network Topology” screen.