Mailing List Archive

LVS-NAT/ configure problems
Hello,
I am sure this one is going to be blatantly obvious to someone other than
me. I apologize for sending a ridicoluous amount of info I just want to
make sure that I have all the bases covered. I am trying to telnet to the
cluster from lsb.syr.edu. The two servers are rr with no weighting. I used
the latest configure from the website. I think something is funny with
route -n on the lvs-nat box see below. Thanks in advance.

Here is my setup:




(internet)
|
gateway to rest of world 128.230.102.1
|
|--------------lsb.syr.edu (telnet instigator)
|
|
|
eth0 - 128.230.102.100 (syru102-100)
|
---------------
| LVS-NAT Box |
---------------
|
eth1 - 192.168.1.1
|
---------------------
| |
| |
eth0 - 192.168.1.10 eth0 - 192.168.1.20
______________ ______________
| | | |
| real-server1 | | real-server2 |
|______________| |______________|

uname -a on lvs box:
Linux syru102-100.syr.edu 2.4.2

[root@syru102-100 /root]# ipvsadm -h |head -1
ipvsadm v1.17 2001/03/18 (compiled with popt and IPVS v0.2.7)

***I think that this might be a symptom of my problem***
the first entry of 128.230.102.100 does not make sense to me.
[root@syru102-100 /root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
128.230.102.100 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
128.230.102.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 128.230.102.1 0.0.0.0 UG 0 0 0 eth0

[root@syru102-100 /root]# netstat -an|more
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:1024 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 128.230.102.100:22 128.230.102.12:1023 ESTABLISHED
udp 0 0 0.0.0.0:1024 0.0.0.0:*
udp 0 0 0.0.0.0:111 0.0.0.0:*
udp 0 0 0.0.0.0:634 0.0.0.0:*

[root@syru102-100 /root]# more lvs_nat.conf
LVS_TYPE=VS_NAT
INITIAL_STATE=on
VIP=eth0 128.230.102.100 255.255.255.0 128.230.102.255
DIRECTOR_INSIDEIP=eth1 192.168.1.1 192.168.1.0 255.255.255.0 192.168.1.255
DIRECTOR_DEFAULT_GW=128.230.102.1
SERVICE=t telnet rr 192.168.1.10:telnet 192.168.1.20:telnet
#SERVICE=t netpipe rr realserver1:netpipe
SERVER_NET_DEVICE=eth0
SERVER_DEFAULT_GW=192.168.1.1
#----------end lvs_nat.conf------------------------------------


tcpdump from lsb.syr.edu (machine that initiated telnet connection)
(if these are two mangled I can resend them if needs be)

[root@lsb /root]# more tcpdump.telnet.host
02:42:02.005109 eth0 > lsb.syr.edu.35190 > syru102-100.syr.edu.telnet: S
1617576848:1617576848(0) win 5840 <mss 1460,sackOK,timestamp 203890696
0,nop,wscale 0> (DF)
02:42:02.006350 eth0 < syru102-100.syr.edu.61000 > lsb.syr.edu.35190: S
1296216952:1296216952(0) ack 1617576849 win 32120 <mss
1460,sackOK,timestamp 9214646 203890696,nop,wscale 0> (DF)
02:42:02.006414 eth0 > lsb.syr.edu.35190 > syru102-100.syr.edu.61000: R
1617576849:1617576849(0) win 0 (DF)
02:42:04.997309 eth0 > lsb.syr.edu.35190 > syru102-100.syr.edu.telnet: S
1617576848:1617576848(0) win 5840 <mss 1460,sackOK,timestamp 203890996
0,nop,wscale 0> (DF)
02:42:04.998036 eth0 < syru102-100.syr.edu.61000 > lsb.syr.edu.35190: S
1299208683:1299208683(0) ack 1617576849 win 32120 <mss
1460,sackOK,timestamp 9214946 203890996,nop,wscale 0> (DF)
02:42:04.998106 eth0 > lsb.syr.edu.35190 > syru102-100.syr.edu.61000: R
1617576849:1617576849(0) win 0 (DF)
02:42:10.997315 eth0 > lsb.syr.edu.35190 > syru102-100.syr.edu.telnet: S
1617576848:1617576848(0) win 5840 <mss 1460,sackOK,timestamp 203891596
0,nop,wscale 0> (DF)
02:42:10.998022 eth0 < syru102-100.syr.edu.61000 > lsb.syr.edu.35190: S
1305208518:1305208518(0) ack 1617576849 win 32120 <mss
1460,sackOK,timestamp 9215546 203891596,nop,wscale 0> (DF)
02:42:10.998087 eth0 > lsb.syr.edu.35190 > syru102-100.syr.edu.61000: R
1617576849:1617576849(0) win 0 (DF)
02:42:22.997312 eth0 > lsb.syr.edu.35190 > syru102-100.syr.edu.telnet: S
1617576848:1617576848(0) win 5840 <mss 1460,sackOK,timestamp 203892796
0,nop,wscale 0> (DF)
02:42:22.998097 eth0 < syru102-100.syr.edu.61000 > lsb.syr.edu.35190: S
1317208220:1317208220(0) ack 1617576849 win 32120 <mss
1460,sackOK,timestamp 9216746 203892796,nop,wscale 0> (DF)
02:42:22.998162 eth0 > lsb.syr.edu.35190 > syru102-100.syr.edu.61000: R
1617576849:1617576849(0) win 0 (DF)
02:42:27.995818 eth0 < arp who-has lsb.syr.edu tell syru102-100.syr.edu
02:42:27.995883 eth0 > arp reply lsb.syr.edu (0:0:f8:1f:98:f9) is-at
0:0:f8:1f:98:f9 (0:1:2:75:98:b5)
02:42:46.997317 eth0 > lsb.syr.edu.35190 > syru102-100.syr.edu.telnet: S
1617576848:1617576848(0) win 5840 <mss 1460,sackOK,timestamp 203895196
0,nop,wscale 0> (DF)
02:42:46.998106 eth0 < syru102-100.syr.edu.61000 > lsb.syr.edu.35190: S
1341207580:1341207580(0) ack 1617576849 win 32120 <mss
1460,sackOK,timestamp 9219146 203895196,nop,wscale 0> (DF)
02:42:46.998172 eth0 > lsb.syr.edu.35190 > syru102-100.syr.edu.61000: R
1617576849:1617576849(0) win 0 (DF)
02:42:51.997279 eth0 > arp who-has syru102-100.syr.edu tell lsb.syr.edu
(0:0:f8:1f:98:f9)
02:42:51.997615 eth0 < arp reply syru102-100.syr.edu is-at 0:1:2:75:98:b5
(0:0:f8:1f:98:f9)

And tcpdump from eth1 on lvs-nat box:

[root@syru102-100 /root]# more inside.nat.system
21:38:27.593684 > arp who-has 192.168.1.20 tell 192.168.1.1
(0:1:2:75:96:3e)
21:38:27.593929 < arp reply 192.168.1.20 is-at 0:2:b3:20:ea:a7
(0:1:2:75:96:3e)
21:38:27.593960 > lsb.syr.edu.35190 > 192.168.1.20.telnet: S
1617576848:1617576848(0) win 5840 <mss 1460,sackOK,timestamp 203890696
0,nop,wscale 0> (DF)
21:38:27.594224 < 192.168.1.20.telnet > lsb.syr.edu.35190: S
1296216952:1296216952(0) ack 1617576849 win 32120 <mss
1460,sackOK,timestamp 9214646 203890696,nop,wscale 0> (DF)21:38:27.594888
> lsb.syr.edu.35190 > 192.168.1.20.telnet: R 1617576849:1617576849(0) win
0 (DF)
21:38:30.585314 > lsb.syr.edu.35190 > 192.168.1.20.telnet: S
1617576848:1617576848(0) win 5840 <mss 1460,sackOK,timestamp 203890996
0,nop,wscale 0> (DF)
21:38:30.585554 < 192.168.1.20.telnet > lsb.syr.edu.35190: S
1299208683:1299208683(0) ack 1617576849 win 32120 <mss
1460,sackOK,timestamp 9214946 203890996,nop,wscale 0> (DF)21:38:30.586066
> lsb.syr.edu.35190 > 192.168.1.20.telnet: R 1617576849:1617576849(0) win
0 (DF)
21:38:32.584193 < arp who-has 192.168.1.1 tell 192.168.1.20
21:38:32.584239 > arp reply 192.168.1.1 (0:1:2:75:96:3e) is-at
0:1:2:75:96:3e (0:2:b3:20:ea:a7)
21:38:36.584378 > lsb.syr.edu.35190 > 192.168.1.20.telnet: S
1617576848:1617576848(0) win 5840 <mss 1460,sackOK,timestamp 203891596
0,nop,wscale 0> (DF)
21:38:36.584617 < 192.168.1.20.telnet > lsb.syr.edu.35190: S
1305208518:1305208518(0) ack 1617576849 win 32120 <mss
1460,sackOK,timestamp 9215546 203891596,nop,wscale 0> (DF)21:38:36.585112
> lsb.syr.edu.35190 > 192.168.1.20.telnet: R 1617576849:1617576849(0) win
0 (DF)
21:38:48.582507 > lsb.syr.edu.35190 > 192.168.1.20.telnet: S
1617576848:1617576848(0) win 5840 <mss 1460,sackOK,timestamp 203892796
0,nop,wscale 0> (DF)
21:38:48.582798 < 192.168.1.20.telnet > lsb.syr.edu.35190: S
1317208220:1317208220(0) ack 1617576849 win 32120 <mss
1460,sackOK,timestamp 9216746 203892796,nop,wscale 0> (DF)21:38:48.583330
> lsb.syr.edu.35190 > 192.168.1.20.telnet: R 1617576849:1617576849(0) win
0 (DF)
21:39:12.578785 > lsb.syr.edu.35190 > 192.168.1.20.telnet: S
1617576848:1617576848(0) win 5840 <mss 1460,sackOK,timestamp 203895196
0,nop,wscale 0> (DF)
21:39:12.579081 < 192.168.1.20.telnet > lsb.syr.edu.35190: S
1341207580:1341207580(0) ack 1617576849 win 32120 <mss
1460,sackOK,timestamp 9219146 203895196,nop,wscale 0> (DF)21:39:12.579605
> lsb.syr.edu.35190 > 192.168.1.20.telnet: R 1617576849:1617576849(0) win
0 (DF)
21:39:17.578416 < arp who-has 192.168.1.1 tell 192.168.1.20
21:39:17.578435 > arp reply 192.168.1.1 (0:1:2:75:96:3e) is-at
0:1:2:75:96:3e (0:2:b3:20:ea:a7)


If you have read all the way down to here I would like to thank you again
for helping me out. This is probably the longest plea for help I have ever
composed.
Re: LVS-NAT/ configure problems [ In reply to ]
"Douglas F. Elznic" wrote:
> I used
> the latest configure from the website.

I assume it didn't complain when you ran the rc.lvs_nat output
on the director AND the real-servers?


>
> ***I think that this might be a symptom of my problem***
> the first entry of 128.230.102.100 does not make sense to me.
> [root@syru102-100 /root]# route -n
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 128.230.102.100 0.0.0.0 255.255.255.255 UH 0 0 0 eth0

this is the VIP, this is the expected entry

> 128.230.102.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
> 0.0.0.0 128.230.102.1 0.0.0.0 UG 0 0 0 eth0
>
> [root@syru102-100 /root]# netstat -an|more
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address Foreign Address State
> tcp 0 0 0.0.0.0:1024 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
> tcp 0 0 128.230.102.100:22 128.230.102.12:1023 ESTABLISHED

you have a connection from x.x.x.12 (the telnet instigator) to VIP:telnet.
The director should be forwarding this request to the real-server.

> [root@syru102-100 /root]# more lvs_nat.conf
> LVS_TYPE=VS_NAT
> INITIAL_STATE=on
> VIP=eth0 128.230.102.100 255.255.255.0 128.230.102.255


this should be
> VIP=eth0 128.230.102.100 255.255.255.255 128.230.102.100

I put a note in the perldocs so that people would get this
right, but my note isn't working. Everyone is changing the
template and getting it wrong. Do you have any suggestions
about this? A BIG NOTICE in the template conf files?

the entry you have doesn't match the one from route -n above.
Are the outputs from the same run?
The route -n output is correct.

I'll read the tcpdump stuff if it's still not working after
the next round

Joe



--
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center,
mailto:mack.joseph@epa.gov ph# 919-541-0007, RTP, NC, USA