Mailing List Archive

My first attempt
Hello,

This is my first attempt at setting up an LVS. Pleasse forgive me if I am
being a bonehead.

I have three machines, all on a private network:

"Client:"---------------
192.168.168.5
-----------------------


"Director:"---------------
[root@wee2 httpd]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:90:27:32:23:07
inet addr:192.168.168.2 Bcast:192.168.168.7 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7671 errors:0 dropped:0 overruns:0 frame:0
TX packets:5958 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:12 Base address:0xe400

eth1 Link encap:Ethernet HWaddr 00:60:08:3D:44:60
inet addr:192.168.168.6 Bcast:192.168.168.255
Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29083 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:10 Base address:0x300

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:278 errors:0 dropped:0 overruns:0 frame:0
TX packets:278 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
----------------------


"Real Server:"-------------
[root@wee0 heartbeat]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:A0:CC:58:D5:97
inet addr:192.168.168.3 Bcast:192.168.168.15
Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:43486 errors:0 dropped:0 overruns:0 frame:0
TX packets:6987 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:4 Base address:0xf400

eth1 Link encap:Ethernet HWaddr 00:60:08:C2:2C:93
inet addr:192.168.168.4 Bcast:192.168.168.15
Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:302025 errors:0 dropped:0 overruns:0 frame:0
TX packets:624 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:10 Base address:0xfc40

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:237 errors:0 dropped:0 overruns:0 frame:0
TX packets:237 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
--------------------------

As per man page, on the Director, I did:

[root@wee2 httpd]# echo 1 > /proc/sys/net/ipv4/ip_forward
[root@wee2 httpd]# echo 1 > /proc/sys/net/ipv4/ip_always_defrag
[root@wee2 httpd]# ipchains -A forward -j MASQ -s 192.168.168.0/24 -d
0.0.0.0/0

Then I did:

[root@wee2 httpd]# ipvsadmin -A -t 192.168.168.2:80 -s rr
[root@wee2 httpd]# ipvsadm -a -t 192.168.168.2:80 -r 192.168.168.3 -m

On the Director, before I browse, I did a:

[root@wee2 httpd]# ipvsadm -l
IP Virtual Server version 0.8.3 (size=4096)
Protocol LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.168.2:80 rr
-> 192.168.168.3:80 Masq 1 0 0

Now on client, I browsed to 192.168.168.2. It hangs and then displays error.

At the same time on the Director, while trying to browse to it I did a:

[root@wee2 httpd]# ipvsadm -l
IP Virtual Server version 0.8.3 (size=4096)
Protocol LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.168.2:80 rr
-> 192.168.168.3:80 Masq 1 0 1


I am not sure what I am doing wrong. I thought I saw a post about LVS not
working if all machines are on the same (sub)net, but I am not sure...

Regards,

Ivan
Re: My first attempt [ In reply to ]
Ivan Figueredo wrote:

> I am not sure what I am doing wrong. I thought I saw a post about LVS not
> working if all machines are on the same (sub)net, but I am not sure...

yes you can do it, but it's a lot easier if you have the client and the
real-servers
are on different networks

Joe


--
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center,
mailto:mack.joseph@epa.gov ph# 919-541-0007, RTP, NC, USA
Re: My first attempt [ In reply to ]
----- Original Message -----
From: "Joseph Mack" <mack.joseph@epa.gov>
To: <lvs-users@LinuxVirtualServer.org>
Sent: Thursday, January 18, 2001 6:05 AM
Subject: Re: My first attempt


> Ivan Figueredo wrote:
>
> > I am not sure what I am doing wrong. I thought I saw a post about LVS
not
> > working if all machines are on the same (sub)net, but I am not sure...
>
> yes you can do it, but it's a lot easier if you have the client and the
> real-servers
> are on different networks

So, If *add* to eth0 the IP address, say, 192.168.0.1, then will that will
do? Also, do I have to do *anything* on the "real" server(s) - I didn't
touch them...

Ivan

> Joe
>
>
> --
> Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
> contractor to the National Environmental Supercomputer Center,
> mailto:mack.joseph@epa.gov ph# 919-541-0007, RTP, NC, USA
>
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
>
Re: My first attempt [ In reply to ]
Ugh,

Sorry, I should have added:

"...and I change the IP address of the client to say, 192.168.0.2, and add a
route from the 192.168.0.x network to the 192.168.168.x network on the
director..."

Ivan


----- Original Message -----
From: "Ivan Figueredo" <idf@weewannabe.com>
To: <lvs-users@LinuxVirtualServer.org>
Sent: Thursday, January 18, 2001 10:22 AM
Subject: Re: My first attempt


>
> ----- Original Message -----
> From: "Joseph Mack" <mack.joseph@epa.gov>
> To: <lvs-users@LinuxVirtualServer.org>
> Sent: Thursday, January 18, 2001 6:05 AM
> Subject: Re: My first attempt
>
>
> > Ivan Figueredo wrote:
> >
> > > I am not sure what I am doing wrong. I thought I saw a post about LVS
> not
> > > working if all machines are on the same (sub)net, but I am not sure...
> >
> > yes you can do it, but it's a lot easier if you have the client and the
> > real-servers
> > are on different networks
>
> So, If *add* to eth0 the IP address, say, 192.168.0.1, then will that
will
> do? Also, do I have to do *anything* on the "real" server(s) - I didn't
> touch them...
>
> Ivan
>
> > Joe
> >
> >
> > --
> > Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
> > contractor to the National Environmental Supercomputer Center,
> > mailto:mack.joseph@epa.gov ph# 919-541-0007, RTP, NC, USA
> >
> > _______________________________________________
> > LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> > Send requests to lvs-users-request@LinuxVirtualServer.org
> > or go to http://www.in-addr.de/mailman/listinfo/lvs-users
> >
>
>
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
>
Re: My first attempt [ In reply to ]
Ivan Figueredo wrote:
>
> ----- Original Message -----
> From: "Joseph Mack" <mack.joseph@epa.gov>
> To: <lvs-users@LinuxVirtualServer.org>
> Sent: Thursday, January 18, 2001 6:05 AM
> Subject: Re: My first attempt
>
> > Ivan Figueredo wrote:
> >
> > > I am not sure what I am doing wrong. I thought I saw a post about LVS
> not
> > > working if all machines are on the same (sub)net, but I am not sure...
> >
> > yes you can do it, but it's a lot easier if you have the client and the
> > real-servers
> > are on different networks
>
> So, If *add* to eth0 the IP address, say, 192.168.0.1, then will that will
> do? Also, do I have to do *anything* on the "real" server(s) - I didn't
> touch them...

have the client on 192.168.2.0/24 and the real-server on 192.168.2.0.

See the HOWTO

Joe


--
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center,
mailto:mack.joseph@epa.gov ph# 919-541-0007, RTP, NC, USA