feat: CARP addresses as virtual IPs, with their holder in the reading (4.10.0) #38

Merged
christianmanivong merged 1 commits from feat/carp-virtual-ips into main 2026-10-16 09:10:36 +00:00
Owner

A firewall pair's CARP addresses are a third virtual IP mechanism (NetOrk/netork#1121).

Unlike vip-manager and keepalived, a CARP reading says who holds the address. A firewall's interface list need not show it (OPNsense's does not), but CARP's state names the MASTER.

  • VirtualIpsDict.carp (NotRequired): a firewall's CARP addresses. vip_manager/keepalived are None there.
  • VirtualIpDict.holds (NotRequired): the host holds the address by the mechanism's own state. None leaves the holder to the interfaces.
  • carp_virtual_ip() shapes one address bound to a VHID. MASTER holds, BACKUP stands by, INIT and DISABLED neither run nor hold, and an unknown state says nothing. It works the same for OPNsense and pfSense: a driver supplies the fields from its API (napalm-opnsense follows).

Tests: tests/test_carp_virtual_ips.py. Full suite 639 passed, mypy clean.

A firewall pair's CARP addresses are a third virtual IP mechanism (NetOrk/netork#1121). Unlike vip-manager and keepalived, a CARP reading says who holds the address. A firewall's interface list need not show it (OPNsense's does not), but CARP's state names the MASTER. - `VirtualIpsDict.carp` (NotRequired): a firewall's CARP addresses. `vip_manager`/`keepalived` are None there. - `VirtualIpDict.holds` (NotRequired): the host holds the address by the mechanism's own state. None leaves the holder to the interfaces. - `carp_virtual_ip()` shapes one address bound to a VHID. MASTER holds, BACKUP stands by, INIT and DISABLED neither run nor hold, and an unknown state says nothing. It works the same for OPNsense and pfSense: a driver supplies the fields from its API (napalm-opnsense follows). Tests: `tests/test_carp_virtual_ips.py`. Full suite 639 passed, mypy clean.
christianmanivong added 1 commit 2026-10-16 09:06:51 +00:00
feat: CARP addresses as virtual IPs, with their holder in the reading (4.10.0)
CI / test (3.10) (push) Successful in 27s
CI / test (3.11) (push) Successful in 24s
CI / test (3.12) (push) Successful in 27s
CI / test (3.13) (push) Successful in 25s
CI / test (3.10) (pull_request) Successful in 26s
CI / test (3.11) (pull_request) Successful in 24s
CI / test (3.12) (pull_request) Successful in 26s
CI / test (3.13) (pull_request) Successful in 26s
4f3b88db0e
A firewall pair's CARP addresses are a third virtual IP mechanism. Unlike
vip-manager and keepalived, a CARP reading says who holds the address: a
firewall's interface list need not show it, but CARP's state names the MASTER.

- VirtualIpsDict gains carp (NotRequired), VirtualIpDict gains holds
  (NotRequired; None leaves the holder to the interfaces).
- carp_virtual_ip() shapes one address bound to a VHID: MASTER holds, BACKUP
  stands by, INIT and DISABLED neither run nor hold, an unknown state says
  nothing. The same for OPNsense and pfSense; a driver supplies the fields.

netOrk #1121.
christianmanivong merged commit d3034bc8ea into main 2026-10-16 09:10:36 +00:00
christianmanivong deleted branch feat/carp-virtual-ips 2026-10-16 09:10:36 +00:00
Sign in to join this conversation.