{"id":662,"date":"2024-10-28T02:24:00","date_gmt":"2024-10-28T00:24:00","guid":{"rendered":"https:\/\/avenacloud.com\/blog\/?p=662"},"modified":"2026-11-13T07:48:10","modified_gmt":"2026-11-13T05:48:10","slug":"how-to-set-up-floating-ips-for-high-availability","status":"publish","type":"post","link":"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/","title":{"rendered":"Floating IP Setup for High Availability: Step-by-Step Guide"},"content":{"rendered":"<p>Floating IP setup is one of the simplest ways to cut downtime on a VPS or dedicated server. A floating IP is a public IP address that you can move from one server to another in seconds. If your main server fails, you move the address to a backup server. Visitors keep using the same address, and your site stays online.<\/p>\n<p>This guide shows how floating IP setup works from start to finish. You will learn what a floating IP is, how it compares with a static IP, how to attach it to a server, how to add it to your network settings, and how to automate failover with Keepalived. We also cover testing, security, and common problems. The steps use plain language and example commands that you can adapt to your own servers.<\/p>\n<p><strong>Quick answer:<\/strong><\/p>\n<ul>\n<li>A floating IP is a public IP that you can move between servers in the same location.<\/li>\n<li>Floating IP setup has four parts: get the IP, attach it to a server, add it to the server&#8217;s network settings, and test it.<\/li>\n<li>For automatic failover, use two servers, a health check, and a tool such as Keepalived.<\/li>\n<li>A floating IP sends traffic to one server at a time. It is not a load balancer.<\/li>\n<li>Keep backups and monitoring in place. A floating IP does not protect your data.<\/li>\n<\/ul>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Quick Summary<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#What_Is_a_Floating_IP\" >What Is a Floating IP?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Key_Terms\" >Key Terms<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Where_Floating_IPs_Are_Used\" >Where Floating IPs Are Used<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#How_a_Floating_IP_Works\" >How a Floating IP Works<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Why_It_Is_Faster_Than_a_DNS_Change\" >Why It Is Faster Than a DNS Change<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#One_Server_at_a_Time\" >One Server at a Time<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Benefits_and_Common_Use_Cases\" >Benefits and Common Use Cases<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Main_Benefits\" >Main Benefits<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Common_Use_Cases\" >Common Use Cases<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Floating_IP_vs_Static_IP_vs_Load_Balancer\" >Floating IP vs Static IP vs Load Balancer<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Before_You_Start_Requirements_and_Planning\" >Before You Start: Requirements and Planning<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Plan_Your_Data\" >Plan Your Data<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Floating_IP_Setup_Step_by_Step\" >Floating IP Setup: Step by Step<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Step_1_Create_or_Request_a_Floating_IP\" >Step 1: Create or Request a Floating IP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Step_2_Attach_It_to_Your_Active_Server\" >Step 2: Attach It to Your Active Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Step_3_Add_the_IP_to_the_Server\" >Step 3: Add the IP to the Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Step_4_Make_the_Change_Permanent\" >Step 4: Make the Change Permanent<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Step_5_Prepare_the_Standby_Server\" >Step 5: Prepare the Standby Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Step_6_Check_Your_Firewall_and_App\" >Step 6: Check Your Firewall and App<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Step_7_Point_Your_Domain\" >Step 7: Point Your Domain<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Step_8_Test_It\" >Step 8: Test It<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Automatic_Failover_with_Keepalived\" >Automatic Failover with Keepalived<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#How_the_Pieces_Fit\" >How the Pieces Fit<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Two_Ways_to_Move_the_IP\" >Two Ways to Move the IP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Example_Configuration\" >Example Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Notes_on_This_Setup\" >Notes on This Setup<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#How_to_Test_Floating_IP_Failover\" >How to Test Floating IP Failover<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#A_Simple_Test_Plan\" >A Simple Test Plan<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-29\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Test_Other_Failures\" >Test Other Failures<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-30\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#What_to_Measure\" >What to Measure<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-31\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Floating_IP_Security_and_Best_Practices\" >Floating IP Security and Best Practices<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-32\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Common_Floating_IP_Problems_and_Fixes\" >Common Floating IP Problems and Fixes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-33\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Build_a_Highly_Available_Setup_with_AvenaCloud\" >Build a Highly Available Setup with AvenaCloud<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-34\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Key_Takeaways\" >Key Takeaways<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-35\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-36\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#What_is_a_floating_IP\" >What is a floating IP?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-37\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#What_is_the_difference_between_a_floating_IP_and_a_static_IP\" >What is the difference between a floating IP and a static IP?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-38\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#How_do_I_set_up_a_floating_IP\" >How do I set up a floating IP?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-39\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Can_a_floating_IP_be_used_for_load_balancing\" >Can a floating IP be used for load balancing?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-40\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#How_fast_is_floating_IP_failover\" >How fast is floating IP failover?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-41\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Do_I_need_two_servers_for_a_floating_IP\" >Do I need two servers for a floating IP?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-42\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Does_a_floating_IP_work_with_any_VPS_provider\" >Does a floating IP work with any VPS provider?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-43\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Can_I_use_a_floating_IP_across_data_centers\" >Can I use a floating IP across data centers?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-44\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Does_a_floating_IP_support_IPv6\" >Does a floating IP support IPv6?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-45\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Is_a_floating_IP_safe\" >Is a floating IP safe?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-46\" href=\"https:\/\/avenacloud.com\/blog\/how-to-set-up-floating-ips-for-high-availability\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_Is_a_Floating_IP\"><\/span>What Is a Floating IP?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A floating IP is a public IP address that is not tied to one server for good. You can point it at server A today and server B tomorrow. Some providers call it a reserved IP, an elastic IP, a movable IP, or a failover IP. The idea is the same.<\/p>\n<p>Think of it like a phone number that you can forward. People always dial the same number. You decide which phone rings.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Key_Terms\"><\/span>Key Terms<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><strong>Floating IP:<\/strong> the public address that your visitors and apps use.<\/li>\n<li><strong>Anchor IP:<\/strong> the main IP of the server that currently receives the traffic. Some providers use this term. Others simply say the IP is attached to a server.<\/li>\n<li><strong>Active server:<\/strong> the server that holds the floating IP right now.<\/li>\n<li><strong>Standby server:<\/strong> the backup that takes over when the active server fails.<\/li>\n<li><strong>Failover:<\/strong> the move of the floating IP from the failed server to the standby.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Where_Floating_IPs_Are_Used\"><\/span>Where Floating IPs Are Used<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Floating IPs fit VPS hosting, dedicated servers, and cloud setups. Most providers let you move them only inside one data center or region. Support also differs from provider to provider, so always check your plan first.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_a_Floating_IP_Works\"><\/span>How a Floating IP Works<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A floating IP works at the network level. Your provider&#8217;s network sends traffic for that address to one server. When you change the target, the network starts sending traffic to the new server.<\/p>\n<p>Here is the normal flow:<\/p>\n<ol>\n<li>A visitor types your domain name. DNS returns the floating IP.<\/li>\n<li>The visitor&#8217;s request reaches your provider&#8217;s network.<\/li>\n<li>The network sends the request to the active server.<\/li>\n<li>The active server fails or goes into maintenance.<\/li>\n<li>You, or an automatic script, move the floating IP to the standby server.<\/li>\n<li>New <a href=\"https:\/\/avenacloud.com\/blog\/how-to-install-pip-on-windows\/\">requests<\/a> go to the standby server. The visitor does not need to change anything.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Why_It_Is_Faster_Than_a_DNS_Change\"><\/span>Why It Is Faster Than a DNS Change<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>With a normal static IP, moving a site means changing DNS records. DNS changes can take minutes or even hours to spread, because many networks keep old answers in a cache. A floating IP move does not touch DNS. Your domain still points to the same address, so the switch is much quicker.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"One_Server_at_a_Time\"><\/span>One Server at a Time<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>A floating IP sends traffic to one server at a time. Both servers can have the address in their settings, but only the server that the network points to receives traffic. That makes floating IPs a great fit for active\/standby setups. To share traffic among many servers, you need a load balancer.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Benefits_and_Common_Use_Cases\"><\/span>Benefits and Common Use Cases<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Main_Benefits\"><\/span>Main Benefits<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><strong>Less downtime.<\/strong> Move the IP in seconds when a server fails.<\/li>\n<li><strong>No DNS delay.<\/strong> Your domain keeps the same address.<\/li>\n<li><strong>Easy maintenance.<\/strong> Move traffic to a standby, patch the main server, then move it back.<\/li>\n<li><strong>Zero-downtime updates.<\/strong> Build a new version on a new server and switch the IP when it is ready.<\/li>\n<li><strong>A stable address.<\/strong> Keep the same IP when you replace or upgrade a server.<\/li>\n<li><strong>A simple design.<\/strong> It is easier to run than a large cluster.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Common_Use_Cases\"><\/span>Common Use Cases<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><strong>Online stores.<\/strong> Keep checkout working during a server problem.<\/li>\n<li><strong>Databases.<\/strong> Point apps at a standby database after a failure, together with data replication.<\/li>\n<li><strong>Game servers.<\/strong> Players keep one address, even when you swap hardware.<\/li>\n<li><strong>Firewalls and proxies.<\/strong> Run a pair so that one can fail without losing the entry point.<\/li>\n<li><strong>Web apps and APIs.<\/strong> Release new versions with a quick switch and an easy way back.<\/li>\n<li><strong>Email and other services<\/strong> that depend on a fixed IP and a good sending reputation.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Floating_IP_vs_Static_IP_vs_Load_Balancer\"><\/span>Floating IP vs Static IP vs Load Balancer<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>People often mix these up. This table shows the main differences.<\/p>\n<table>\n<colgroup>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr>\n<th colspan=\"1\" rowspan=\"1\">Feature<\/th>\n<th colspan=\"1\" rowspan=\"1\">Floating IP<\/th>\n<th colspan=\"1\" rowspan=\"1\">Static IP<\/th>\n<th colspan=\"1\" rowspan=\"1\">Load balancer<\/th>\n<th colspan=\"1\" rowspan=\"1\">DNS failover<\/th>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">Tied to one server<\/td>\n<td colspan=\"1\" rowspan=\"1\">No<\/td>\n<td colspan=\"1\" rowspan=\"1\">Yes<\/td>\n<td colspan=\"1\" rowspan=\"1\">No<\/td>\n<td colspan=\"1\" rowspan=\"1\">No<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">Move speed<\/td>\n<td colspan=\"1\" rowspan=\"1\">Seconds<\/td>\n<td colspan=\"1\" rowspan=\"1\">Needs a new IP and a DNS update<\/td>\n<td colspan=\"1\" rowspan=\"1\">Not needed<\/td>\n<td colspan=\"1\" rowspan=\"1\">Minutes to hours (DNS cache)<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">Spreads traffic<\/td>\n<td colspan=\"1\" rowspan=\"1\">No, one server at a time<\/td>\n<td colspan=\"1\" rowspan=\"1\">No<\/td>\n<td colspan=\"1\" rowspan=\"1\">Yes<\/td>\n<td colspan=\"1\" rowspan=\"1\">Limited<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">Best for<\/td>\n<td colspan=\"1\" rowspan=\"1\">Active\/standby failover<\/td>\n<td colspan=\"1\" rowspan=\"1\">Simple, fixed servers<\/td>\n<td colspan=\"1\" rowspan=\"1\">Many servers, high traffic<\/td>\n<td colspan=\"1\" rowspan=\"1\">Basic backup<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">Cost and setup<\/td>\n<td colspan=\"1\" rowspan=\"1\">Low to medium<\/td>\n<td colspan=\"1\" rowspan=\"1\">Low<\/td>\n<td colspan=\"1\" rowspan=\"1\">Medium to high<\/td>\n<td colspan=\"1\" rowspan=\"1\">Low<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>You can also combine them. For example, point a floating IP at a pair of load balancers. If one balancer fails, the other takes over, and your app servers keep working behind them.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Before_You_Start_Requirements_and_Planning\"><\/span>Before You Start: Requirements and Planning<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Check these items before you begin your floating IP setup.<\/p>\n<ul>\n<li><strong>Provider support.<\/strong> Not every VPS or dedicated plan includes floating IPs. Check your plan or ask your provider.<\/li>\n<li><strong>Two servers.<\/strong> You need at least one server. For failover, use two: one active and one standby.<\/li>\n<li><strong>The same location.<\/strong> Most providers only move a floating IP inside one data center or region. Keep both servers together.<\/li>\n<li><strong>Root or sudo access.<\/strong> You need it to change network settings.<\/li>\n<li><strong>Matching setups.<\/strong> The standby should run the same web server, app, and settings.<\/li>\n<li><strong>Firewall rules.<\/strong> Both servers must allow the ports your service uses, such as 80, 443, and 22.<\/li>\n<li><strong>A domain that points to the floating IP.<\/strong> Update your DNS A record once. After that, you rarely need to touch it. See our guide to <a href=\"https:\/\/avenacloud.com\/blog\/dns-management\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">DNS management<\/a>.<\/li>\n<li><strong>Basic monitoring.<\/strong> You should know when a server goes down.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Plan_Your_Data\"><\/span>Plan Your Data<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>A floating IP moves traffic, not data. If your site uses a database or uploaded files, you need replication or shared storage so the standby has the same data. Without it, failover can send visitors to a server with old or missing information.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Floating_IP_Setup_Step_by_Step\"><\/span>Floating IP Setup: Step by Step<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The exact buttons differ by provider, but the steps are almost always the same. The example addresses below come from documentation ranges. Replace them with your own.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_1_Create_or_Request_a_Floating_IP\"><\/span>Step 1: Create or Request a Floating IP<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Open your provider&#8217;s control panel and go to the IP or network section. Request a new floating IP. Choose the location that matches your servers. Some providers also let you convert an IP you already own, so ask support if that applies to you.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_2_Attach_It_to_Your_Active_Server\"><\/span>Step 2: Attach It to Your Active Server<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Select the floating IP and attach it to your main server. Some providers ask you to pick an anchor IP, which is the server&#8217;s main address. This tells the network where to send traffic.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_3_Add_the_IP_to_the_Server\"><\/span>Step 3: Add the IP to the Server<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Connect with SSH. Then find your network interface name:<\/p>\n<pre spellcheck=\"false\"><code class=\"language-bash\">ip -4 address show<\/code><\/pre>\n<p>Add the floating IP as an extra address. Use \/32 as the mask. A \/32 mask means the address stands alone and does not claim a whole network, which helps avoid routing conflicts. Replace eth0 with your interface name:<\/p>\n<pre spellcheck=\"false\"><code class=\"language-bash\">sudo ip address add 198.51.100.20\/32 dev eth0<\/code><\/pre>\n<p>Some providers add the address for you. Others need this step. Check your provider&#8217;s notes.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_4_Make_the_Change_Permanent\"><\/span>Step 4: Make the Change Permanent<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The <a href=\"https:\/\/avenacloud.com\/blog\/how-to-install-pip-on-windows\/\">command<\/a> above is lost after a reboot. To keep the address, add it to your network files. On Ubuntu with Netplan, the file might look like this:<\/p>\n<pre spellcheck=\"false\"><code class=\"language-yaml\">network:\r\n  version: 2\r\n  ethernets:\r\n    eth0:\r\n      addresses:\r\n        - 203.0.113.10\/24\r\n        - 198.51.100.20\/32<\/code><\/pre>\n<p>Then apply it:<\/p>\n<pre spellcheck=\"false\"><code class=\"language-bash\">sudo netplan apply<\/code><\/pre>\n<p>Other systems use different files, such as <a href=\"https:\/\/www.linuxexam.net\/2020\/05\/debian-ifupdown-vs-networkmanager.html\" target=\"_blank\" rel=\"noopener\">NetworkManager or ifupdown<\/a>. Follow the guide for your operating system.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_5_Prepare_the_Standby_Server\"><\/span>Step 5: Prepare the Standby Server<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Install the same software and settings on the standby server. If your provider requires it, add the same floating IP to its network settings too. The provider&#8217;s panel or API decides which server receives the traffic.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_6_Check_Your_Firewall_and_App\"><\/span>Step 6: Check Your Firewall and App<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Make sure your firewall allows traffic to the floating IP. Make sure your web server listens on all addresses, or on the floating IP as well. Do not hardcode one server&#8217;s own IP in your app settings.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_7_Point_Your_Domain\"><\/span>Step 7: Point Your Domain<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Update your domain&#8217;s A record to the floating IP. If you need to add more than one address to a single machine, our guide on <a href=\"https:\/\/avenacloud.com\/blog\/how-to-configure-multiple-ip-addresses-on-a-single-server-2\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">configuring multiple IP addresses on a single server<\/a> can help.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_8_Test_It\"><\/span>Step 8: Test It<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Run these checks from your own computer, not from the server:<\/p>\n<pre spellcheck=\"false\"><code class=\"language-bash\">ping 198.51.100.20\r\ncurl -I http:\/\/198.51.100.20\r\nssh user@198.51.100.20<\/code><\/pre>\n<p>If ping, the web request, and SSH all work, the first part of your floating IP setup is done.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Automatic_Failover_with_Keepalived\"><\/span>Automatic Failover with Keepalived<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Moving a floating IP by hand works for planned maintenance. For real failures, you want automation. Keepalived is a popular Linux tool for this job. It uses VRRP, a protocol where servers check on each other and agree on which one is in charge. It can also run health checks and custom scripts.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_the_Pieces_Fit\"><\/span>How the Pieces Fit<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Two servers run Keepalived.<\/li>\n<li>One is the MASTER with a higher priority. The other is the BACKUP.<\/li>\n<li>A health check script tests your service, such as Nginx.<\/li>\n<li>If the master fails the check, it gives up its role, and the backup becomes master.<\/li>\n<li>The new master runs a script that moves the floating IP to itself.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Two_Ways_to_Move_the_IP\"><\/span>Two Ways to Move the IP<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Provider API.<\/strong> The new master calls your provider&#8217;s API to attach the floating IP to itself. This is common on VPS and cloud platforms.<\/li>\n<li><strong>VRRP virtual IP.<\/strong> On a shared network where your provider allows it, Keepalived can add the address to the new master directly with the virtual_ipaddress setting.<\/li>\n<\/ol>\n<p>Ask your provider which method it supports.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_Configuration\"><\/span>Example Configuration<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Install Keepalived on both servers:<\/p>\n<pre spellcheck=\"false\"><code class=\"language-bash\">sudo apt install -y keepalived<\/code><\/pre>\n<p>Create a health check script at \/etc\/keepalived\/chk_nginx.sh:<\/p>\n<pre spellcheck=\"false\"><code class=\"language-bash\">#!\/bin\/sh\r\n\/bin\/pidof nginx<\/code><\/pre>\n<p>Make it executable:<\/p>\n<pre spellcheck=\"false\"><code class=\"language-bash\">sudo chmod +x \/etc\/keepalived\/chk_nginx.sh<\/code><\/pre>\n<p>Main server config at \/etc\/keepalived\/keepalived.conf:<\/p>\n<pre spellcheck=\"false\"><code>vrrp_script chk_nginx {\r\n    script \/etc\/keepalived\/chk_nginx.sh\r\n    interval 2\r\n    fall 2\r\n    rise 2\r\n}\r\n\r\nvrrp_instance WEB_HA {\r\n    state MASTER\r\n    interface eth0\r\n    virtual_router_id 51\r\n    priority 200\r\n    advert_int 1\r\n    unicast_src_ip 203.0.113.10\r\n    unicast_peer {\r\n        203.0.113.11\r\n    }\r\n    authentication {\r\n        auth_type PASS\r\n        auth_pass ChangeMe\r\n    }\r\n    track_script {\r\n        chk_nginx\r\n    }\r\n    notify_master \/etc\/keepalived\/notify_master.sh\r\n}<\/code><\/pre>\n<p>On the standby server, use the same file with four changes: state BACKUP, priority 100, unicast_src_ip 203.0.113.11, and unicast_peer 203.0.113.10.<\/p>\n<p>Failover script at \/etc\/keepalived\/notify_master.sh:<\/p>\n<pre spellcheck=\"false\"><code class=\"language-bash\">#!\/bin\/sh\r\n# Ask the provider API to attach the floating IP to THIS server.\r\n# The URL, token, and fields below are placeholders. Use your provider's values.\r\ncurl --silent --request POST --header 'Authorization: Bearer YOUR_API_TOKEN' --data 'floating_ip=198.51.100.20&amp;target=THIS_SERVER_ID' https:\/\/api.example-provider.test\/floating-ips\/attach<\/code><\/pre>\n<p>Make the script executable with chmod +x, then start Keepalived on both servers:<\/p>\n<pre spellcheck=\"false\"><code class=\"language-bash\">sudo systemctl enable --now keepalived\r\nsudo systemctl status keepalived<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Notes_on_This_Setup\"><\/span>Notes on This Setup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>The virtual_router_id must match on both servers. Use a number from 1 to 255 that no other pair on your network uses.<\/li>\n<li>VRRP password authentication only uses up to eight characters. Treat it as a light safeguard, not strong security.<\/li>\n<li>Keep your API token in a file with tight permissions. Never place it in a public repository.<\/li>\n<li>The fall and rise settings make Keepalived wait for two failed or two good checks before it acts. This avoids a switch caused by one slow response.<\/li>\n<li>The scripts run with high privileges. Follow the Keepalived documentation for script security settings in your version.<\/li>\n<li>Watch out for split brain. This happens when both servers believe they are master. A reliable link between the servers and a good health check lower the risk. Make sure your firewall allows VRRP traffic (IP protocol 112) between them.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Test_Floating_IP_Failover\"><\/span>How to Test Floating IP Failover<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Never trust a failover setup that you have not tested. Run these tests before you go live, and repeat them every few months.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"A_Simple_Test_Plan\"><\/span>A Simple Test Plan<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li><strong>Check the starting point.<\/strong> Confirm that the floating IP reaches the active server. Make the home page on each server print a different label, so you can tell them apart.<\/li>\n<li><strong>Run a constant check.<\/strong> In a terminal, request the page once per second:<\/li>\n<\/ol>\n<pre spellcheck=\"false\"><code class=\"language-bash\">while true; do curl -s -m 2 http:\/\/198.51.100.20\/ | head -n 1; sleep 1; done<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>Break the active server.<\/strong> Stop the web service:<\/li>\n<\/ol>\n<pre spellcheck=\"false\"><code class=\"language-bash\">sudo systemctl stop nginx<\/code><\/pre>\n<ol start=\"4\">\n<li><strong>Watch the output.<\/strong> After a few seconds, the label should change to the standby server. Note how many <a href=\"https:\/\/avenacloud.com\/blog\/how-to-install-pip-on-windows\/\">requests<\/a> failed.<\/li>\n<li><strong>Check the logs.<\/strong> Confirm that the standby became master:<\/li>\n<\/ol>\n<pre spellcheck=\"false\"><code class=\"language-bash\">sudo journalctl -u keepalived --no-pager | tail -n 20<\/code><\/pre>\n<ol start=\"6\">\n<li><strong>Restore the first server.<\/strong> Start the web service again and see what happens. Decide whether the IP should move back on its own or stay on the new server.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Test_Other_Failures\"><\/span>Test Other Failures<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Reboot the active server.<\/li>\n<li>Shut down the active server completely.<\/li>\n<li>Block the health check port with a firewall rule.<\/li>\n<li>Break the link between the two servers, and watch for split brain.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"What_to_Measure\"><\/span>What to Measure<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Record how long failover takes, from the first failed request to the first good one. Also check that sessions, carts, and logins still work on the standby. If they do not, you may need shared session storage.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Floating_IP_Security_and_Best_Practices\"><\/span>Floating IP Security and Best Practices<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong>Use the same firewall rules on both servers.<\/strong> A gap on the standby is a gap in your whole setup.<\/li>\n<li><strong>Keep both servers equal.<\/strong> Use the same OS version, <a href=\"https:\/\/avenacloud.com\/blog\/how-to-install-pip-on-windows\/\">packages<\/a>, and settings. Scripts or configuration tools help prevent drift.<\/li>\n<li><strong>Use health checks that test the real service.<\/strong> Checking that a process exists is a start. Checking that a page returns a good answer is better.<\/li>\n<li><strong>Protect API tokens.<\/strong> Give each token only the rights it needs. Store it safely and replace it from time to time.<\/li>\n<li><strong>Use each server&#8217;s own IP for admin work.<\/strong> SSH to the floating IP reaches whichever server is active, which can be confusing and can change the host key you see.<\/li>\n<li><strong>Sync your data.<\/strong> Use database replication, file sync, or shared storage so the standby is ready.<\/li>\n<li><strong>Monitor everything.<\/strong> Watch both servers, the floating IP, and Keepalived. Our article on <a href=\"https:\/\/avenacloud.com\/blog\/how-to-monitor-and-track-ip-address-usage-a-comprehensive-guide\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">how to monitor and track IP address usage<\/a> is a good place to start.<\/li>\n<li><strong>Set reverse DNS if you send email.<\/strong> A matching PTR record helps mail delivery. See our guide to <a href=\"https:\/\/avenacloud.com\/blog\/mastering-the-essentials-how-to-set-up-reverse-dns-for-your-ip-address\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">setting up reverse DNS<\/a>.<\/li>\n<li><strong>Install the same SSL certificate on both servers.<\/strong> Then HTTPS keeps working after a switch. Learn more about <a href=\"https:\/\/avenacloud.com\/ssl\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">SSL certificates<\/a>.<\/li>\n<li><strong>Keep backups.<\/strong> A floating IP does not protect against deleted data, bugs, or ransomware. Keep off-site copies.<\/li>\n<li><strong>Write down the process.<\/strong> Record who can move the IP and what to do when failover happens.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Common_Floating_IP_Problems_and_Fixes\"><\/span>Common Floating IP Problems and Fixes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<table>\n<colgroup>\n<col \/>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr>\n<th colspan=\"1\" rowspan=\"1\">Problem<\/th>\n<th colspan=\"1\" rowspan=\"1\">Likely cause<\/th>\n<th colspan=\"1\" rowspan=\"1\">Fix<\/th>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">Cannot ping the floating IP<\/td>\n<td colspan=\"1\" rowspan=\"1\">The IP is not attached to the right server, or ICMP is blocked<\/td>\n<td colspan=\"1\" rowspan=\"1\">Check the control panel and your firewall rules<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">SSH to the floating IP fails<\/td>\n<td colspan=\"1\" rowspan=\"1\">SSH is not running, or port 22 is blocked<\/td>\n<td colspan=\"1\" rowspan=\"1\">Start the SSH service and allow the port<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">Website does not load<\/td>\n<td colspan=\"1\" rowspan=\"1\">The web server is down or not listening on the IP<\/td>\n<td colspan=\"1\" rowspan=\"1\">Check the service status and its listen settings<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">IP works until a reboot<\/td>\n<td colspan=\"1\" rowspan=\"1\">The address was added by <a href=\"https:\/\/avenacloud.com\/blog\/how-to-install-pip-on-windows\/\">command<\/a> only<\/td>\n<td colspan=\"1\" rowspan=\"1\">Add it to your permanent network config<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">Failover does not happen<\/td>\n<td colspan=\"1\" rowspan=\"1\">The health check never fails, or the script has no permission<\/td>\n<td colspan=\"1\" rowspan=\"1\">Test the check by hand and fix file permissions<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">Both servers think they are master<\/td>\n<td colspan=\"1\" rowspan=\"1\">The servers cannot see each other<\/td>\n<td colspan=\"1\" rowspan=\"1\">Fix the link between them and allow VRRP in the firewall<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">IP will not attach across sites<\/td>\n<td colspan=\"1\" rowspan=\"1\">Floating IPs usually stay inside one region<\/td>\n<td colspan=\"1\" rowspan=\"1\">Keep both servers in the same data center or region<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">Old content after failover<\/td>\n<td colspan=\"1\" rowspan=\"1\">The standby has old data or a different config<\/td>\n<td colspan=\"1\" rowspan=\"1\">Sync data and settings between the servers<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">Apps fail after failover<\/td>\n<td colspan=\"1\" rowspan=\"1\">The app uses a hardcoded server IP<\/td>\n<td colspan=\"1\" rowspan=\"1\">Use the domain name or the floating IP in settings<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>If a connection is refused, check the service and the firewall first. Most floating IP problems come from a blocked port or a missing network setting.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Build_a_Highly_Available_Setup_with_AvenaCloud\"><\/span>Build a Highly Available Setup with AvenaCloud<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A good floating IP setup starts with solid servers and clear IP management. AvenaCloud offers <a href=\"https:\/\/avenacloud.com\/vps\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">VPS servers<\/a> for flexible projects and <a href=\"https:\/\/avenacloud.com\/dedicated\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">dedicated servers<\/a> for workloads that need full control and steady performance. You can also learn about <a href=\"https:\/\/avenacloud.com\/ip\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">IP address services<\/a> to plan the addresses your project needs.<\/p>\n<p>These guides can help with the next steps:<\/p>\n<ul>\n<li><a href=\"https:\/\/avenacloud.com\/blog\/how-to-get-a-dedicated-ip-for-your-vps\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">How to get a dedicated IP for your VPS<\/a><\/li>\n<li><a href=\"https:\/\/avenacloud.com\/blog\/how-to-configure-multiple-ip-addresses-on-a-single-server-2\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">How to configure multiple IP addresses on a single server<\/a><\/li>\n<li><a href=\"https:\/\/avenacloud.com\/blog\/how-to-migrate-to-an-ipv6-addressing-system\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">How to migrate to an IPv6 addressing system<\/a><\/li>\n<li><a href=\"https:\/\/avenacloud.com\/blog\/mastering-the-essentials-how-to-set-up-reverse-dns-for-your-ip-address\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">How to set up reverse DNS for your IP address<\/a><\/li>\n<\/ul>\n<p>Floating IP support depends on the plan and location, so confirm the details before you build your design. If you are unsure which servers and IP options fit your project, <a href=\"https:\/\/avenacloud.com\/contact-us\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">contact AvenaCloud<\/a> and describe your goals.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Key_Takeaways\"><\/span>Key Takeaways<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>A floating IP is a public IP that you can move between servers in seconds.<\/li>\n<li>It avoids DNS delays, because your domain keeps pointing to the same address.<\/li>\n<li>It sends traffic to one server at a time, so it suits active\/standby setups, not load balancing.<\/li>\n<li>Floating IP setup means creating the IP, attaching it, adding it with a \/32 mask, making it permanent, and testing it.<\/li>\n<li>Use Keepalived with a health check to automate failover.<\/li>\n<li>Keep both servers equal, and keep data in sync with replication or shared storage.<\/li>\n<li>Test failover on a schedule, and measure how long it takes.<\/li>\n<li>A floating IP is not a backup. Keep off-site copies of your data.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span>Frequently Asked Questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"What_is_a_floating_IP\"><\/span>What is a floating IP?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>A floating IP is a public IP address that is not fixed to one server. You can move it to another server in the same location within seconds, so visitors keep using the same address.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_is_the_difference_between_a_floating_IP_and_a_static_IP\"><\/span>What is the difference between a floating IP and a static IP?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>A static IP stays tied to one server. If that server fails, you must change DNS records, which can take a long time to spread. A floating IP can move to a new server right away.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_set_up_a_floating_IP\"><\/span>How do I set up a floating IP?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Create the floating IP in your control panel, attach it to a server, add it to the server&#8217;s network settings with a \/32 mask, make the change permanent, and test it with ping, curl, and SSH.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_a_floating_IP_be_used_for_load_balancing\"><\/span>Can a floating IP be used for load balancing?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>No. A floating IP sends traffic to one server at a time. For load balancing, use a load balancer. You can point a floating IP at a pair of load balancers to protect the entry point.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_fast_is_floating_IP_failover\"><\/span>How fast is floating IP failover?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Moving the address usually takes seconds. With Keepalived and a health check, total failover often takes a few seconds more, depending on your check interval and your provider&#8217;s API.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Do_I_need_two_servers_for_a_floating_IP\"><\/span>Do I need two servers for a floating IP?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You can use a floating IP with one server, for example to keep the same address when you replace it. For high availability, you need at least two servers.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Does_a_floating_IP_work_with_any_VPS_provider\"><\/span>Does a floating IP work with any VPS provider?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>No. Some providers do not offer floating IPs, and the rules differ. Check your plan&#8217;s documentation or ask support before you design your setup.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_I_use_a_floating_IP_across_data_centers\"><\/span>Can I use a floating IP across data centers?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Usually not. Most providers limit floating IPs to one data center or region. For multi-region failover, you need other tools, such as DNS-based failover or a global load balancer.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Does_a_floating_IP_support_IPv6\"><\/span>Does a floating IP support IPv6?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>It depends on the provider. Some support IPv4 only. Check your provider&#8217;s notes before you plan an IPv6 setup.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Is_a_floating_IP_safe\"><\/span>Is a floating IP safe?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>It is as safe as the servers behind it. Use the same firewall rules on both servers, protect your API tokens, install the same SSL certificate, and keep backups.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A floating IP gives you a fast, simple way to keep your site online when a server fails or needs maintenance. Floating IP setup takes only a few steps: get the IP, attach it, add it to your network settings, and test it. With <a href=\"https:\/\/www.keepalived.org\/\" target=\"_blank\" rel=\"noopener\">Keepalived<\/a> and a good health check, the move can happen on its own.<\/p>\n<p>Remember that a floating IP is only one layer of protection. Pair it with matching servers, data replication, monitoring, and regular backups. Test your failover often, so it works when you need it.<\/p>\n<p>Ready to plan a more resilient setup? Explore <a href=\"https:\/\/avenacloud.com\/vps\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">AvenaCloud VPS<\/a> and <a href=\"https:\/\/avenacloud.com\/dedicated\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">dedicated servers<\/a>, or <a href=\"https:\/\/avenacloud.com\/contact-us\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">talk to the team<\/a> about the right option for your project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Floating IP setup is one of the simplest ways to cut downtime on a VPS or dedicated server. A floating IP is a public IP address that you can move from one server to another in seconds. If your main&#8230; <\/p>\n","protected":false},"author":1,"featured_media":664,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,18],"tags":[431,436,432,429,433,428,435,430,434,410],"class_list":["post-662","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-help","category-ip-how-to","tag-fault-tolerance","tag-floating-ip-configuration","tag-floating-ips","tag-high-availability","tag-network-configuration","tag-network-redundancy","tag-redundant-ip-setup","tag-server-failover","tag-server-uptime","tag-vps-setup"],"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/avenacloud.com\/blog\/wp-json\/wp\/v2\/posts\/662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/avenacloud.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/avenacloud.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/avenacloud.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/avenacloud.com\/blog\/wp-json\/wp\/v2\/comments?post=662"}],"version-history":[{"count":4,"href":"https:\/\/avenacloud.com\/blog\/wp-json\/wp\/v2\/posts\/662\/revisions"}],"predecessor-version":[{"id":7450,"href":"https:\/\/avenacloud.com\/blog\/wp-json\/wp\/v2\/posts\/662\/revisions\/7450"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/avenacloud.com\/blog\/wp-json\/wp\/v2\/media\/664"}],"wp:attachment":[{"href":"https:\/\/avenacloud.com\/blog\/wp-json\/wp\/v2\/media?parent=662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/avenacloud.com\/blog\/wp-json\/wp\/v2\/categories?post=662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/avenacloud.com\/blog\/wp-json\/wp\/v2\/tags?post=662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}