Hi,
@ermal:
You are marking the interface down which would not count in suppress_preempt.
There are still some rough edges in general with carp but if you do trigger a linkdown through cable removal or somesuch it will switch.
More improvements are expected in 2.1 for this since a lot of time has been spent to make carp stable enough to work the general situation that it work 98% of the time from our statistics.
ah ok thx… Then I'm only wondering how the writer of these posts have done it with marking interface down :D
But it works as expected when I'm disabling port on switch - below documentation for other people.
One question left:
What happens if the gateway goes down (it's behind a switch, so "virtual" disconnection like the "interface down")?
Is it possible to use some mechanism to combine Gateway failover and CARP failover as group between master-slave pfSense boxes if the slave has still connection to the gateway?
Init state with Master/Slave:
[2.1-BETA1][root@gw1.zws8.local]/root(1): ifconfig | grep -e mtu -e carp
em0: flags=8943 <up,broadcast,running,promisc,simplex,multicast>metric 0 mtu 1500
em1: flags=8943 <up,broadcast,running,promisc,simplex,multicast>metric 0 mtu 1500
em2: flags=8843 <up,broadcast,running,simplex,multicast>metric 0 mtu 1500
em3: flags=8943 <up,broadcast,running,promisc,simplex,multicast>metric 0 mtu 1500
enc0: flags=0<> metric 0 mtu 1536
pfsync0: flags=41 <up,running>metric 0 mtu 1460
lo0: flags=8049 <up,loopback,running,multicast>metric 0 mtu 16384
pflog0: flags=100 <promisc>metric 0 mtu 33664
wan_vip211: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: MASTER vhid 211 advbase 1 advskew 0
wan_vip212: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: MASTER vhid 212 advbase 1 advskew 0
lan_vip213: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: MASTER vhid 213 advbase 1 advskew 0
lan_vip214: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: MASTER vhid 214 advbase 1 advskew 0
opt2_vip215: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: MASTER vhid 215 advbase 1 advskew 0
[2.1-BETA1][root@gw1.zws8.local]/root(2): sysctl net.inet.carp
net.inet.carp.allow: 1
net.inet.carp.preempt: 1
net.inet.carp.log: 1
net.inet.carp.arpbalance: 0
net.inet.carp.suppress_preempt: 0
Failover state (I've IPv4 & IPv6 CARP on same interface):
[2.1-BETA1][root@gw1.zws8.local]/root(3): sysctl net.inet.carp
net.inet.carp.allow: 1
net.inet.carp.preempt: 1
net.inet.carp.log: 1
net.inet.carp.arpbalance: 0
net.inet.carp.suppress_preempt: 2
[2.1-BETA1][root@gw1.zws8.local]/root(4): ifconfig | grep -e mtu -e carp
em0: flags=8943 <up,broadcast,running,promisc,simplex,multicast>metric 0 mtu 1500
em1: flags=8943 <up,broadcast,running,promisc,simplex,multicast>metric 0 mtu 1500
em2: flags=8843 <up,broadcast,running,simplex,multicast>metric 0 mtu 1500
em3: flags=8943 <up,broadcast,running,promisc,simplex,multicast>metric 0 mtu 1500
enc0: flags=0<> metric 0 mtu 1536
pfsync0: flags=41 <up,running>metric 0 mtu 1460
lo0: flags=8049 <up,loopback,running,multicast>metric 0 mtu 16384
pflog0: flags=100 <promisc>metric 0 mtu 33664
wan_vip211: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: BACKUP vhid 211 advbase 1 advskew 0
wan_vip212: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: BACKUP vhid 212 advbase 1 advskew 0
lan_vip213: flags=8 <loopback>metric 0 mtu 1500
carp: INIT vhid 213 advbase 1 advskew 0
lan_vip214: flags=8 <loopback>metric 0 mtu 1500
carp: INIT vhid 214 advbase 1 advskew 0
opt2_vip215: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: BACKUP vhid 215 advbase 1 advskew 0
And after falling back all normal again:
[2.1-BETA1][root@gw1.zws8.local]/root(6): ifconfig | grep -e mtu -e carp
em0: flags=8943 <up,broadcast,running,promisc,simplex,multicast>metric 0 mtu 1500
em1: flags=8943 <up,broadcast,running,promisc,simplex,multicast>metric 0 mtu 1500
em2: flags=8843 <up,broadcast,running,simplex,multicast>metric 0 mtu 1500
em3: flags=8943 <up,broadcast,running,promisc,simplex,multicast>metric 0 mtu 1500
enc0: flags=0<> metric 0 mtu 1536
pfsync0: flags=41 <up,running>metric 0 mtu 1460
lo0: flags=8049 <up,loopback,running,multicast>metric 0 mtu 16384
pflog0: flags=100 <promisc>metric 0 mtu 33664
wan_vip211: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: MASTER vhid 211 advbase 1 advskew 0
wan_vip212: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: MASTER vhid 212 advbase 1 advskew 0
lan_vip213: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: MASTER vhid 213 advbase 1 advskew 0
lan_vip214: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: MASTER vhid 214 advbase 1 advskew 0
opt2_vip215: flags=49 <up,loopback,running>metric 0 mtu 1500
carp: MASTER vhid 215 advbase 1 advskew 0
[2.1-BETA1][root@gw1.zws8.local]/root(7): sysctl net.inet.carp
net.inet.carp.allow: 1
net.inet.carp.preempt: 1
net.inet.carp.log: 1
net.inet.carp.arpbalance: 0
net.inet.carp.suppress_preempt: 0
Bests
Reiner</up,loopback,running></up,loopback,running></up,loopback,running></up,loopback,running></up,loopback,running></promisc></up,loopback,running,multicast></up,running></up,broadcast,running,promisc,simplex,multicast></up,broadcast,running,simplex,multicast></up,broadcast,running,promisc,simplex,multicast></up,broadcast,running,promisc,simplex,multicast></up,loopback,running></loopback></loopback></up,loopback,running></up,loopback,running></promisc></up,loopback,running,multicast></up,running></up,broadcast,running,promisc,simplex,multicast></up,broadcast,running,simplex,multicast></up,broadcast,running,promisc,simplex,multicast></up,broadcast,running,promisc,simplex,multicast></up,loopback,running></up,loopback,running></up,loopback,running></up,loopback,running></up,loopback,running></promisc></up,loopback,running,multicast></up,running></up,broadcast,running,promisc,simplex,multicast></up,broadcast,running,simplex,multicast></up,broadcast,running,promisc,simplex,multicast></up,broadcast,running,promisc,simplex,multicast>