API Doc
Search Docs...
⌘ K
ACOSABSAVEANSABDR
  • ANS virtual private cloud networking technical whitepaper>
  • Technical implementation>
  • Gateway services

Floating IP

A floating IP is an IP address allocated from the floating IP address pool of an external subnet and assigned to a vNIC. You can add a vNIC to a virtual machine to dynamically associate a floating IP, and use the floating IP to access external networks.

When a virtual machine accesses an external network through its associated floating IP, the edge gateway processes packets as shown in the following figure:

  • For packets from the VPC, the edge gateway changes the source IP (VM_IP) to the floating IP (F_IP) based on the floating IP binding, and forwards the packets to the external network.

  • For packets from the external network, the edge gateway changes the destination IP (F_IP) to the virtual machine IP (VM_IP) based on the floating IP binding, and forwards the packets to the virtual machine in the corresponding VPC.

Information:

The floating IP has higher priority than the default route (0.0.0.0) but lower priority than other routing rules. That is, if a virtual machine is associated with a floating IP, and the route table associated with the VPC subnet where the virtual machine resides also has a default route (0.0.0.0) configured, the floating IP takes precedence.