I try to put in place 2 freebsd routers with carp interfaces. since I have only one wan address, lets say : 1.2.3.4 I'd like to use private range ips to do carp jobs :

10.0.0.1(router1) alias (1.2.3.4) 10.0.0.2 (router2) alias (1.2.3.4)

my ISP gateway is : 1.2.3.5

so when I make a ping 1.2.3.5

ping : sendto : No route to host

which is predictable.

some posts is talking about using pfsense to do the job. But, I only get freebsd one thoses routers. some helps would be apprecied.

thanks

I may be wrong, but AFAIK you need three addresses.

OpenBSD has carpdev(4), which removes the need for the additional addresses

You should be able to accomplish this with alias interfaces.

The rc.conf on host 1 would look something like this:

ifconfig_fxp0="inet 10.0.0.1/24"

ifconfig_fxp0_alias0="inet 1.2.3.4/24 vhid 100 pass mekmitasdigoat up"

And on host 2

ifconfig_fxp0="inet 10.0.0.2/24"

ifconfig_fxp0_alias0="inet 1.2.3.4/24 vhid 100 pass mekmitasdigoat advskew 100"

This will work as long as the WAN and private addresses are on different network ranges. You'll have to use /32 subnet masks otherwise, as the Handbook describes. For example, if your WAN address was 10.0.0.3 you'd need this configuration on host 1:

ifconfig_fxp0="inet 10.0.0.1/24"

ifconfig_fxp0_alias0="inet 10.0.0.3/32 vhid 100 pass mekmitasdigoat up"

And on host 2

ifconfig_fxp0="inet 10.0.0.2/24"

ifconfig_fxp0_alias0="inet 10.0.0.3/32 vhid 100 pass mekmitasdigoat advskew 100"

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.