Network setup
Building a tenant network
The commands below create the topology described in Networking: a private
tenant subnet, a router whose external gateway is provider-external, and a load
balancer that gives the workload a public VIP.
Quick Setup (OpenStack CLI)
# 1. Create a private tenant network and subnet
openstack network create my-network
openstack subnet create my-subnet \
--network my-network \
--subnet-range 192.168.100.0/24
# 2. Create a router and attach it to provider-external
openstack router create my-router
openstack router set my-router --external-gateway provider-external
# 3. Connect the private subnet to the router
openstack router add subnet my-router my-subnet
# 4. Create a load balancer on provider-external for public access
openstack loadbalancer create \
--name my-lb \
--vip-network-id $(openstack network show provider-external -f value -c id)
note
Without the router's external gateway set to provider-external, neither
outbound Internet traffic nor inbound public access will work.