Before a server gets an address, the node asks its network whether another machine already answers for it. An address another machine answers for is marked In use elsewhere and never given out until you clear it. The node also watches its uplink for foreign machines using the panel's addresses, and the panel alerts administrators.
This catches the common case of a pool address that a server of another panel, or a machine the provider forgot, still uses on the same segment.
How the check works#
The node asks; the panel decides.
- IPv4: the agent sends an ordinary ARP request on the uplink, from the node's own MAC and address, as the node would ask anyway. Not the duplicate-address-detection form (sender
0.0.0.0): Linux answers that only for its own addresses, never as a proxy, so another hypervisor routing its guests by proxy ARP would not answer. - IPv6: a neighbour solicitation from the uplink's link-local address to the address's solicited-node group.
- Up to 16 addresses at once: two requests 400 ms apart, answers read for one second. A create waits about a second longer, in the queue, never in the browser.
- Only foreign MACs count. Answers from any of the node's own interfaces are ignored, and the node's proxy ARP never answers its own question, so an address one of its own servers uses comes back free.
- Answers from the block's gateway, the node's default gateway, or a MAC that answers for most of the addresses asked (a router's VRRP or HSRP virtual MAC) count as a router, not a conflict.
The agent needs nothing installed: it sends and reads the frames itself.
Which blocks are checked#
The switch is Check that an address is unused before giving it out, under Edit block › Additional settings.
| Block | Checked |
|---|---|
| IPv4, gateway inside the block | On by default |
| IPv6, on the node's link | On by default (single addresses; not subnets) |
| IPv4 routed to the node's main IP | Off, not offered: nothing on the uplink can hold its addresses |
| IPv4 bridged | Off: the guest itself answers ARP on the uplink |
| IPv6 routed to the node | Off |
| On a VLAN | Off: the uplink does not see the VLAN's segment |
| NAT | Never |
The block's page shows an Address check line: on or off, and whether ARP is watched on the node's uplink ("ARP watched on eth0, last asked …") or why not.
At create and Add address#
When a create or an Add address task is sent to the node, the panel asks about the addresses the server is to get (public IPv4 and single IPv6 addresses of checked blocks):
- Create: an address another machine answers for is marked and replaced by the next free address (without a fixed MAC), which is asked about in turn; up to three replacements. The task sent to the node, and the server, have the replacement. The audit log records
vm.address_replaced. The create fails withaddress_in_use_elsewherewhen a main address with a fixed MAC answers, when the node has no other free address, or after a fourth answer. - Add address: when the added address answers, the task is refused with "… is in use elsewhere: a machine with MAC … answered for it on
's network. It is marked in IP Pools; add another address." The address is released and stays marked. Add again: the next free address skips it.
Note: a replaced address means the server's address can differ from the one first shown. A billing module that read the address right after the create should read it again once the server is ready.
The watcher#
Every minute (vmstack:watch-addresses in the panel's scheduler), for each online node with a checked IPv4 block, the panel calls the node once:
- Passive watch: the agent reads ARP on the uplink and notes every frame from a foreign MAC with a sender address in a watched range (the machine asking for its gateway, answering, or announcing itself). A sighting is only a suspicion: the panel probes the address, and only an answer marks it.
- Samples: every 5 minutes, 4 addresses per node (free and in use, least recently checked first) are probed. A /24 is gone through in about an hour.
IPv6 is probed but not watched passively. A block's first sampled round only records (routers, check times) and marks nothing, so a router that answers everything cannot mark a whole pool right after an upgrade. At most 20 new marks per node per hour come from the watch and the samples; past that, marking stops and one alert says the ARP traffic on that network may be forged. Creates, adds and your own checks are never capped.
In use elsewhere marks#
A marked address shows a red In use elsewhere badge on the block's page: "Answered by 02:00:00:ab:cd:ef, first …, last seen … UTC", how it was found (checked before it was given out, routine check, its ARP traffic seen on the uplink, checked by an administrator), and "node … (VMStack)" when the MAC is another VMStack node's uplink (that node still routes the address: fix it there). The header counts them, and the In use elsewhere filter lists them.
- A marked free address is not given out, and is not counted as free in the pool or in the "IP pool running out" alert.
- A mark on an address one of your servers holds (a foreign machine took your customer's address) changes nothing for the server. It is shown on the server's Network tab to administrators, with a link to the pool, and alerted.
- A reserved address is marked but not alerted.
- Marks never go by themselves: a foreign server that is off tonight is back tomorrow.
Check now, Recheck and Clear mark#
On the block's page:
| Action | What it does |
|---|---|
| Check now | Asks the node about an unmarked address; the result is shown on the row. |
| Recheck | Asks again about a marked address; clears the mark when nobody answers. |
| Clear mark | Asks for confirmation ("The panel will give it out again, unless the node sees the other machine again.") and removes the mark. |
Clearing is audited (ip_address.conflict_cleared). Sightings from before a clear do not mark the address again.
Routers that answer for every address#
Some providers' routers answer ARP for addresses they route (proxy ARP on the router, or a virtual MAC answering for everything). The panel keeps the MACs that answered as a router per block; they never mark an address. The block's page then says: "A router answers for this block's addresses …, so the check tells little here: its answers never mark an address. Turn it off for this block in Edit block."
Turn the switch off for such a block. If the block is really routed to the node's main IP, change it to a routed block instead (Routed IPv4 and IPv6).
Alerts#
A new mark raises the alert group IP addresses another machine answers for, sent at once by default, one mail for everything found in a minute, at most every 30 minutes per address. Each line reads like "203.0.113.20 on node1 (free): answered by 02:00:00:ab:cd:ef at 14:05 UTC (watch: ARP from it)". Administrators choose it on the Notifications page of their account settings. Clearing a mark sends nothing.
When the node cannot check#
The check guards against a known failure; it does not stop creates when a node cannot answer. When the agent is too old (the endpoint answers 404), the node is unreachable, the uplink is unknown or the socket is refused, the address is given without the check (logged, not shown as an error). An agent without the checks is not asked again for an hour.
Limits#
- IPv6 is not watched passively, only probed.
- The marks are on the administrators' pages and mail only: the public API and webhooks do not expose them.
- The sampling rate (4 addresses every 5 minutes per node) is fixed.
- A probe can only see machines on the node's own segment. A conflict behind a router is invisible.