[Linux-cluster] IP resource

Lon Hohberger lhh at redhat.com
Fri May 12 14:04:20 UTC 2006


On Thu, 2006-05-11 at 17:00 +0200, Roman Tobjasz wrote:
> I configured two node cluster.
> On each node I created bonding device (bond0) as primary network
> interface.
> On the 1st node bond0 I assigned IP address 192.168.1.100 (network
> 192.168.1.0, netmask 255.255.255.0).
> On the 2nd node bond0 I assigned IP address 192.168.1.101 (network and
> netmask like above).
> Next I created IP address 172.16.10.10 as a resource and added it to a
> service.
> Service doesn't start. If I change resource IP to 192.168.1.200
> then service starts corectly.
> 
> Is it possible to set up resource IP which isn't from this same
> network as primary network interface ?

Not currently.  The IP address selects its interface based on existing
IP addresses.

Ex.  If you have eth0 on 192.168.0.0/16 and eth1 on 172.16.0.0/16, and
add an IP 192.168.1.2, it will go on eth0.  If you add IP 172.16.1.2, it
will go on eth1.

Why is it done this way?

It's done this way because cluster nodes are not assumed to have all
NICs assigned the same ways.  For example, if you tell an IP to always
bind to eth0, and another node has eth0 on another network (but eth1 on
the correct network), the IP will be added to the wrong interface.  The
link will be up, but the service will be completely inaccessible to
clients.

The easy solution, I think, is to just add an IP to your bond0 interface
which is on the subnet, even if you shut off all traffic to that
interface using iptables.

-- Lon




More information about the Linux-cluster mailing list