Unable to associate floating IP

asked 2019-02-16 08:50:16 -0500

Vysakh-SN gravatar image

updated 2019-02-19 09:09:03 -0500

I have one public IP which I need to use to connect to a VM in OpenStack. I have created a network (external), subnet (with gateway and floating IP range) and a router too, which is connected with this subnet. But then when I try to associate this floating IP to an instance, it shows me no ports available. And when I go to interfaces in the router, this is shown:

(34bc8864-11ef) 106.51.xx.x Down External Gateway UP

Not sure how to resolve. Can someone please help me at the earliest please.

Edit 1:

openstack network show ext_net

+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | UP                                   |
| availability_zone_hints   |                                      |
| availability_zones        |                                      |
| created_at                | 2019-02-16T14:07:51Z                 |
| description               |                                      |
| dns_domain                | None                                 |
| id                        | ac9965f8-03f6-44ee-afde-c96a0834302d |
| ipv4_address_scope        | None                                 |
| ipv6_address_scope        | None                                 |
| is_default                | False                                |
| is_vlan_transparent       | None                                 |
| mtu                       | 1500                                 |
| name                      | ext_net                              |
| port_security_enabled     | True                                 |
| project_id                | ca908ee1456f4bd99ea6ed0f0f38b469     |
| provider:network_type     | flat                                 |
| provider:physical_network | default                              |
| provider:segmentation_id  | None                                 |
| qos_policy_id             | None                                 |
| revision_number           | 5                                    |
| router:external           | External                             |
| segments                  | None                                 |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   | 7826a1dc-d22e-4c00-af78-865501bf96cf |
| tags                      |                                      |
| updated_at                | 2019-02-16T14:39:32Z                 |
+---------------------------+--------------------------------------+

openstack router show ext_router

+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                   | Value                                                                                                                                                                                   |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up          | UP                                                                                                                                                                                      |
| availability_zone_hints |                                                                                                                                                                                         |
| availability_zones      | nova                                                                                                                                                                                    |
| created_at              | 2019-02-16T14:18:44Z                                                                                                                                                                    |
| description             |                                                                                                                                                                                         |
| distributed             | False                                                                                                                                                                                   |
| external_gateway_info   | {"network_id": "ac9965f8-03f6-44ee-afde-c96a0834302d", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "7826a1dc-d22e-4c00-af78-865501bf96cf", "ip_address": "106.51.76.7"}]} |
| flavor_id               | None                                                                                                                                                                                    |
| ha                      | False                                                                                                                                                                                   |
| id                      | a1f8a7d4-5ead-437a-8b6c-ae71783510f5                                                                                                                                                    |
| interfaces_info         | []                                                                                                                                                                                      |
| name                    | ext_router                                                                                                                                                                              |
| project_id              | ca908ee1456f4bd99ea6ed0f0f38b469                                                                                                                                                        |
| revision_number         | 14                                                                                                                                                                                      |
| routes                  |                                                                                                                                                                                         |
| status                  | ACTIVE                                                                                                                                                                                  |
| tags                    |                                                                                                                                                                                         |
| updated_at              | 2019-02-16T14:39:51Z                                                                                                                                                                    |
+-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

openstack subnet show ext_subnet

+-------------------+--------------------------------------+
| Field             | Value                                |
+-------------------+--------------------------------------+
| allocation_pools  | 106.51.76.7-106.51.76.7              |
| cidr              | 106.51.0.0/16                        |
| created_at        | 2019-02-16T14:39:32Z                 |
| description       |                                      |
| dns_nameservers   | 202.83.21.12, 202.83.21.2            |
| enable_dhcp       | True                                 |
| gateway_ip        | 106.51.64.1                          |
| host_routes       |                                      |
| id                | 7826a1dc-d22e-4c00-af78-865501bf96cf |
| ip_version        | 4                                    |
| ipv6_address_mode | None                                 |
| ipv6_ra_mode      | None                                 |
| name              | ext_subnet                           |
| network_id        | ac9965f8-03f6-44ee-afde-c96a0834302d |
| project_id        | ca908ee1456f4bd99ea6ed0f0f38b469     |
| revision_number   | 0                                    |
| segment_id        | None                                 |
| service_types     |                                      |
| subnetpool_id     | None                                 |
| tags              |                                      |
| updated_at        | 2019-02-16T14:39:32Z                 |
+-------------------+--------------------------------------+
edit retag flag offensive close merge delete

Comments

Did you create this cloud? If so, how?

Can you show the details of your networks, subnets and routers?

What precise command or GUI options do you use to associate the floating IP, and what is the precise error message?

Bernd Bausch gravatar imageBernd Bausch ( 2019-02-16 16:47:44 -0500 )edit

@Bernd Bausch, This is a packstack deployment. I created an ext ntwrk with a subnet of /16 and gateway of 106.xx.xx.1 A router is created with 2 interfaces (1 with static public ip and anoter with the private ip of VM). Here, public ip interface is down, but other is up. Error is no ports availabl

Vysakh-SN gravatar imageVysakh-SN ( 2019-02-18 23:31:19 -0500 )edit

If the router interface has the same IP as the VM, this can’t work.

By “details” I meant the output of openstack network show, router show and subnet show. You can edit it into your question.

Bernd Bausch gravatar imageBernd Bausch ( 2019-02-19 04:09:06 -0500 )edit

@Bernd Bausch, Edited the question. Please guide.

Vysakh-SN gravatar imageVysakh-SN ( 2019-02-19 04:40:55 -0500 )edit

Did you connect the VM to the external network? If so, you can’t associate floating IPs with it. You don’t need to, either, since the VM’s address is already an external one.

Is there no other network connected to the router?

Bernd Bausch gravatar imageBernd Bausch ( 2019-02-19 09:12:16 -0500 )edit