10. The bridge to the outside¶
The gateway on the sea side.

Neri's house stands on a private road that no ship can see. Down by the sea, Linh shows LUMO a small bridge: a router. One side joins Neri's road, the other the big public quay where visitors arrive.
"A visitor can't use the private house number," Linh explains. "On the quay we hand out public numbers. You take one, and you tie it to the connector of the house." LUMO ties a public number to Neri's house. From the quay, the house now has an address; on the private road it keeps its own.

Neri asks if visitors can come in now. LUMO looks at the doors of the house. "There's a way in. Whether the doors let them through is another matter."

Important
Where the picture stops. The floating IP is different from the fixed internal IP: the instance itself only knows its fixed IP, and the router translates between the two. Associating a floating IP does not by itself give access: routes and security group rules must also allow the traffic.
What it is in OpenStack¶
- A router (a Neutron object) connects subnets to each other and, through its external gateway, to an external network (a provider network that reaches the outside world).
- A floating IP is an address taken from the external network and associated with a port of an instance. The router performs the address translation (NAT) between the floating IP and the port's fixed IP.
- Outgoing traffic from instances without a floating IP usually leaves through the router with the router's own external address (source NAT).
From the village to OpenStack¶
flowchart LR
EXT["External network<br/>(public)"] --- R["Router<br/>external gateway"]
R --- SUB["neri-subnet<br/>192.168.10.0/24"]
SUB --- P["Port of the instance<br/>fixed IP 192.168.10.5"]
FIP["Floating IP 203.0.113.20<br/>(from the external network)"] -.->|"associated with"| P
VIS["Visitor"] -->|"203.0.113.20"| R
R -->|"NAT to 192.168.10.5"| P
See it for real¶
openstack router create <ROUTER>
openstack router set --external-gateway <PUBLIC_NET> <ROUTER>
openstack router add subnet <ROUTER> <SUBNET>
openstack floating ip create <PUBLIC_NET>
openstack server add floating ip <SERVER> <IP>
On a real host. With ML2/OVS and the L3 agent, a Neutron router is a qrouter-<router-id> network namespace on a
network host (with HA routers, on several, and only the active one carries the floating IP). The address
translation is done there by the host's own iptables: the floating IP sits on the router's qg- interface, and a
destination NAT (DNAT) rule in the namespace sends it to the instance's fixed IP. You can look, read-only, as root on
that host: ip netns exec qrouter-<router-id> ip -brief addr and ip netns exec qrouter-<router-id> iptables -t nat -S.
With ML2/OVN there is no namespace: the router is a logical router in the OVN database. To go further:
Instance unreachable from outside, section "Where the
router lives".
The lantern: the beam points at two different addresses and at the bridge between them.
Next: the bridge exists. LUMO checks which crossings are allowed. 11. The rules at the doors →
To remember
Lumo: if you keep only 3 things from this page, keep these.
- A Neutron router connects subnets and, through its external gateway, an external network.
- A floating IP comes from the external network and is associated with a port; the router translates it to the fixed IP.
- A floating IP alone does not give access: routes and security group rules must allow the traffic.
What would you do?
Lumo: a situation you could meet on a real platform, and three ways to react. Pick the one you would choose: I will tell you what this page says about it. Nothing is recorded.
Check yourself
Lumo: 2 quick questions to check the main ideas of this page. Choose an answer to see the explanation and the section that gives the evidence. Your score counts your first choices and stays in this browser only.