Which IP address can I use for a vService; what is the difference between an Interface IP and a VIP?
Short answer
A vService receives traffic on an IP address that has been added to an interface of TR7 and is selected from the Frontend IP list in the vService form; the IPs are added under Network → Interfaces independently of the vService. There are two types of IP: an Interface IP belongs to only one device and cannot be reached if that device goes down. A VIP, on the other hand, is the address shared by the two devices in the cluster: it is active on the device selected as Master in the Add IP form, passes automatically to the peer device when that device fails, and returns to it on its own when the Master device comes back up. vServices that require uninterrupted publishing in a cluster are published on a VIP.
How Does It Work?
- The IP is defined in the network first. An IP is added to an interface with the Add IP form; the vService only selects this IP as a listening point. Even if the vService is deleted or disabled, the IP continues to respond on the network; the Network → Interfaces screen is used to remove the IP.
- Interface IP: It is each device's own address. In a cluster, an Interface IP is added with separate addresses for the two devices (this device / peer device); these addresses are also used for communication between the devices and for management. It does not pass to another device in a failure.
- VIP: It is the shared address of the two devices in the cluster. It is active on only one device at a time. For each VIP, the Master/slave selection in the Add IP form determines on which device the VIP will normally be active; different VIPs can be Master on different devices.
Failover and Failback
- Normal state: The VIP is active on the device selected as Master; Master VIP is active (green) appears in the Interfaces list, and the address is listed with the (M) suffix on the Master side.
- Failure: If the Master device goes down or the interface on which the VIP is defined becomes disabled, the peer device takes over the VIP within a time that depends on the interface's VIP Transition Duration (s) value (3 seconds by default); in the default Only VRRP method, the new location of the address is announced to the network with gratuitous ARP. The list shows Slave VIP is active; clients continue to connect to the same address.
- Failback: When the Master device comes back up and VIP communication is established, the VIP returns to the Master device on its own, and the list shows Master VIP is active again. Failback is automatic; no separate action is required, and there is no option in the interface that turns off this behavior.
What triggers the transition is determined by the interface's VIP Transition Method field: Only VRRP (default; only VRRP communication between the devices), TR7 Link Check, TR7 GW Check or TR7 Link and GW Check.
Comparison
| Interface IP | VIP | |
|---|---|---|
| Belongs to | A single device | The two devices in the cluster; shared by the two devices |
| In a failure | Becomes unreachable together with the device | Passes to the peer device |
| When the device comes back | - | Returns to the device selected as Master |
| Where it is used | Single-device setup, management, communication within the cluster | vServices published in the cluster |
| Availability | In every setup | Only while clustering is on |
| Prerequisite | - | An Interface IP pair for VIP Communication on the interface |
In TR7
- Definition: On the Network → Interfaces screen, the interface is right-clicked and Add IP is selected; Interface IP or VIP is selected in the Ip Type field. The VIP option appears only while clustering is on; in the VIP row, the address, Master/slave and CIDR are entered.
- Appearance in the vService: In the Frontend IP list, each option is shown with an INT or VIP badge. In the IP column of the vService list, VIP addresses appear with the (M) or (S) suffix.
- Order: In a cluster, the Interface IP pair of the two devices is added first, then it is selected as VIP Communication in the interface's Edit Interface form, and the VIP is added last.
- Synchronization: In a cluster, the IPs are synchronized to the peer device with the Network area; with the default auto-sync, an added VIP is also sent to the peer device automatically (When does a change I make take effect; does it go live as soon as I save it?).
Common Misconceptions
- "I enter the IP while creating the vService." The IP is defined at the network layer; the vService only selects it from the list or adds it to the interface with + Add IP.
- "When the vService is turned off, the IP is turned off too." The IP is independent of the vService and stays on the network; to remove it, it is deleted from the Interfaces screen.
- "In a cluster, a vService published on an Interface IP is also redundant." An Interface IP does not pass to another device; a VIP is used for redundancy.
- "After a failure, the VIP stays on the peer device and has to be taken back manually." When the Master device comes back, the VIP returns to it on its own.
- "Adding a VIP is enough." If no VIP communication pair is selected on the interface, the VIP does not become active.
How it is done in the documentation
