[DRBD-user] Using DRBD between hosts with dual redundant network interfaces]

Matthias Weigel matthias.weigel at maweos.de
Wed Jul 6 17:54:15 CEST 2005

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hellp paddy,

paddy wrote:
> On Wed, Jul 06, 2005 at 03:44:48PM +0200, Matthias Weigel wrote:
> 
> 
>>From: Matthias Weigel <matthias.weigel at maweos.de>
>>To: paddy <paddy at panici.net>
>>Subject: Re: [DRBD-user] Using DRBD between hosts with dual redundant network
>>	interfaces
>>
>>Hello,
>>
>>if you want to do it outside of drbd, there is another option: OSPF.
>>
>>(I have not done this with drbd yet, only with other daemons!)
>>- setup an extra lo interface on each box, e.g. lo:2
>>- configure drbd to only use the ip of this extra lo interface
> 
> 
> I tried this before I went to ipip, what I got was:
> 
> # ifconfig lo:0 192.168.2.1 up
> black:~# ping 192.168.2.2
> PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.
> 64 bytes from 192.168.2.2: icmp_seq=1 ttl=64 time=0.324 ms
> ...
> 
> even if I set up a route for it.  I imagined this is part of the magic of lo.
> I thought about looking for the thing i wanted, but at that point the 
> tunneling possibility was nagging at me so I went that way.
> 
> so how do you do this step ?  something with iproute perhaps ?


Where is your problem? You got a successful ping didn't you?

Usually i configure the interface with the standard mechanism of the 
Linux distribution in use. For Redhat/Whitebox (what i use) this means 
creating a file /etc/sysconfig/network-scripts/ifcfg-lo:2 (for lo:2 as 
an example - I don't know if :0 has a special meaning).

Configuring a daemon to only listen to the lo:2 IP is specific to the 
daemon. I have not yet tried this with drbd, but e.g. Apache needs a 
directive "Listen ip:port" where ip is the IP you configured to your 
lo:2. Maybe normal drbd configuration, which includes the IPs, is just fine?

If you use 192.168.2.1 and 192.168.2.2 for the lo:2 interfaces on both 
nodes, you have to make sure you use HOST network masks 
(255.255.255.255). The lo:2's on both nodes need different routes in 
OSPF, so safer is to use different networks.

For me, OSPF takes care of the routes. However if you never used OSPF, 
you might have a "learning curve" in front of you. I prefer OSPF over 
other solutions, because it is a widely known and understood standard. 
All its behaviors, limitations, etc. are well understood (also at least 
partly by me ;) ). I never worked with other networking failover 
solutions, except with VRRP (www.keepalived.org), but it seems not 
suited for this task.

Best Regards

Matthias

> 
> 
>>- setup OSPF (e.g. from www.quagga.net) to manage the routes between the 
>>two boxes (including the extra lo interfaces).
>>
>>OSPF will always find a route, if one exists, between the two drbd 
>>boxes. It will even prefer faster networks over slower ones.
> 
> 
> cool.
> 
> I take it you're not aware of a gadget that does the redundant networking
> thing ?
> 
> Regards,
> Paddy



More information about the drbd-user mailing list