that worked, thanks for the help. i have one more question, what if i were to create a failover between the two nodes, how to manage the virtual IP in that case
On Fri, Aug 29, 2008 at 3:57 PM, Thomas Pedoussaut <[EMAIL PROTECTED]>wrote: > Vishwanath T. K. wrote: > > Hi All, > > > > I have configured the LVS in local node. The configuration included two > > nodes (director+real server) > > > > VIP: 192.168.2.200 > > > > Node configuration: > > > > node1: > > ifconfig lo:0 192.168.2.200 netmask 255.255.255.255 broadcast > > 192.168.2.200 up > > eth0: 192.168.2.50/24 gateway 192.168.2.254, dev eth0 > > HTTP service listening on all interfaces. > > > > IPVSADM: > > ipvsadm -A -t 192.168.2.200:80 -s rr > > ipvsadm -a -t 192.168.2.200:80 -r 192.168.2.50:80 > > ipvsadm -a -t 192.168.2.200:80 -r 192.168.2.51:80 -g > > > > > > node2: > > eth0: 192.168.2.51/24 gateway 192.168.2.254, dev eth0 > > HTTP service listening on all interfaces. > > > > Client IP: 192.168.2.1 > > > > Now the problem i am having > > > > When i access 192.168.2.200 from the client, and when the service > request is > > sent to the node2 nothing happens, while then the service request is > > forwarded to 192.168.2.50 (real IP on node1) the web pages are served. > > > > IPVSADM - connection output > > > > [EMAIL PROTECTED] ~]# ipvsadm -lnc > > IPVS connection entries > > pro expire state source virtual destination > > TCP 01:57 FIN_WAIT 192.168.2.1:50307 192.168.2.200:80 > 192.168.2.50:80 > > TCP 00:52 SYN_RECV 192.168.2.1:50294 192.168.2.200:80 > 192.168.2.51:80 > > > > Why the second node is not serving any request ? Is there > > setup/configuration left on the node2 ? > > > From your config I take you are using direct routing. > Your node 2 doesn't know it has to handle traffic for the VIP, so it > silently drops packets arriving. > You need to configure the VIP as an alias of lo on that node as well ( > and play with the arp config to avoid announcing that IP on the network. > Add that in /etc/sysctl.conf > net.ipv4.conf.eth0.arp_ignore = 1 > net.ipv4.conf.eth0.arp_announce = 2 > net.ipv4.conf.all.arp_ignore = 1 > net.ipv4.conf.all.arp_announce = 2 > > Reading the doc http://www.linuxvirtualserver.org/VS-DRouting.html helps > a lot as well. > > _______________________________________________ > LinuxVirtualServer.org mailing list - [email protected] > Send requests to [EMAIL PROTECTED] > or go to http://lists.graemef.net/mailman/listinfo/lvs-users > _______________________________________________ LinuxVirtualServer.org mailing list - [email protected] Send requests to [EMAIL PROTECTED] or go to http://lists.graemef.net/mailman/listinfo/lvs-users
