Technology of Virtual IP Address

Larus Team 2020-10-05 07:19:57 virtualip

High Availability (HA) refers to improving the availability of systems and applications by minimizing downtime caused by routine maintenance operations (planned) and sudden system crashes (unplanned). HA system is currently the most effective means for enterprises to prevent the core computer system from shutting down due to failure. To achieve HA, two machines are generally used to complete a function at the same time, such as a database server. Usually, only one machine provides external services, and the other machine serves as a hot backup. When this machine fails, it will automatically switch to the other standby machine dynamically.

Principles of Virtual IP Technology

1. How to realize fault detection?

Send a data packet regularly. If the machine does not respond for a certain period, it will be considered as a failure and automatically switch to the standby machine.

2. How to realize automatic switchover between active and standby?

We can get this from the virtual IP technology. A virtual IP is an IP that is not assigned to a real host, which means that the host that provides the database server to the outside has a virtual IP also a real IP. You can connect to this host using either of these two IPs. The virtual IP is configured for the database link in all projects. When the server fails to provide services to the outside world, the virtual IP is dynamically switched to the standby host. Its realization principle mainly relies on TCP/IP's ARP protocol. Since the IP address is only a logical address, the MAC address in the Ethernet is the physical address that is actually used for data transmission. Each host has an ARP cache that stores the correspondence between the IP address and the MAC address in the same network Relationship, when the host in the Ethernet sends data, it will first query the MAC address corresponding to the target IP from this cache, and send data to this MAC address. The operating system will automatically maintain this cache. This is the key to the entire implementation, such as the following ARP cache example:

(192.168.1.219) at 00:21:5A:DB:68:E8 [ether] on bond0
(192.168.1.217) at 00:21:5A:DB:68:E8 [ether] on bond0
(192.168.1.218) at 00:21:5A:DB:7F:C2 [ether] on bond0

Among them, 192.168.1.217 and 192.168.1.218 are two real computers, 192.168.1.217 is the host that provides database services to the outside world, 192.168.1.218 is the hot standby machine, and 192.168.1.219 is the virtual IP. Pay attention to the MAC addresses of 219 and 217 Are the same. When 218 finds that 217 is down, it will send an ARP packet to the network, telling all hosts 192.168.1.219 that the MAC address corresponding to this IP is 00:21:5A:DB:7F:C2, so that all packets sent to 219 will be Send to the machine with the MAC address 00:21:5A:DB:7F:C2, which is the machine with 218.

3. Configure and Delete virtual IP

If the host has a network card eth1, its corresponding IP is 192.168.1.217, now set a virtual IP 192.168.1.219 for it:


ifconfig eth1:1 192.168.1.219 netmask 255.255.255.0

Delete the virtual IP:

ip addr del 192.168.1.219 dev eth1

However, in network operation and maintenance, it is more common to use keepalived to configure virtual ip (vip) to achieve dual-system hot backup and automatically switch between active and standby.


IP address is important to our internet activities, we hope that you have learned through our articles. If you are interested to know more, feel free to read our blog or follow us on LinkedIn.










(Source: Internet)

Hot Reading

What is a Dedicated Server?

infrastructure service 2020-10-12 02:00:33

A dedicated server will actually gives you maximum output for all your applications because it enables your owner to have direct access to it and its resources.

Why you need an IP address?

IPv4 2022-07-28 08:39:57

An IP address is a critical piece of your online presence. It's how your device is identified and connected to the internet.

IPv4 lease price 2023

leaseipv4 2022-02-24 06:48:12

It's important to recognize that IPv4 lease prices vary across the market. Here, we delve deeper into the details.

What is IPv4 block?

IPv4 2022-09-29 08:13:13

IPv4 block is a term used to describe a range of IP addresses that are assigned to a specific entity. It is a valuable resource that must be managed carefully.

Related Reading

What is ARIN? Info On The American Registry for Internet Numbers

ARIN 2023-09-23 06:36:35

The American Registry for Internet Numbers (ARIN) is a nonprofit organization that manages Internet resources in the United States, Canada, and some parts of the Caribbean.

What Are IP Transit Services & What Do They Cost

IP Transit 2023-09-13 03:02:41

IP transit is like a bus for information to get from one place on the Internet to the next. They follow rules called Border Gateway Protocol (BGP). BGP helps make sure that these information buses arrive in the correct address.

Dedicated vs. Shared IP Addresses: Best Choice for Email Marketing

dedicated IP address shared ip address 2023-09-08 02:45:07

In this post, we'll look into shared and dedicated IP addresses to work out which one is best suited for you.

What is an IP Transit Provider?

IP Transit 2023-09-04 00:40:19

IP Transit is a service that facilitates the movement of data across the Internet. It is provided by Internet Service Providers (ISPs). In plain speak, an ISP gives you access to all computers on the Internet through their transit service.

Static IP Addresses: What They Are and What You Need to Know

Static IP Addresses 2023-08-25 05:46:43

Static IPs might be crucial for some businesses. Tasks like hosting websites, managing emails, and video conferencing can be enhanced by a static IP. However, it static IP may not be necessary for everyone. Read on to discover if a static IP address is what you need.

Advantages of Having a Static IP Address for Your Business

Static IP Address 2023-08-17 04:42:55

An IP address, short for Internet Protocol address, is a unique set of numbers given by your Internet service provider (ISP) to devices directly connected to the Internet. IP addresses allow devices to exchange data.