Show Table of Contents
8.2. 创建 Overcloud External 网络
在此之前,已配置了节点接口来使用 External 网络(第 6.2 节 “分离网络”),但您仍需要在 Overcloud 中创建这个网络,从而可以为实例分配浮动 IP 地址。
使用原生的 VLAN
这个步骤假设 External 网络有一个专用的接口,或一个原生的 VLAN。
source
overcloud,并在 Neutron 中创建一个 External 网络:
$ source ~/overcloudrc $ neutron net-create nova --router:external --provider:network_type flat --provider:physical_network datacentre $ neutron subnet-create --name nova --enable_dhcp=False --allocation-pool=start=10.1.1.51,end=10.1.1.250 --gateway=10.1.1.1 nova 10.1.1.0/24
在这个示例中,创建了一个名为
nova 的网络。Overcloud 需要使用这个特定的名称来实现浮动 IP 地址池。另外,它对验证测试也非常重要(第 8.5 节 “验证 Overcloud”)。
这个命令还会把网络映射到
datacenter 物理网络。作为一个默认的设置,datacenter 会被映射到 br-ex 网桥。如果在创建 Overcloud 时没有使用经过定制的 neutron 设置,这个选项就需要使用默认的设置。
使用非原生的 VLAN
如果没有使用原生的 VLAN,使用以下命令把网络分配给一个 VLAN:
$ source ~/overcloudrc $ neutron net-create nova --router:external --provider:network_type vlan --provider:physical_network datacentre --provider:segmentation_id 104 $ neutron subnet-create --name nova --enable_dhcp=False --allocation-pool=start=10.1.1.51,end=10.1.1.250 --gateway=10.1.1.1 nova 10.1.1.0/24
provider:segmentation_id 的值定义了要使用的 VLAN。在这个示例中,使用 104。
使用
neutron net-list 来确定创建的网络:
$ neutron net-list +-----------------------+-------------+---------------------------------------------------+ | id | name | subnets | +-----------------------+-------------+---------------------------------------------------+ | d474fe1f-222d-4e32... | nova | 01c5f621-1e0f-4b9d-9c30-7dc59592a52f 10.1.1.0/24 | +-----------------------+-------------+---------------------------------------------------+

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.