Score:0

OpenStack: Can one have the instance's iface listen on the (public) floating IP?

la flag

It seems the default modus operandi of OpenStack instances is to have then assigned a private IP via DHCP and associate a floating IP with that instance/private IP, when the instance shall be reachable via the internet.

OpenStack then seems to do NAT between those two.

Now that should be a showstopper for every service (running inside the instance) which needs to know its own global IP because it sends them as part of some protocol's data.

Consider e.g. when HTTP were to be used with IP addresses rather than domain names and the HTTP server running inside the instance would want to send a redirect with the instance's IP address.

Sure the example is a bit made up, but it's just to demonstrate the point.

Is there some way to have the instance's iface directly listen on the (public) floating IP? Like with a Debian /etc/network/interfaces of:

iface eth0 inet static
    address     1.2.3.4
    netmask     255.255.255.0
    gateway     1.2.3.254

Thanks :-)

Score:1
pt flag

Now that should be a showstopper for every service (running inside the instance) which needs to know its own global IP because it sends them as part of some protocol's data.

I can think of very few services that meet these criteria. The only things that come to mind in which direct attachment to an external network are necessary are:

  • Network-level services like DHCP that require layer-2 adjacency, and
  • High performance storage applications that require as direct a path as possible to network attached storage

Otherwise, it's not particularly common to offer "public" facing services using just an ip address.

If you really find yourself in one of the limited situations in which you must attach your instances directly to an existing layer 2 network, you can do so by creating provider networks. From the documentation:

Provider networks offer layer-2 connectivity to instances with optional support for DHCP and metadata services. These networks connect, or map, to existing layer-2 networks in the data center, typically using VLAN (802.1q) tagging to identify and separate them.

So the capability is there if you really need it, but I think you'll find that in almost all cases using the floating ip model is more appropriate.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.