[lvs-users] ldirectord and kvm

Heinz A. Krebs heinz at chemit.at
Thu Jul 10 11:45:56 BST 2008


servas!

i'm trying to setup a load balancing system with 2 servers and with
qemu-kvm-engines running inside. tried it already some days (various
techniques), but could not succeed, so i'm asking for help, ...

on Server 1:
-------------------
eth0 is bidged to br0, eth1 not used by now
br0    192.168.0.110 
br0:1  192.168.5.110 (DIP)
br0:2  192.168.0.40  (VIP)

the server is running qemu-kvm, with a virtual network-card connected to
br0. the networkcard gets the address 192.168.5.115, with default
gateway 192.168.5.110. inside the virtual engine i'm running a
nameserver

relevant part of my ldirector.cf:
virtual=192.168.0.40:53
        real=192.168.5.115:53 masq
        service=dns
        scheduler=rr
        protocol=tcp
        checktype=on
and a similar entrie for ssh

from the server i can:
ssh 192.168.5.115       -> connection o.k.
telnet 192.168.5.115 53 -> connection o.k.

but from outside (CIP 192.168.0.5):
ssh 192.168.0.40 -> no route to host
telnet 192.168.0.40 53 -> connection refused
ping 192.168.0.40: ping is o.k.

tcpdump 'tcp port 53' says:
12:37:19.757766 IP 192.168.0.5.34186 > 192.168.0.40.domain: S
3157355270:3157355270(0) win 5840 <mss 1460,sackOK,timestamp 150219440
0,nop,wscale 6>
so it seems that the packages reaches the server, but is not forwarded
to the virtual machine ..

it does not make any differences if iptables on the server is running or
not :((

i also tried to use only one subnet (192.168.0.110 (as DIP),
192.168.0.115 (as RIP for the kvm-engine with 192.168.0.110 as default
gateway). with this setup i could connect from the client CIP
192.168.0.5 directly to the RIP 192.168.0.115 by ssh and via port 53.
but if i tried to connect then VIP 192.168.0.40 i again could not
succeed :((((

so what am i doing wrong????? is there any howto on the net for
ldirectord and kvm

ciao
  H.

[root at aglio ~] ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
UDP  192.168.0.40:domain wlc
TCP  192.168.0.40:domain rr
  -> 192.168.5.115:domain         Masq    0      0          0
TCP  192.168.0.40:ssh wlc
  -> 192.168.5.115:ssh            Masq    0      0          0

[root at aglio ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UP qlen 1000
    link/ether 00:1e:c9:bb:52:8b brd ff:ff:ff:ff:ff:ff
    inet6 fe80::21e:c9ff:febb:528b/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
    link/ether 00:1e:c9:bb:52:8c brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.10/24 brd 10.0.0.255 scope global eth1
    inet6 fe80::21e:c9ff:febb:528c/64 scope link 
       valid_lft forever preferred_lft forever
4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
UNKNOWN 
    link/ether 00:1e:c9:bb:52:8b brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.110/24 brd 192.168.0.255 scope global br0
    inet 192.168.5.110/24 brd 192.168.5.255 scope global br0:1
    inet 192.168.0.40/24 brd 192.168.0.255 scope global secondary br0:2
    inet6 fe80::21e:c9ff:febb:528b/64 scope link 
       valid_lft forever preferred_lft forever
5: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN 
    link/ether a6:f4:87:d2:77:4a brd ff:ff:ff:ff:ff:ff
    inet 10.0.1.1/24 brd 10.0.1.255 scope global virbr0
    inet6 fe80::a4f4:87ff:fed2:774a/64 scope link 
       valid_lft forever preferred_lft forever
7: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN qlen 500
    link/ether 00:ff:ab:01:05:bf brd ff:ff:ff:ff:ff:ff
    inet6 fe80::2ff:abff:fe01:5bf/64 scope link 
       valid_lft forever preferred_lft forever
8: sit0: <NOARP> mtu 1480 qdisc noop state DOWN 
    link/sit 0.0.0.0 brd 0.0.0.0


-- 
Heinz A. Krebs, Dipl.-Ing.
2352 Gumpoldskirchen / Austria
 
http://www.book-of-abstracts.com
Abstracts Management & Congress Organisation





More information about the lvs-users mailing list