Goal is to create a Tenant Network where the Instances will be connected. Create an External Network that is connected to the Internet. Create a Router that connects both these networks to give your instances access to the Internet.
In the Admin tab, create a Network for the project/tenant. Do not select the External Network, since this is a Tenant Network.
Create a Subnet for the Tenant Network. This uses a private address space, so you can use any Network address you choose.
In the Subnet Detail Tab, enable DHCP for your VMs to get DHCP IP addresses, and also setup the DNS servers.
Create an External Network that will provide Internet Access to your VM Instances. Select External Network here since this is an External Network.
Create an External Subnet for the External Network. My External Subnet is 10.112.252.0/24. Although this is a Private Address, this address is controlled by my Enterprise Networking Team and Routable internally within the Enterprise Intranet. This address will be NAT'ed at my Enterprise Network Edge when going to the Internet. This is the Network address I am using on my eth0 interfaces. The External Bridge br-ex that we created in the previous post, is going to bridge the Openstack traffic to the External Network. The Gateway is which ever gateway you use in your network.
Configure the Subnet Detail for your External Subnet. Disable DHCP for your External Network. Most probably another DHCP server is running and your eth0s are getting the IP address from it. In any case you don't need to run DHCP server on this network. You will need to setup your IP allocation pool for this External Subnet. If you have some Static IPs requested from your Network Administrator, you can use that for your pool.
Create a Router for the Tenant.
Set the Gateway for the Router to External Network that was created before. Also, add an interface to the router that is connected to the Tenant Private Network that was created before.
Now, your network topology will look like this.
Your instance is connected to the Tenant Network. The router connects the Tenant Network to the External Network. The router does the NATing to give your instances the access to the Internet. In this case the 192.168.1.0/24 address is NAT'ed to the 10.112.252.0/24 address. Again this will be NATed at the Enterprise Intranet Edge to a real Public IP before it goes to the Internet. In my setup there is a double NAT happening. If your external network has Internet Routable addresses then there will be only one NAT happening.
Add rules to the Default Security Group to allow ICMP, TCP and UDP traffic to the instances.
Check if your instances can ping the addresses in the Internet.
Now your instances can access the Internet. If your instances need to be accessed from the Internet, because you are running a Web server that needs be accessed from the Internet, then you need to associate a floating-ip to the instance. The floating-ip's are allocated from the Static IP pool that was configured with the External Subnet. Allocate a floating-ip from the pool, and then associate it to the instance. Then your instance will be accessible from the Internet.
Now SSH to your instance from outside. In my case I am still within the Enterprise Intranet. If your External Network is part of your DMZ, and you have addresses within that DMZ range, then your instances will be accessible from outside the Enterprise Firewall.
In the Admin tab, create a Network for the project/tenant. Do not select the External Network, since this is a Tenant Network.
Create a Subnet for the Tenant Network. This uses a private address space, so you can use any Network address you choose.
In the Subnet Detail Tab, enable DHCP for your VMs to get DHCP IP addresses, and also setup the DNS servers.
Create an External Network that will provide Internet Access to your VM Instances. Select External Network here since this is an External Network.
Create an External Subnet for the External Network. My External Subnet is 10.112.252.0/24. Although this is a Private Address, this address is controlled by my Enterprise Networking Team and Routable internally within the Enterprise Intranet. This address will be NAT'ed at my Enterprise Network Edge when going to the Internet. This is the Network address I am using on my eth0 interfaces. The External Bridge br-ex that we created in the previous post, is going to bridge the Openstack traffic to the External Network. The Gateway is which ever gateway you use in your network.
Configure the Subnet Detail for your External Subnet. Disable DHCP for your External Network. Most probably another DHCP server is running and your eth0s are getting the IP address from it. In any case you don't need to run DHCP server on this network. You will need to setup your IP allocation pool for this External Subnet. If you have some Static IPs requested from your Network Administrator, you can use that for your pool.
Create a Router for the Tenant.
Set the Gateway for the Router to External Network that was created before. Also, add an interface to the router that is connected to the Tenant Private Network that was created before.
Now, your network topology will look like this.
Your instance is connected to the Tenant Network. The router connects the Tenant Network to the External Network. The router does the NATing to give your instances the access to the Internet. In this case the 192.168.1.0/24 address is NAT'ed to the 10.112.252.0/24 address. Again this will be NATed at the Enterprise Intranet Edge to a real Public IP before it goes to the Internet. In my setup there is a double NAT happening. If your external network has Internet Routable addresses then there will be only one NAT happening.
Add rules to the Default Security Group to allow ICMP, TCP and UDP traffic to the instances.
Check if your instances can ping the addresses in the Internet.
Now your instances can access the Internet. If your instances need to be accessed from the Internet, because you are running a Web server that needs be accessed from the Internet, then you need to associate a floating-ip to the instance. The floating-ip's are allocated from the Static IP pool that was configured with the External Subnet. Allocate a floating-ip from the pool, and then associate it to the instance. Then your instance will be accessible from the Internet.
Now SSH to your instance from outside. In my case I am still within the Enterprise Intranet. If your External Network is part of your DMZ, and you have addresses within that DMZ range, then your instances will be accessible from outside the Enterprise Firewall.