On Thu, Aug 05 2010 at 50:12, Z Wing wrote:
[...]
> The question I have is how do I get dhclient working with the cable modem,
> given that the IP address is dynamic? dhclient doesn't work when the carp
> interface is in INIT mode and I'm not sure how to get carp to "share" the IP
> address between the 2 boxes. I presume that this must be possible to do as I
> am sure others would want to do it too.
> 
> What would the best way of doing this be? My criteria is:
> 
> - 1 cable modem with an IP assigned by my provider via DHCP
> - 1 dsl modem with statically assigned IPs
> - 2 boxes running OpenBSD, 1 master and 1 backup. If the master goes down, the
> backup takes over the master's duties and routes traffic through the cable
> modem and dsl modem according to my routing/firewall rules [which I am happy
> with - basically load balancing through various NAT rules]
> 
> I'd appreciate any comments or advice
I wouldn't use carp for the Internet connections but for the LAN interfaces.
For establishing Internet connections, one can use ifstated using the 
CARP state of the lan interface. 

You'll end up with a simple state machine (in pseudo language): 

carp init :
        if carp.up
                state carp_up
        if carp.down
                state carp_down
carp_up :
        start dhclient, pppoe on dsl
        pfctl -f
        if carp.down 
                state carp_down
carp_down :
        stop dhclient, pppoe
        if carp.up
                state carp_up

Reply via email to