# net.inet.carp.preempt



## muzinim (Jul 25, 2011)

It is my understanding that if I enable net.inet.carp.preempt, when one carp interface on the master goes down, all carp interfaces should also go down but I am not finding this to be true.  When I down either interface on the master, the other interface continues to be master.  My configuration is as follows:

Master:


```
cloned_interfaces="carp0 carp1"
ifconfig_carp0="vhid 1 pass <password> 165.196.25.108/25"
ifconfig_carp1="vhid 2 pass <password> 165.196.14.26/24"
```
Backup:


```
cloned_interfaces="carp0 carp1"
ifconfig_carp0="vhid 1 advskew 100 pass <password> 165.196.25.108/25"
ifconfig_carp1="vhid 2 advskew 100 pass <password> 165.196.14.26/24"
```

This is what the ifconfig output on the master looks like after I down one of the interfaces:


```
carp0: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
	inet 165.196.25.108 netmask 0xffffff80 
	carp: MASTER vhid 1 advbase 1 advskew 0
carp1: flags=8<LOOPBACK> metric 0 mtu 1500
	inet 165.196.14.26 netmask 0xffffff00 
	carp: INIT vhid 2 advbase 1 advskew 0
```

And the output of sysctl:


```
sysctl -a | grep "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
```


----------



## pbd (Jul 26, 2011)

muzinim said:
			
		

> When I down either interface on the master



How do you do that? You need to take down _physical_ interface, not carp itself.

I'm not sure, but maybe it's necessary for the interface to actually lost link, `# ifconfig [i]device[/i] down` is not enough. But I cannot confirm that now.


----------



## muzinim (Jul 27, 2011)

You are correct.  When I unplugged the cable from the NIC, all interfaces failed over.  Thank you for the response.


----------

