# CARP interface at FreeBSD 9.0



## Vagner (Mar 4, 2012)

Hi guys! I need your help. I'm trying to set up a CARP interface on my server. All is fine, but if *I* set up settings in rc.conf, *I* get an error: 
	
	



```
ifconfig: (SIOCAIFADDR): can't assign requested address
```

I understand that this is due to the fact that at the time when the interface has to assign an address, it does not already exist. But I didn't understand why. My settings in rc.conf:

```
cloned_interfaces="carp0"
ifconfig_carp0="vhid 1 pass coolpass 10.0.0.10/28 advskew 1 advbase 1"
```


----------



## diegow (Mar 4, 2012)

You need to have an IP in some other interface on the same server, with a mask that includes the one you are trying to use on CARP.


----------



## Vagner (Mar 4, 2012)

diegow said:
			
		

> You need to have an ip in some other interfaced on the same server, with a mask that includes the one you are trying to use on carp



Sorry, full config rc.conf:

```
hostname="srv1"
ifconfig_em0="DHCP"    # Real iface
cloned_interfaces="carp0"
ifconfig_carp0="vhid 1 pass coolpass 10.0.0.10/28 advskew 1 advbase 1"  # loopback iface
sshd_enable="YES"
```


----------



## Vagner (Mar 4, 2012)

diegow said:
			
		

> You need to have an ip in some other interfaced on the same server, with a mask that includes the one you are trying to use on carp



Thanks! My rc.conf file included 
	
	



```
ifconfig_em0="DHCP"
```
 but CARP needs static IP to work


----------



## DutchDaemon (Mar 4, 2012)

Vagner, start formatting your posts correctly, thanks.


----------



## Vagner (Mar 4, 2012)

DutchDaemon said:
			
		

> Vagner, start formatting your posts correctly, thanks.



Sorry. I'll take this into account at the future.
PS. I made a mistake in the choice of thread. You could move it into "Networking" tread?


----------

