I have two OpenBSD 4.2 machines, box1 and box2.  They have public IPs
1.1.1.1 and 1.1.1.2 and a direct Ethernet connection with 10.88.0.1
and 10.88.0.2.  They share a carp interface configured for 1.1.1.5
(box1 is the master; preempt is enabled), and pfsync is configured on
the direct Ethernet.

box1 is running a TCP server that prints out its hostname once a
second on 10.88.0.1:5555, and a PF rule for "rdr on $ext_if to 1.1.1.5
port 5555 -> 10.88.0.1".

Starting with both machines up and running, I run "nc 1.1.1.5 5555"
and get output once a second.  I run "ifconfig -g carp carpdemote 5"
on box1, and box2 takes over the carp interface.  I keep receiving
output, and then kill nc.  box1's PF state changes to TIME_WAIT, but
box2's stays in ESTABLISHED.

I expect the state on box2 to change to TIME_WAIT as this is what
happens if I do not run "ifconfig -g carp carpdemote 5" in the above
process, or if I also run "ifconfig -g carp -carpdemote 5" before
killing the TCP connection.

(There are other details to my configuration like a second carp
interface for load balancing, another server running on
10.88.0.2:5555, and an internal network, but I don't think those are
relevant to this problem.)

Reply via email to