In this part we’ll set up the network node, Neutron plugins and create base Neutron networks. Rackspace’s documentation to set up Neutron was confusing to me, so I checked the official OpenStack Documentation and figured out some things need to be done differently from Rackspace’s documentation.
Set up br-ex
Execute commands in this section on the network node.
After the chef-client run on network node finishes,
br-ex is created, we need to manually add our external interface to
br-ex, during the procedure the external network connectivity will be lost so it’s a good idea to SSH into network node via its private IP (In my case 172.17.1.5), also just in case that external network never get back up.
Remove IP address on
eth0 because we want to add it to a bridge. Network connectivity on
eth0 will be lost. I learned this command here.
# ip addr flush dev eth0
eth0 to the bridge
# ovs-vsctl add-port br-ex eth0
Assign public IP to
br-ex and add default gateway
# ifconfig br-ex inet x.y.54.54 netmask 255.255.255.0 # route add default gw x.y.54.254
Now you can verify if external connectivity works. If not, check your routing table, mine looks like this:
0.0.0.0 x.y.54.254 0.0.0.0 UG 0 0 0 br-ex 184.108.40.206 0.0.0.0 255.255.255.0 U 0 0 0 br-ex 172.17.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
/etc/network/interfaces as my example to make these settings persistent.
Create base Neutron networks
Execute commands in this section on the controller node.
Mostly the same as official OpenStack documentation.
# source ~/openrc
Create net network:
# neutron net-create ext-net --router:external=True \ --provider:network_type gre --provider:segmentation_id 2 --shared
Create subnet for ext-net:
# neutron subnet-create ext-net --allocation-pool start=x.y.54.1,end=x.y.54.10 \ --gateway=x.y.54.254 --enable_dhcp=False x.y.54.0/24
# neutron router-create ext-to-int
Connect the router to ext-net by setting the gateway for the router as ext-net:
# neutron router-gateway-set EXT_TO_INT_ROUTER_ID EXT_NET_ID
Create internal network and subnet:
# neutron net-create admin-net # neutron subnet-create admin-net 192.168.2.0/24 --gateway 192.168.2.1
Connect the internal subnet to router:
# neutron router-interface-add EXT_TO_INT_ROUTER_ID INTERNAL_SUBNET_ID
Update internal subnet’s DNS information:
# neutron subnet-update INTERNAL_SUBNET_ID \ --dns_nameservers list=true 220.127.116.11 18.104.22.168
Now you can boot up an instance, select the interface to
admin-net, and see if it gets IP and DNS settings correctly.