Comment 16 for bug 496932

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Outside Network -- eth1 -- LB -- eth2 -- Real Servers

eth1: 192.168.0.50 (VIP1: 192.168.0.100)
eth2:10.10.10.50 (VIP2:10.10.10.1)
Real1: eth1:10.10.10.100
Real2 eth1 = 10.10.10.110

Ok, my config is the following:

global_defs {
   notification_email {
     keepalived-oper
   }
   notification_email_from keepalived-oper
   smtp_server 127.0.0.1
   smtp_connect_timeout 30
   router_id UBUNTULVS1
}

vrrp_sync_group VG1 {
   group {
      VI_IP1
   }
}

vrrp_instance VI_IP1 {
    state MASTER
    interface eth2
    lvs_sync_daemon_interface eth2
    virtual_router_id 9
    priority 250
    authentication {
        auth_type PASS
        auth_pass password
    }
    virtual_ipaddress {
        192.168.0.100/24 dev eth1
        10.10.10.1/24 dev eth2
    }
    preempt_delay 300
}

virtual_server 192.168.0.100 80 {
    delay_loop 10
    lb_algo rr
    lb_kind NAT
    ! nat_mask 255.255.255.0
    persistence_timeout 120
    persistence_granularity 255.255.255.0
    protocol TCP
    quorum 1

  real_server 10.10.10.100 80 {
    weight 1
    TCP_CHECK {
      connect_port 80
      connect_timeout 3
    }
  }

  real_server 10.10.10.110 80 {
    weight 1
    TCP_CHECK {
      connect_port 80
      connect_timeout 3
    }
  }
}

iptables rules are:

iptables -A INPUT -d 192.168.0.100/32 -i eth1 -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -d 192.168.0.100/32 -i eth1 -p icmp -j ACCEPT
iptables -A INPUT -d 192.168.0.100/32 -i eth1 -j DROP

I try to access the VIP through web browser and It just wont "loadbalance". You can see that the http request I did goes directly to InActConn. So, i don;t really know what might be the issue (ip_forward is enabled btw...)

root@server1:~# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.100:80 rr persistent 120 mask 255.255.255.0
  -> 10.10.10.100:80 Masq 1 0 1

Any ideas of what might be going wrong? I'd really appreciate your help.