Intranet VIP
Apply for Intranet VIP
Select the "Network UNet" main tag in the menu, and go to the Intranet VIP option to enter the main product page. Click the "Apply for IP" button to apply.
In the application menu, you can choose the VPC and subnet that the applied Intranet VIP belongs to, the business group, and the number of applications.
Note:
After the application is complete, you can click the "Edit" function in the list page to modify the name of the Intranet VIP, and "Change Business Group".
Apply Intranet VIP to Cloud Server/Physical Host
Note: A VIP can only be bound on a cloud host/physical server, otherwise it may cause ARP information inconsistency.
CentOS System Implementation Method I:
Solidify Configuration, write the intranet VIP into the ifcfg configuration file (effective for CentOS 7 and lower versions.)
1, Copy the ifcfg-eth0 configuration file and name it as ifcfg-eth0:0, command as follows
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
2, Modify the ifcfg-eth0:0 configuration file. Command as follows
vim /etc/sysconfig/network-scripts/ifcfg-eth0:0
After entering the editing mode, change the IP after "IPADDR=" to your applied intranet VIP, change DEVICE="eth0" to DEVICE="eth0:0", and delete the "GATEWAY=" line.
3, Restart the network. Command as follows :
service network restart
4, Use the arping command to announce ARP information : If the intranet VIP you applied for is 10.4.200.X
arping -U 10.4.200.X
Note:
- After restarting the network, use the ip a command to check whether the intranet VIP is added successfully.
- The intranet VIP can only be written into the ifcfg-eth0:0 configuration file. Do not modify the IPADDR in the ifcfg-eth0 configuration file to intranet VIP. If you wrongly modify the ifcfg-eth0 configuration file, it may cause network interruption of the cloud server.
For CentOS 8 and higher versions
CentOS 8 begins to fully use NetworkManager to manage the network, so the above methods cannot be used to manage the network.
1, Check the current connection.
nmcli con show
Possible results are as follows:
NAME UUID TYPE DEVICE
System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ethernet eth0
Get the current network connection name: System eth0
2, Add IP
nmcli con mod "System eth0" +ipv4.addresses "192.168.0.30/24"
3, Load configuration
nmcli con up "System eth0"
4, Use the arping command to announce ARP information : If the intranet VIP you applied for is 10.4.200.X
arping -I eth0 192.168.0.30
CentOS System Implementation Method II: Temporarily add and manually add intranet VIP by using commands
If the intranet VIP you applied for is 10.4.200.X
Command as follows
ip addr add 10.4.200.X/16 dev eth0
Use the arping command to announce ARP information
arping -U 10.4.200.X
Use ip a command to check whether the intranet VIP is added successfully.
Note:
After restarting the host or network services, you need to manually add the intranet VIP again.
Ubuntu System Implementation Method I: Solidify Configuration, write the intranet VIP into the ifcfg configuration file
Modify the network configuration file. Command as follows
sudo vim /etc/network/interfaces
Copy a section of the configuration file, replace eth0 with eth0:0, and fill in the applied intranet VIP after address
# The primary network interface
auto eth0
iface eth0 inet static
address 10.4.5.255
netmask 255.255.0.0
gateway 10.4.0.1
dns-nameservers 10.255.255.1
Example of Ubuntu configuration file after modification
# The primary network interface
auto eth0
iface eth0 inet static
address 10.4.5.255
netmask 255.255.0.0
gateway 10.4.0.1
dns-nameservers 10.255.255.1
auto eth0:0
iface eth0:0 inet static
address the intranet VIP you applied for is here
netmask 255.255.0.0
gateway 10.4.0.1
dns-nameservers 10.255.255.1
Restart the network. Command as follows :
sudo /etc/init.d/networking restart
Use the arping command to announce ARP information :
arping -U 10.4.200.X
Use ip a command to check whether the intranet VIP is added successfully.
Special reminders:
The intranet VIP can only be added in the configuration segment of eth0:0, and the address in the configuration segment of eth0 cannot be modified. If you wrongly modify the eth0 configuration segment, it may cause the cloud server network to be interrupted.
Ubuntu System Implementation Method II: Temporarily add, manually add intranet VIP by using commands
If the applied intranet VIP is 10.4.200.X, command as follows
ip addr add 10.4.200.X/16 dev eth0
Use the arping command to announce ARP information :
arping -U 10.4.200.X
Use ip a command to check whether the intranet VIP is added successfully.
Special reminders:
After restarting the host or network services, you need to manually add the intranet VIP again.
Remove the Intranet VIP Configured in Resources
For CentOS System, if the intranet VIP is written into the ifcfg-eth0:0 configuration file
Delete the ifcfg-eth0:0 configuration file. Command as follows
rm /etc/sysconfig/network-scripts/ifcfg-eth0:0
Restart the network. Command as follows
service network restart
Use ip a command to check whether the intranet VIP is deleted successfully.
For CentOS systems that manually add intranet VIP by using commands, if the applied intranet VIP is 10.4.200.X, command as follows:
ip addr del 10.4.200.X/16 dev eth0
Use ip a command to check whether the intranet VIP is deleted successfully.
For Ubuntu system, if intranet VIP is written into the configuration file
Modify the network configuration file. Command as follows
sudo vim /etc/network/interfaces
Delete the auto eth0:0 configuration segment in the configuration file.
Example of the configuration segment to be deleted in the Ubuntu configuration file:
auto eth0:0
iface eth0:0 inet static
address should be the intranet VIP you applied for here
netmask 255.255.0.0
gateway 10.4.0.1
dns-nameservers 10.255.255.1
Restart the network. Command as follows:
sudo /etc/init.d/networking restart
Use ip a command to check whether the intranet VIP is deleted successfully.
For Ubuntu systems, if the intranet VIP is manually added by using commands
If the applied intranet VIP is 10.4.200.X, command as follows:
ip addr del 10.4.200.X/16 dev eth0
Use ip a command to check whether the intranet VIP is deleted successfully.
Release VIP
- Check the intranet Virtual IP that needs to be released on the function page of intranet VIP, and click "Release" in the function button.
- In the popped-up dialog box for releasing the virtual IP, it shows the related information of the intranet virtual IP. After confirmation, click "OK" to complete the release of the intranet virtual IP.
Use VIP and Keepalive to Configure Service High Availability
CentOS 6.x and Ubuntu 12+systems, refer to Use VIP and Keepalive to Configure Service High Availability