How is the local network interface mapping determined for Floating IPs?

I am using a Floating IP (45.55.x.x) as a secondary IP for a droplet (which has a default IP, 157.230.x.x). When I look at the network interfaces on the droplet using ip -a, I see the following:

momo@droplet:~$ ip a | head -n 20
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether [...] brd ff:ff:ff:ff:ff:ff
    inet 157.230.x.x/20 brd 157.230.x.x scope global eth0
       valid_lft forever preferred_lft forever
    inet brd scope global eth0
       valid_lft forever preferred_lft forever
    inet6 [...]/64 scope link 
       valid_lft forever preferred_lft forever

After some testing using nginx, I can see that requests going through the floating IP are mapped to the second inet in the eth0 interface, My question is, how is that local IP address determined and mapped from the external IP (45.55.x.x)?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

I found the answer here:

The local IP is an “anchor address”, which is mapped from the Floating IP.