LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

The gateway IP

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: The gateway IP
From: Pierre Ancelot <pierre@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 Jan 2006 14:46:49 -0500
Hi everyone :)

I just seen an issue on my config that i didn't have on my other
cluster.
The only thing is i have a gateway problem:

On the master i get this:
172.16.50.0/24 dev eth0  proto kernel  scope link  src 172.16.50.70 
10.0.1.0/24 dev eth1  proto kernel  scope link  src 10.0.1.4 
192.168.1.0/24 dev eth1  proto kernel  scope link  src 192.168.1.4 
10.0.2.0/24 dev eth0  proto kernel  scope link  src 10.0.2.2 
default via 172.16.50.1 dev eth0  src 172.16.50.70 
default via 10.0.1.254 dev eth1 


On the backup, i get this:
10.0.1.0/24 dev eth1  proto kernel  scope link  src 10.0.1.2 
192.168.1.0/24 dev eth1  proto kernel  scope link  src 192.168.1.2 
10.0.2.0/24 dev eth0  proto kernel  scope link  src 10.0.2.1 
default via 10.0.1.254 dev eth1 

The backup is right, it should use the ip 10.0.1.254 as default gw but
the master should remove this address as default gateway because it
messes around.

Anyone have an idea of what i have done wrong ??
Here's my config file.
Thanks a lot !

Pierre.





global defs {
        notification_email {
                pierre@xxxxxxxxx
        }
        notification_email_from keepalived@xxxxxxxxx
        smtp_server poseidon.here.here
        smtp_connect_timeout 10
        lvs_id poseidon
}

###########################################################
# Here comes the group(s) definitions


vrrp_sync_group VG1 {
        group {
        VI_1
        VI_GATEWAY
        }
        notify_master "/bct/tomaster.sh"
        notify_backup "/bct/toslave.sh"
} 

vrrp_instance VI_1 {
        state BACKUP
        interface eth0
        lvs_sync_daemon_interface eth0
        mcast_src_ip 10.0.2.1
        virtual_router_id 150
        priority 10
        advert_int 5
        smtp_alert
        authentication {
                auth_type PASS
                auth_pass test
        }
        virtual_ipaddress {
                172.16.50.70/24
        }
        virtual_routes {
                src 172.16.50.70 to 0.0.0.0/0 via 172.16.50.1 dev eth0
        }
}

vrrp_instance VI_GATEWAY {
        state BACKUP
        interface eth1
        lvs_sync_daemon_interface eth1
        mcast_src_ip 10.0.1.1
        virtual_router_id 151
        priority 10
        advert_int 5
        smtp_alert
        authentication {
                auth_type PASS
                auth_pass test
        }
        virtual_ipaddress {
                10.0.1.254/24
        }
} 



###########################################################
# Virtual servers and real servers definitions

# tcp 80
virtual_server 172.16.50.70 80 {
delay_loop 5
lb_algo rr
lb_kind NAT
persistance_timeout 10
protocol TCP
real_server 10.0.1.2 80 {
        TCP_CHECK {
                connect_timeout 10
                connect_port 80
        }
}
real_server 10.0.1.3 80 {
        TCP_CHECK {
                connect_timeout 10
                connect_port 80
        }
}
real_server 10.0.1.4 80 {
        TCP_CHECK {
                connect_timeout 10
                connect_port 80
        }
}
# tcp 443
virtual_server 172.16.50.70 443 {
delay_loop 5
lb_algo rr
lb_kind NAT
persistance_timeout 10
protocol TCP
real_server 10.0.1.2 443 {
        TCP_CHECK {
                connect_timeout 10
                connect_port 443
        }
}
real_server 10.0.1.3 443 {
        TCP_CHECK {
                connect_timeout 10
                connect_port 443
        }
}
real_server 10.0.1.4 443 {
        TCP_CHECK {
                connect_timeout 10
                connect_port 443
        }
}
}



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