LVS Direct Routing

Konfiguracja serwerów, usług, itp.
pr0t
Posty: 19
Rejestracja: 31 maja 2012, 12:41

LVS Direct Routing

Post autor: pr0t »

Witam

Chce ustawic sobie LVS DR tak zeby caly ruch rozdzielany byl na dwa serwery http, wszystko dziala w sieci lokalnej.
Na 2 RS dziala apache natomiast 3 serwer pelni role laoad balancera (DR) ktory ma VIP(10.100.3.100).
Po zapytaniu VIP nie otwiera mi sie zadna strona, vip oczywiscie pingowalne. Moja konfiguracja :

RS1(node1)- 10.100.3.71
RS2(node2) -10.100.3.72
DR- 10.100.3.21
VIP - 10.100.3.100

Kod: Zaznacz cały

[root@loadbalancer ha]# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  10.100.3.100:http wlc
  -> node1:http                   Route   1      0          0         
  -> node2:http                   Route   1      0          0    
LVS routing ustawiony wydaje sie byc parwidlowo. Po odpytaniu VIP 10.100.3.100 widze ze w logach apache na RS1 i RS2 generowane sa zapytania GET

Kod: Zaznacz cały

node1 acces log apache
10.100.3.21 - - [04/Dec/2005:13:27:31 +0100] "GET / HTTP/1.0" 200 39 "-" "-"
10.100.3.21 - - [04/Dec/2005:13:27:37 +0100] "GET / HTTP/1.0" 200 39 "-" "-"
Ustawienia routingu na RS

Kod: Zaznacz cały

[root@node2 ipv4]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.100.3.100    0.0.0.0         255.255.255.255 UH        0 0          0 eth0
10.100.0.0      0.0.0.0         255.255.252.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         10.100.3.21     0.0.0.0         UG        0 0          0 eth0

Kod: Zaznacz cały

[root@node2 ipv4]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:13 :D 3:D 7:6F:A8  
          inet addr:10.100.3.72  Bcast:10.100.3.255  Mask:255.255.252.0
          inet6 addr: fe80::213:d3ff:fed7:6fa8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9121 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5382 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:700939 (684.5 KiB)  TX bytes:825499 (806.1 KiB)

eth0:1    Link encap:Ethernet  HWaddr 00:13 :D 3:D 7:6F:A8  
          inet addr:10.100.3.100  Bcast:10.100.3.255  Mask:255.255.252.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:18 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1512 (1.4 KiB)  TX bytes:1512 (1.4 KiB)
Jesli ktos kiedy bawil sie LVS prosze o pomoc co moze byc nie zle.
ODPOWIEDZ