LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

LVS-DR problem with Red Hat realserver

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: LVS-DR problem with Red Hat realserver
From: "Vittorio R. Tracy" <vrt@xxxxxxxxxxxxxxx>
Date: Wed, 20 Sep 2006 02:26:05 +0200
Hello,

I was hoping someone might be able to help, I have a LVS-DR machine
setup with one realserver. I cannot seem to connect to the Virtual IP
service.

$ telnet xxx.xxx.134.150 25
Trying xxx.xxx.134.150...
telnet: Unable to connect to remote host: No route to host

I have this configuration working with two web servers with various
services, which are running debain (so is the director). The new
machines are running Red Hat enterprise and I am not quite as familiar
with.

Is it possible I am missing something small on the realservers that
prevent them from responding?

The director can connect to the Real server IP and the the local Virtual
IP. 

The real server can connect the local Real server IP and the Director
IP.

I verified the real server does not arp for the Virtual IP.

Tcpdump on the Director:
# tcpdump -i any port 25 -p -n -t
16:55:46.986967 IP 129.250.134.237.3079 > xxx.xxx.134.150.25: S
3793562101:3793562101(0) win 5840 <mss 1460,sackOK,timestamp 1841347973
0,nop,wscale 2>
.
.
.

Looks like I am receiving traffic but no responses from the real
servers, the lines all look the same.


Tcpdump on the real server shows nothing.


Any hep would be greatly appreciated.






Using these guides:
http://www.austintek.com/LVS/LVS-HOWTO/mini-HOWTO/LVS-mini-HOWTO.html#example_lvs_dr
and:
http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.arp_problem.html#2.6_arp


I setup two machines as follows (though I am running more services):




----------------- Director -------------------
# uname -a
Linux ld1 2.6.8-3-686 #1 Sat Jul 15 10:32:25 UTC 2006 i686 GNU/Linux


ipvsadm -C

# should be 0
cat /proc/sys/net/ipv4/ip_forward
# should be 1
cat /proc/sys/net/ipv4/conf/all/send_redirects
# should be 1
cat /proc/sys/net/ipv4/conf/default/send_redirects
# should be 1
cat /proc/sys/net/ipv4/conf/eth0/send_redirects

ifconfig eth0:1 xxx.xxx.134.150 broadcast xxx.xxx.134.150 netmask
255.255.255.255
route add -host xxx.xxx.134.150 dev eth0:1

# ip addr
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:30:48:52:13:90 brd ff:ff:ff:ff:ff:ff
    inet xxx.xxx.158.19/28 brd xxx.xxx.158.255 scope global eth0
    inet xxx.xxx.134.150/32 brd xxx.xxx.134.150 scope global eth0:1
    inet6 fe80::230:48ff:fe52:1390/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:30:48:52:13:91 brd ff:ff:ff:ff:ff:ff
4: sit0: <NOARP> mtu 1480 qdisc noop 
    link/sit 0.0.0.0 brd 0.0.0.0


ipvsadm -A -t xxx.xxx.134.150:25 -s rr
ipvsadm -a -t xxx.xxx.134.150:25 -r xxx.xxx.134.147 -g -w 1

# ipvsadm -l --numeric
IP Virtual Server version 1.2.0 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  xxx.xxx.134.150:25 rr
  -> xxx.xxx.134.147:25            Route   1      0          0 

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
xxx.xxx.134.150  0.0.0.0         255.255.255.255 UH    0      0        0
eth0
xxx.xxx.158.16   0.0.0.0         255.255.255.240 U     0      0        0
eth0
0.0.0.0         xxx.xxx.158.17   0.0.0.0         UG    0      0        0
eth0


# tcpdump -i any port 25 -p -n -t
16:55:46.986967 IP xxx.xxx.234.137.3079 > xxx.xxx.134.150.25: S
3793562101:3793562101(0) win 5840 <mss 1460,sackOK,timestamp 1841347973
0,nop,wscale 2>
.
.
.

Looks like I am receiving traffic but no responses from the real
servers, the lines all look the same.

----------------- Realserver -------------------
# uname -a
Linux cg2 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 18:00:32 EDT 2006 i686
i686 i386 GNU/Linux


# tail /etc/sysctl.conf 
net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2


# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
IPADDR=xxx.xxx.134.147
NETMASK=255.255.255.248
NETWORK=xxx.xxx.134.144
GATEWAY=xxx.xxx.134.145
BROADCAST=xxx.xxx.134.151
HWADDR=00:13:72:FA:64:4A

# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
IPADDR=10.10.1.52
NETMASK=255.255.255.0
NETWORK=10.10.1.0
BROADCAST=10.10.1.255
HWADDR=00:13:72:FA:64:4C

# cat /etc/sysconfig/network-scripts/ifcfg-lo
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

# cat /etc/sysconfig/network-scripts/ifcfg-lo:1
DEVICE=lo:1
IPADDR=xxx.xxx.134.150
NETMASK=255.255.255.255
NETWORK=xxx.xxx.134.144
BROADCAST=xxx.xxx.134.150


# /sbin/ip addr
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet xxx.xxx.134.150/32 brd xxx.xxx.134.150 scope global lo:1
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:13:72:fa:64:4c brd ff:ff:ff:ff:ff:ff
    inet 10.10.1.52/24 brd 10.10.1.255 scope global eth1
    inet6 fe80::213:72ff:fefa:644c/64 scope link 
       valid_lft forever preferred_lft forever
3: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:13:72:fa:64:4a brd ff:ff:ff:ff:ff:ff
    inet xxx.xxx.134.147/29 brd xxx.xxx.134.151 scope global eth0
    inet6 fe80::213:72ff:fefa:644a/64 scope link 
       valid_lft forever preferred_lft forever
4: sit0: <NOARP> mtu 1480 qdisc noop 
    link/sit 0.0.0.0 brd 0.0.0.0

# /sbin/route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
xxx.xxx.134.144  0.0.0.0         255.255.255.248 U     0      0        0
eth0
10.10.1.0       0.0.0.0         255.255.255.0   U     0      0        0
eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0
eth1
0.0.0.0         xxx.xxx.134.145  0.0.0.0         UG    0      0        0
eth0

-- 
Vittorio R. Tracy <vrt@xxxxxxxxxxxxxxx>
Fastmetrics LLC.


<Prev in Thread] Current Thread [Next in Thread>