Which IP address is used as the source when using a VIP?
This topic applies only to the following products:
SolarWinds Observability Self-Hosted
DPAIM — EOC — IPAM — LA — NAM — NCM — NPM — NTA — SAM — SCM — SRM — UDT — VMAN — VNQM — WPM
Outbound communication from the HA pool, such as WMI or SNMP polling requests, may be sent by the primary or secondary server's IP address. All inbound communication goes through the VIP address.
The active pool member has a minimum of two IP addresses available: the IP address of the server and the VIP address for the pool.
Because there are multiple IP addresses bound to a single NIC, Windows chooses which IP address is used as the originating IP address. The IP address with the most high order bits that match the destination of the next hop is used as the source IP address for all outbound polling activity.
You can determine the source IP address by doing the following:
- Convert the IP addresses to binary.
- From left to right, compare how many bits in the IP addresses match the default gateway's IP address.
The IP address with the most consecutive, matching bits is used for the HA pool's source IP address.
In general, choose an IP address that is close to the default gateway's IP address so outbound communication comes from the VIP address, like in the first example. While this VIP selection method is not guaranteed to work, most environments are able to use this method.
All local (same subnet as the SolarWinds Platform server) traffic will source from the "first" address or native.
Examples of matching the binary bits
The following is an example where the VIP is used as the outbound IP address.
IP address | IP address converted to binary | # of matching bits | |
---|---|---|---|
Default Gateway (first hop) | 10.199.15.1 | 00001010-11000111-00001111-00000001 | |
VIP | 10.199.15.20 | 00001010-11000111-00001111-00010100 | 27 |
Primary pool member | 10.199.15.61 | 00001010-11000111-00001111-00111101 | 26 |
Secondary pool member | 10.199.15.62 | 00001010-11000111-00001111-00111110 | 26 |
The longest match in the example above is the VIP. It has 27 consecutive matching high order bits to the default gateway.
The following is an example where pool members' IP addresses are used as the outbound IP address.
IP address | IP address converted to binary | # of matching bits | |
---|---|---|---|
Default Gateway (first hop) | 10.199.15.1 | 00001010-11000111-00001111-00000001 | |
VIP |
10.199.15.82 | 00001010-11000111-00001111-01010010 | 25 |
Primary pool member | 10.199.15.61 | 00001010-11000111-00001111-00111101 | 26 |
Secondary pool member | 10.199.15.62 | 00001010-11000111-00001111-00111110 | 26 |
In this example, the longest match is the pool members' IP addresses. When a failover occurs, the IP address of the active SolarWinds Platform server is used as the source IP for all polling requests. The VIP address is only used for inbound traffic, such as syslog, SNMP traps, NetFlow, and accessing the SolarWinds Platform Web Console.