Hello to all,
I have 2 server with RHEL 5 and Piranha installed.
I would like use these servers as director and backup for LVS and as real server
for a web server apache configured with virtual host ip based.
Each server has 4 NIC configured with bond0 2xNIC and bond1 2xNIC.
Network configuration Server 1:
bond0 (External networw) 10.0.0.1
bond1 (Hearbeat network) 192.168.0.1
bond1:10 (Real server 1) 172.16.0.10
bond1:11 (Real server 2) 172.16.0.11
Network configuration Server 2:
bond0 (External networw) 10.0.0.2
bond1 (Hearbeat network) 192.168.0.2
bond1:12 (Real server 1) 172.16.0.12
bond1:13 (Real server 2) 172.16.0.13
switch
|---------------| |------------|
| |
|-----------------| |------------------|
| bond0 | | bond0 |
| | | |
| | | |
| bond1 | | bond1 |
|-----------------| |------------------|
| cross cable |
|-------------------------------|
I have used virtual server via NAT and scheduler sh.
The nat router is configured on bond1:1 with ip 176.16.0.1
I have 2 virtual ip configured:
1. bond0:5 with ip 10.0.0.5 real server 1 of server1 and real server 1
of server2
2. bond0:6 with ip 10.0.0.6 real server 2 of server1 and real server 2
of server2
I have configured some rule for routing.
Server 1
ip rule from 172.16.0.10 lookup lvs
ip rule from 172.16.0.11 lookup lvs
ip route add 172.16.0.12 dev bond1 src 172.16.0.10 table lvs
ip route add 172.16.0.13 dev bond1 src 172.16.0.11 table lvs
ip route add default via 176.16.0.1 table lvs
Server 2
ip rule from 172.16.0.12 lookup lvs
ip rule from 172.16.0.13 lookup lvs
ip route add 172.16.0.10 dev bond1 src 172.16.0.12 table lvs
ip route add 172.16.0.11 dev bond1 src 172.16.0.13 table lvs
ip route add default via 176.16.0.1 table lvs
I haven't rule for iptables.
I have 2 problems.
1. I would like set the listen of apache only on ip of real server but
when lvs send
the request on local real server it tell me connection refused, if
apache bind the
port 80 on all interface all request works.
2. For routing I tried many configuration only this permit to nanny
the monitor the remote server
and permit to external client access to remote server.
I don't like to me this solution, is there a solution more simple?
Without I need insert
a routing rule for each real servers which I need add.
Thanks in advance for help
Alexander
|