@Derelict:
WAN Interface: Static IPv4 10.10.75.251/29
Gateway: x.x.x.17
Having your gateway not included in the interface subnet is an odd configuration.
Or is the interface really a /24 and you can only use that /29 out of it?
Sorry, I doesn't mentioned it!
The gateway is a public IP address, 62.x.x.17 and "use non local gateway" is set. Outbound NAT is also set.
I read all the threads here about this setup with version > 2.2 and someone mentioned, that the mask on the WAN interfaces should be the same as the public networks. I changed it to /24, master 10.10.75.251/24, slave 10.10.75.252/24 but there is no change. Master to Slave runs perfectly with only some lost packets, Slave to Master lets the default gateway missing on master. If I add it manually with route add default 62.x.x.17 all is up immediatly.
I have done some debugging on console:
a) console on master
enter persistent CARP maintenance mode on MASTER
failover to slave, all connections established
default gw lost on master (netstat -r)
leave persistent CARP maintenance mode on MASTER
all interfaces and services "green"
only default gw lost
route add default 62.x.x.17
all is up
b) console on master
ifconfig ibg4 down (WAN interface)
failover to slave, all connections established
default gw present on master
ifconfig ibg4 up
go back to master as active
all interfaces and services "green"
only default gw lost
route add default 62.x.x.17
all is up
c) console on master
sysctl net.inet.carp.demotion=250
failover to slave, all connections established
default gw present on master
sysctl net.inet.carp.demotion=-250
go back to master as active
all interfaces and services "green"
default gw present on master!!!
all is up
I tried c) several times and pf always switches perfectly between master and slave
without lost of any connection.
If I simulate a lost WAN interface with b) the default gw will be present. The default
gw not lost during failover, but when the Master takes over again.
If I set the Master in maintenance mode a) , the default gw is lost immadiatley.
What are the differences between these scenaries, so that only c) function correctly?
Tom