LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

NAT not working!

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: NAT not working!
From: Pietro Ravasio <pietro.ravasio@xxxxxxxxx>
Date: Mon, 17 Jul 2000 11:42:22 +0200
Hi!

I'm trying to configure an LVS system, based on two LVS NAT servers and some real servers (actually only one, I'm waiting for new hardware) running http, ftp, telnet (just for remote administration on the real server) and an application server listening on 5555 port I use to connect to an Interbase 6 server

I'm testing LVS on two subnets:
192.0.9.0/24, acting as "internet" (my company network)
192.168.1.0/24 private subnet, containing real servers

I'm having some trouble with NAT: every connection I try to estabilish to 192.0.9.231 is being redirected to the machine this IP alias is created at, instead to the real server.

here is my lvs.cf file and /var/log/messages output corresponding to a "/etc/rc.d/init.d/pulse start" command (I'm running RH 6.2 on 2.2.16 LVS patched kernel).

The problem seems to be nanny that dies just after LVS invocation!

Any hint you might suggest would be REALLY appreciated!

Thanks and excuse me for email's lenght.

Pietro Ravasio

P.S.: "client1" is 192.0.9.211 (eth0) and 192.168.1.1 (eth1) primary LVS server
        "client3" is 192.0.9.213 (eth0) and 192.168.1.3 (eth1) backup LVS server
        "client2" is 192.168.1.101 (eth0) real HTTP, FTP, "davide" server

P.P.S.: I'm using round robin load balancing policy since I've got only one real server, at the moment!

########################lvs.cf#######################

# Global Section
primary = 192.0.9.211
backup = 192.0.9.213
backup_active = 1
keepalive = 2
deadtime = 10
heartbeat_port = 1050
# rsh_command = rsh
network = nat
nat_router = 192.168.1.254 eth1:1
#
# Per-virtual server section
#
# HTTP
#
virtual www.mediola.com {
        address = 192.0.9.231 eth0:0
        active = 1
        # load_monitor = uptime
        timeout = 10
        reentry = 180
        port = 80
        scheduler = rr
  server rs1 {
           address = 192.168.1.101
           active = 1
           weight = 200
           }
        }
#
# Application server di Davide
#
virtual davide.mediola.com {
        address = 192.0.9.231 eth0:0
        active = 1
        # load_monitor = uptime
        timeout = 10
        reentry = 180
        port = 5555
        scheduler = rr
  server rs1 {
          address = 192.168.1.101
          active = 1
          weight = 200
          }
        }
#
# ... and so on for port 21 and 23 ...
#


#############  /var/log/messages ################


Jul 17 11:16:30 client3 pulse[885]: partner dead: activating lvs
Jul 17 11:16:30 client3 pulse[894]: running command "/sbin/ifconfig" "eth1:1" "192.168.1.254" "up" Jul 17 11:16:30 client3 pulse[892]: running command "/usr/sbin/send_arp" "-i" "eth1" "192.168.1.254" "080009C00284" "192.168.1.255" "ffffffffffff" Jul 17 11:16:30 client3 pulse[896]: running command "/sbin/ifconfig" "eth0:0" "192.0.9.231" "up" Jul 17 11:16:30 client3 pulse[893]: running command "/usr/sbin/send_arp" "-i" "eth0" "192.0.9.231" "00C0DFA041D9" "192.0.9.255" "ffffffffffff"
Jul 17 11:16:30 client3 lvs: running command  "/usr/sbin/ipvsadm" "-C"
Jul 17 11:16:30 client3 kernel: send_arp uses obsolete (PF_INET,SOCK_PACKET)
Jul 17 11:16:30 client3 lvs[889]: running command "/usr/sbin/ipvsadm" "-A" "-t" "192.0.9.231:80" "-s" "rr" Jul 17 11:16:30 client3 lvs[889]: running command "/usr/sbin/nanny" "-c" "-h" "192.168.1.101" "-p" "80" "-a" "180" "-I" "/usr/sbin/ipvsadm" "-t" "10" "-w" "200" "-V" "192.0.9.231" "-M" "m" "-U" "rsh" Jul 17 11:16:30 client3 lvs[889]: create_monitor for www.mediola.com/rs1 running as pid 900 Jul 17 11:16:30 client3 lvs[889]: starting virtual service davide.mediola.com active: 88 Jul 17 11:16:30 client3 lvs[889]: running command "/usr/sbin/ipvsadm" "-A" "-t" "192.0.9.231:5555" "-s" "rr" Jul 17 11:16:30 client3 lvs[889]: running command "/usr/sbin/nanny" "-c" "-h" "192.168.1.101" "-p" "5555" "-a" "180" "-I" "/usr/sbin/ipvsadm" "-t" "10" "-w" "200" "-V" "192.0.9.231" "-M" "m" "-U" "rsh" Jul 17 11:16:30 client3 lvs[889]: create_monitor for davide.mediola.com/rs1 running as pid 902 Jul 17 11:16:30 client3 lvs[889]: starting virtual service ftp.mediola.com active: 176 Jul 17 11:16:30 client3 lvs[889]: running command "/usr/sbin/ipvsadm" "-A" "-t" "192.0.9.231:21" "-s" "rr" Jul 17 11:16:30 client3 lvs[889]: running command "/usr/sbin/nanny" "-c" "-h" "192.168.1.101" "-p" "21" "-a" "180" "-I" "/usr/sbin/ipvsadm" "-t" "10" "-w" "200" "-V" "192.0.9.231" "-M" "m" "-U" "rsh" Jul 17 11:16:30 client3 lvs[889]: create_monitor for ftp.mediola.com/rs1 running as pid 904 Jul 17 11:16:30 client3 lvs[889]: starting virtual service telnet2.mediola.com active: 264 Jul 17 11:16:30 client3 lvs[889]: running command "/usr/sbin/ipvsadm" "-A" "-t" "192.0.9.231:23" "-s" "rr" Jul 17 11:16:30 client3 nanny[900]: starting LVS client monitor for 192.0.9.231:80 Jul 17 11:16:31 client3 nanny[902]: starting LVS client monitor for 192.0.9.231:5555 Jul 17 11:16:31 client3 nanny[904]: starting LVS client monitor for 192.0.9.231:21 Jul 17 11:16:30 client3 lvs[889]: running command "/usr/sbin/nanny" "-c" "-h" "192.168.1.101" "-p" "23" "-a" "180" "-I" "/usr/sbin/ipvsadm" "-t" "180" "-w" "200" "-V" "192.0.9.231" "-M" "m" "-U" "rsh" Jul 17 11:16:31 client3 nanny[906]: starting LVS client monitor for 192.0.9.231:23 Jul 17 11:16:31 client3 lvs[889]: create_monitor for telnet2.mediola.com/rs1 running as pid 906
Jul 17 11:16:31 client3 nanny[906]: making 192.168.1.101:23 available
Jul 17 11:16:31 client3 nanny[906]: running command "/usr/sbin/ipvsadm" "-a" "-t" "192.0.9.231:23" "-r" "192.168.1.101" "-m" "-w" "200" Jul 17 11:16:31 client3 lvs[889]: nanny for child telnet2.mediola.com/rs1 died! shutting down lvs
Jul 17 11:16:31 client3 lvs[889]: shutting down virtual service www.mediola.com
Jul 17 11:16:31 client3 lvs[889]: running command "/usr/sbin/ipvsadm" "-D" "-t" "192.0.9.231:80" Jul 17 11:16:31 client3 lvs[889]: shutting down virtual service davide.mediola.com
Jul 17 11:16:31 client3 nanny[902]: terminating due to signal 15
Jul 17 11:16:31 client3 lvs[889]: running command "/usr/sbin/ipvsadm" "-D" "-t" "192.0.9.231:5555"
Jul 17 11:16:31 client3 lvs[889]: shutting down virtual service ftp.mediola.com
Jul 17 11:16:31 client3 nanny[904]: terminating due to signal 15
Jul 17 11:16:31 client3 lvs[889]: running command "/usr/sbin/ipvsadm" "-D" "-t" "192.0.9.231:21" Jul 17 11:16:31 client3 lvs[889]: shutting down virtual service telnet2.mediola.com Jul 17 11:16:31 client3 lvs[889]: running command "/usr/sbin/ipvsadm" "-D" "-t" "192.0.9.231:23" Jul 17 11:16:35 client3 pulse[891]: gratuitous lvs arps finished


<Prev in Thread] Current Thread [Next in Thread>
  • NAT not working!, Pietro Ravasio <=