LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] Help with keepalived + bridge code!!

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] Help with keepalived + bridge code!!
From: "Ramsurrun Visham" <vishamr@xxxxxxxxx>
Date: Wed, 6 Jun 2007 14:36:22 +0400
Hi to all,

I want to use keepalived with bridging code. Is that possible? My
topology is as follows:


      |Master| -------  eth1 --------- |Backup|
    eth0 |                                       | eth0
br0 192.168.10.2                br0 192.168.10.3
           |                                       |
           |                                       |
           |     VIP 192.168.10.10       |
           |                                       |

My bridge setup on the MASTER PC is as follows:
----------------------------------------
#!/bin/bash
echo "1" > /proc/sys/net/ipv4/ip_forward
brctl addbr br0
brctl stp br0 off
brctl addif br0 eth0
ifconfig br0 0.0.0.0
ifconfig eth0 0.0.0.0 down
ifconfig br0 192.168.10.2 netmask 255.255.255.0 broadcast 192.168.10.255
ifconfig br0 up
ifconfig eth0 up
----------------------------------------

The BACKUP machine is setup as above except that the IP address
assigned to br0 is 192.168.10.3. The IP addresses of eth1 on Master is
192.168.100.100 and on Backup is 192.168.100.200.

My keepalived.conf on the MASTER node is as follows:
--------------------------------------
! Configuration File for keepalived

global_defs {
        lvs_id FW01
}

vrrp_sync_group G1 {   # must be before vrrp_instance declaration
  group {
    VI_1
  }
  #notify_master /usr/src/master.sh
  #notify_backup /usr/src/backup.sh
  #notify_backup /etc/keepalived/backup.sh
}

vrrp_instance VI_1 {
    state MASTER
    interface br0
    lvs_sync_daemon_interface eth1
    mcast_src_ip 192.168.100.100
    virtual_router_id 51
    priority 100
    advert_int 2
    authentication {
      auth_type PASS
      auth_pass visham
    }
    virtual_ipaddress {
        192.168.10.10/24 dev br0
    }
}
--------------------------------------

My keepalived.conf on the BACKUP node is as follows:
--------------------------------------
! Configuration File for keepalived

global_defs {
        lvs_id FW02
}

vrrp_sync_group G1 {   # must be before vrrp_instance declaration
  group {
    VI_1
  }
  notify_master /usr/src/master.sh
  notify_backup /usr/src/backup.sh
  #notify_backup /etc/keepalived/backup.sh
}

vrrp_instance VI_1 {
    state BACKUP
    interface br0
    lvs_sync_daemon_interface eth1
    mcast_src_ip 192.168.100.200
    virtual_router_id 51
    priority 50
    advert_int 2
    authentication {
      auth_type PASS
      auth_pass visham
    }
    virtual_ipaddress {
        192.168.10.10/24 dev br0
    }
}
--------------------------------------

The problem I get are as follows:
1) When I remove the cable connecting the Master PC to the switch,
though the Backup PC goes into Master Mode, the notify scripts are not
executed.

2) The VRRP messages are not sent via eth1. They are still sent via eth0.

Can someone pls tell me why this is not working? I'm going nuts with
this for more than 2 weeks now.

Thx in advance...

Warm regards,
Visham


<Prev in Thread] Current Thread [Next in Thread>