Note | |
---|---|
In these sections, replace
|
Create the
ext-net
external network. This network represents a slice of the outside world. VMs are not directly linked to this network; instead, they connect to internal networks. Outgoing traffic is routed by Neutron to the external network. Additionally, floating IP addresses from the subnet forext-net
might be assigned to VMs so that the external network can contact them. Neutron routes the traffic appropriately.# neutron net-create ext-net -- --router:external=True
SPECIAL_OPTIONS
Create the associated subnet with the same gateway and CIDR as
EXTERNAL_INTERFACE
. It does not have DHCP because it represents a slice of the external world:# neutron subnet-create ext-net \ --allocation-pool start=
FLOATING_IP_START
,end=FLOATING_IP_END
\ --gateway=EXTERNAL_INTERFACE_GATEWAY
--enable_dhcp=False \EXTERNAL_INTERFACE_CIDR
Create one or more initial tenants, for example:
# keystone tenant-create --name
DEMO_TENANT
See the section called “Define users, tenants, and roles” for further details.
Create the router attached to the external network. This router routes traffic to the internal subnets as appropriate. You can create it under a given tenant: Append
--tenant-id
option with a value ofDEMO_TENANT_ID
to the command.Use the following to quickly get the
DEMO_TENANT
tenant-id:# keystone tenant-list | grep
DEMO_TENANT
| awk '{print $2;}'Then create the router:
# neutron router-create ext-to-int --tenant-id
DEMO_TENANT_ID
Connect the router to
ext-net
by setting the gateway for the router asext-net
:# neutron router-gateway-set
EXT_TO_INT_ID
EXT_NET_ID
Create an internal network for
DEMO_TENANT
(and associated subnet over an arbitrary internal IP range, such as,10.5.5.0/24
), and connect it to the router by setting it as a port:# neutron net-create --tenant-id
DEMO_TENANT_ID
demo-netSPECIAL_OPTIONS
# neutron subnet-create --tenant-idDEMO_TENANT_ID
demo-net 10.5.5.0/24 --gateway 10.5.5.1 # neutron router-interface-addEXT_TO_INT_ID
DEMO_NET_SUBNET_ID
Check the special options page for your plug-in for remaining steps. Now, return to the general OVS instructions.