LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

About keepalived configuration ...

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: About keepalived configuration ...
From: Sébastien CRAMATTE <s.cramatte@xxxxxxxxxx>
Date: Mon, 09 Oct 2006 12:05:03 +0200
Hello,

I'm trying to setup keealived on a vlan router  and I've got few setup
problem ...
I've got 2 vlan routers that interconnect 7 VLANs. My default gateway is
configured on VLAN800.  The management VLAN is VLAN500.

When my master is down the backup take the relay without problem.  But
when I reconnet the master,   the "slave" doesn't hand control  to the
master...
I need to have a virtual IP on each VLAN. So I've setup only one "vrrp
instance" in keepalived.conf  with  "virtual_ipaddress" block with each
virtual IPs.
Maybe I must setup various  "vrrp instance"  (one per VLAN) ?

Moreover a "netstat -lp" tell me that  vrrp listen on  all interfaces
"*" ... How can I restrict this to only one (vlan500)

# netstat - lp
...
raw        0      0 *:vrrp                  *:*                    
7          2087/keepalived   
raw        0      0 *:vrrp                  *:*                    
7          2087/keepalived   
raw        0      0 *:255                   *:*                    
7          2087/keepalived   
raw        0      0 *:255                   *:*                    
7          2086/keepalived 

I'm not sure  that these parameters are required  :

advert_int 1
lvs_sync_daemon_interface vlan500

Thanks for your help. I've tried to put maximum of details about my
configs. I hope that someone could give me a hand.
Regards

Sebastien


---- servers config ---
Linux vlanrouter2 2.6.16.18-router.3 #4 Mon Jul 24 01:39:18 CEST 2006
i686 GNU/Linux
Debian sarge 3.1
keepalived         1.1.11-3

# lsmod
Module                  Size  Used by
xt_MARK                 1340  14
ipt_MASQUERADE          1218  2
xt_state                 814  10
xt_limit                1032  4
ipt_LOG                 4622  5
iptable_nat             4261  1
ip_nat                  8726  2 ipt_MASQUERADE,iptable_nat
ip_conntrack           26772  4 ipt_MASQUERADE,xt_state,iptable_nat,ip_nat
floppy                 43524  0
i82875p_edac            2832  0
w83627hf               13193  0
hwmon_vid               1504  1 w83627hf
hwmon                    924  1 w83627hf
i2c_isa                 1672  1 w83627hf
i2c_core                9616  2 w83627hf,i2c_isa
bonding                61839  0
sha1                    1398  0
arc4                    1026  0
ppp_mppe                4465  0
ppp_generic            13260  1 ppp_mppe
slhc                    4519  1 ppp_generic
ip_vs                  54768  1
rtc                     6113  0


---- master config ----

# cat /etc/keepalived/keepalived.conf

global_defs {
notification_email {
sysadmins@xxxxxxxxxxxxxxxxx
}
notification_email_from keepalived@xxxxxxxxxxxxxxxxx
smtp_server localhost
smtp_connect_timeout 30
lvs_id LVS_MAIN
}

vrrp_instance VI_1 {
 state MASTER
 interface vlan500
 virtual_router_id 1
 advert_int 1
 lvs_sync_daemon_interface vlan500
 priority 100

 authentication {
  auth_type PASS
  auth_pass foo
 }

 virtual_ipaddress {
  192.168.0.1/24 brd 192.168.0.255 dev vlan500
  192.168.2.1/24 brd 192.168.2.255 dev vlan400
  192.168.4.1/24 brd 192.168.4.255 dev vlan800
  10.0.0.1/15 brd 10.0.255.255 dev vlan200
 }

}




---- backup config ----

#ip link show

1: eth0: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast master
bond0 qlen 1000
    link/ether 00:30:48:87:9f:a8 brd ff:ff:ff:ff:ff:ff
2: eth1: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast master
bond0 qlen 1000
    link/ether 00:30:48:87:9f:a8 brd ff:ff:ff:ff:ff:ff
3: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
4: bond0: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
    link/ether 00:30:48:87:9f:a8 brd ff:ff:ff:ff:ff:ff
5: vlan100: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
    link/ether 00:30:48:87:9f:a8 brd ff:ff:ff:ff:ff:ff
6: vlan200: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
    link/ether 00:30:48:87:9f:a8 brd ff:ff:ff:ff:ff:ff
7: vlan300: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
    link/ether 00:30:48:87:9f:a8 brd ff:ff:ff:ff:ff:ff
8: vlan400: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
    link/ether 00:30:48:87:9f:a8 brd ff:ff:ff:ff:ff:ff
9: vlan500: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
    link/ether 00:30:48:87:9f:a8 brd ff:ff:ff:ff:ff:ff
10: vlan700: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
    link/ether 00:30:48:87:9f:a8 brd ff:ff:ff:ff:ff:ff
11: vlan800: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
    link/ether 00:30:48:87:9f:a8 brd ff:ff:ff:ff:ff:ff



#ip addr show vlan800
11: vlan800: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
    link/ether 00:30:48:87:9f:a8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.4.3/24 brd 192.168.4.255 scope global vlan800
    inet 192.168.4.1/24 brd 192.168.4.255 scope global secondary vlan800



# cat /etc/keepalived/keepalived.conf

global_defs {
notification_email {
sysadmins@xxxxxxxxxxxxxxxxx
}
notification_email_from keepalived@xxxxxxxxxxxxxxxxx
smtp_server localhost
smtp_connect_timeout 30
lvs_id LVS_MAIN
}

vrrp_instance VI_1 {
 state BACKUP
 interface vlan500
 virtual_router_id 1
 advert_int 1
 lvs_sync_daemon_interface vlan500
 priority 50
 advert_int 1
 authentication {
  auth_type PASS
  auth_pass foo
 }

 virtual_ipaddress {
  192.168.0.1/24 brd 192.168.0.254 dev vlan500
  192.168.2.1/24 brd 192.168.2.255 dev vlan400
  192.168.4.1/24 brd 192.168.4.255 dev vlan800
  10.0.0.1/15 brd 10.0.255.255 dev vlan200
 }





<Prev in Thread] Current Thread [Next in Thread>
  • About keepalived configuration ..., Sébastien CRAMATTE <=