Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux Virtual Server: Users

[lvs-users] IPVS - Nat Issue

 

 

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded


dasher at inspiredthinking

Nov 20, 2009, 7:00 AM

Post #1 of 5 (928 views)
Permalink
[lvs-users] IPVS - Nat Issue

Hi,

I'm having an issue currently with a setup - and it's probably something
simple that I've missed and not being able to see the wood from the
trees - I'd appreciate any insight about what I've missed.

Issue:
The client connects to the VIP, IPVS picks up the connection on the
public interface(eth0) and shoves it out private interface(eth1) ok but
the packet doesn't reach the realserver (according to tcpdump running
on the realserver).

My best guess is that it's a NAT issue where ipvs isn't rewriting the
source address before it leaves eth1. I'm able to connect from the
director to the realserver and retrieve some content from the service
running on the realserver (lynx 10.177.41.57:80).

The full details of the setup are a little later in this mail - the only
service currently is http(80) but the output from tcpdump on the
director is:

tcpdump -ln port 80 -i any
tcpdump: verbose output suppressed, use -v or -vv for full protocol
decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 96
bytes
14:22:06.527112 IP 95.17.61.77.51254 > 174.143.146.6.80: Flags [S], seq
114523396, win 5840, options [mss 1452,sackOK,TS val 9033472 ecr
0,nop,wscale 7], length 0
14:22:06.527112 IP 95.17.61.77.51254 > 10.177.41.57.80: Flags [S], seq
114523396, win 5840, options [mss 1452,sackOK,TS val 9033472 ecr
0,nop,wscale 7], length 0


Note:
I've verified the above by having 2 sessions open and specifying the
exact interface with tcpdump -ln port 80 -i eth0 and tcpdump -ln port 80
-i eth1.


Setup Details:

The setup is very simple using LVS-NAT:

[client]
|
{internet}
|
[VIP:174.143.146.6](eth0)Director(eth1)[DIP:10.177.41.56]
|
{Private Lan: DRIP:10.177.41.0/24}
|
[RIP:10.177.41.56](eth1)Realserver


Config Details:

General:
All machines are base ubuntu 9.10 install - and come with the ipvs
modules. ipvsadm was installed using aptitude.
No extra patches or downloads have been applied to ipvs (which might be
the problem).

The servers are vm's running in a hosted environment.


Details & command outputs:

(director) IPVSAdm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 174.143.146.6:80 rr
-> 10.177.41.57:80 Masq 1 0 0

(all servers are the same)Ubuntu 9.10:uname -a
Linux ipvs 2.6.31-302-rs #7 SMP [date] x86_64 GNU/Linux


(director & realserver) IPTables is empty - as far as I understand no
rules are needed for ipvs-nat by default.

(director) iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

(director) iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


(director) sysctl -p
net.ipv4.ip_forward = 1

(realserver) sysctl -p
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.eth0.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.eth0.arp_announce = 2

(realserver) The default route is set to be the director DIP



_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


malcolm at loadbalancer

Nov 20, 2009, 1:06 PM

Post #2 of 5 (889 views)
Permalink
Re: [lvs-users] IPVS - Nat Issue [In reply to]

Why are you trying to solve the ARP issue in NAT mode?

Your real server seems to have the same ip as the DIP ?
Or is that just a typo?

Real server won't be able to reply if it has the same IP as the DIP.






2009/11/20 dasher <dasher [at] inspiredthinking>
>
> Hi,
>
> I'm having an issue currently with a setup - and it's probably something
> simple that I've missed and not being able to see the wood from the
> trees - I'd appreciate any insight about what I've missed.
> .net/mailman/listinfo/lvs-users



--
Regards,

Malcolm Turnbull.

Loadbalancer.org Ltd.
Phone: +44 (0)870 443 8779
http://www.loadbalancer.org/

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


dasher at inspiredthinking

Nov 20, 2009, 4:40 PM

Post #3 of 5 (883 views)
Permalink
Re: [lvs-users] IPVS - Nat Issue [In reply to]

Aye - the ip address on the realserver is .57 - just a typo on the
writeup.

>From what I understand there is no arp issue with dual nics and ipvs
nat.

The problem is that while the packet leaves the director on the right
interface - it never arrives at the realserver.

I've been exploring further - new vm's at the hosting env and a clean
env at the lab - repeating the setup step by step. Locally it works -
remotely at the hosting env it doesn't.

Regards,

David


Which leads me to believe it's an issue with the underlying VM
provider(xen) at the hosting environment.

On Fri, 2009-11-20 at 21:06 +0000, Malcolm Turnbull wrote:
> Why are you trying to solve the ARP issue in NAT mode?
>
> Your real server seems to have the same ip as the DIP ?
> Or is that just a typo?
>
> Real server won't be able to reply if it has the same IP as the DIP.
>
>
>
>
>
>
> 2009/11/20 dasher <dasher [at] inspiredthinking>
> >
> > Hi,
> >
> > I'm having an issue currently with a setup - and it's probably something
> > simple that I've missed and not being able to see the wood from the
> > trees - I'd appreciate any insight about what I've missed.
> > .net/mailman/listinfo/lvs-users
>
>
>
> --
> Regards,
>
> Malcolm Turnbull.
>
> Loadbalancer.org Ltd.
> Phone: +44 (0)870 443 8779
> http://www.loadbalancer.org/
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users



_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


horms at verge

Nov 27, 2009, 4:27 AM

Post #4 of 5 (839 views)
Permalink
Re: [lvs-users] IPVS - Nat Issue [In reply to]

On Sat, Nov 21, 2009 at 01:40:42AM +0100, dasher wrote:
> Aye - the ip address on the realserver is .57 - just a typo on the
> writeup.
>
> >From what I understand there is no arp issue with dual nics and ipvs
> nat.
>
> The problem is that while the packet leaves the director on the right
> interface - it never arrives at the realserver.
>
> I've been exploring further - new vm's at the hosting env and a clean
> env at the lab - repeating the setup step by step. Locally it works -
> remotely at the hosting env it doesn't.
>
> Regards,
>
> David
>
>
> Which leads me to believe it's an issue with the underlying VM
> provider(xen) at the hosting environment.

I suspect that there is some filtering going on somewhere
on packets with unexpected source IP addresses.



_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


dasher at inspiredthinking

Nov 27, 2009, 5:46 AM

Post #5 of 5 (850 views)
Permalink
Re: [lvs-users] IPVS - Nat Issue [In reply to]

Aye - I've raised a ticket with them but they're dragging their heels.
Thanks for looking over it - helped sanity check I wasn't missing
anything obvious.

David

On Fri, 2009-11-27 at 23:27 +1100, Simon Horman wrote:
> On Sat, Nov 21, 2009 at 01:40:42AM +0100, dasher wrote:
> > Aye - the ip address on the realserver is .57 - just a typo on the
> > writeup.
> >
> > >From what I understand there is no arp issue with dual nics and ipvs
> > nat.
> >
> > The problem is that while the packet leaves the director on the right
> > interface - it never arrives at the realserver.
> >
> > I've been exploring further - new vm's at the hosting env and a clean
> > env at the lab - repeating the setup step by step. Locally it works -
> > remotely at the hosting env it doesn't.
> >
> > Regards,
> >
> > David
> >
> >
> > Which leads me to believe it's an issue with the underlying VM
> > provider(xen) at the hosting environment.
>
> I suspect that there is some filtering going on somewhere
> on packets with unexpected source IP addresses.
>
>
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users



_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.