Use this procedure to enable an internal network to access the wider public network. This procedure assumes that internal networks already exist for specific projects. To create a project internal network using the dashboard, see Creating Internal Networks for Projects.
Before You Begin
Before you proceed, obtain the subnet name that needs public access.
controller# export OS_USERNAME=neutron controller# export OS_PASSWORD=service-password controller# export OS_TENANT_NAME=service controller# export OS_AUTH_URL=http://$CONTROLLER_ADMIN_NODE:5000/v2.0
controller# neutron subnet-list | grep subnet-name
controller# neutron router-list
controller# neutron router-interface-add router-name subnetID
This example uses the HR internal network that was created in How to Configure a Network for a Project. The HR network, whose subnet is HR_Subnet, requires access to the public network.
controller# neutron subnet-list | grep HR_Subnet
| b6feff42-36aa-4235- | HR_Subnet | 10.132.20.0/24 | {"start": "10.132.20.2", |
| 9fe0-ac5de6b43af3 | | | "end": "10.132.20.254"} |
controller# neutron router-list
+--------------------- +------------+--------------------------------+
| id | name | external_gateway_info |
+--------------------- +------------+--------------------------------+
| f89b24ed-42dd-48b0- | ext-router | {"network_id": "6c4c1823-a203- |
| 8f4b-fd41887a3370 | | 43b1-9674-ddb5ff4185fc", |
| | | "enable_snat": true, |
| | | "external_fixed_ips": |
| | | [{"subnet_id": "83d9b40f-cc61- |
| | | 4696-b22e-b4cbc2aa3872", |
| | | "ip_address": "10.132.10.8"}]} |
+---------- -----------+------------+--------------------------------+
controller# neutron router-interface-add ext-router b6feff42-36aa-4235-9fe0-ac5de6b43af3
Added interface b6feff42-36aa-4235-9fe0-ac5de6b43af3 to router ext-router.