Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Martijn Lievaart <m@rtij.nl>
To: Julian Hagenauer <chaosbringer@gmx.de>
Cc: Rob Sterenborg <rob@sterenborg.info>, netfilter@lists.netfilter.org
Subject: Re: Two identical ips connected
Date: Mon, 16 Oct 2006 19:08:41 +0200	[thread overview]
Message-ID: <4533BC99.6010800@rtij.nl> (raw)
In-Reply-To: <20061016120211.6ab1d49b@vmm1.chaosbringer.de>

Julian Hagenauer wrote:

>Hi
>
>  
>
>>If you packet would make it to the router and the router had this configuration:
>>- eth0: 192.168.1.0/24
>>- eth1: 192.168.1.0/24
>>the router cannot distinguish the subnets.
>>
>>    
>>
>
>Why so complicated.
>eth0: 192.168.1.4
>eth1: 192.168.1.4
>
>(Hostbased routing) would be enough. Sure the router can not distinguish between the IPs, but he could distinguish between the MACs, so would it be possible to do Masquerading based on MAC-Adresses?
>
>  
>
>>But you'd not even get that far.
>>When you send a packet from a client to the server and this server has same IP
>>as the client (thus src and dst IP are the same), then the packet wouldn't
>>even make it to the router: it would be sent to itself.
>>    
>>
>
>Mhm, i don't understand that. Let me explain my setup in greater detail:
>
>	Server1---------|
>			|
>			|
>			|
>	Server2-------Router-------Client
>			|
>			|
>			DB
>
>I want that Server 1 and Server2 have the same IP, although only Server1 should be accessible for clients.
>The reason for that is, that i want do some kind of load-balancing.
>The problem is, that both Servers need permanent access to the db, so the router should somehow translate/masquerade the ip of the server2, so that both servers can access the db at the same time.
>
>  
>

Give both servers their own IP. Give one of the servers also the IP the 
clients use to access the server. When that server fails, assign that IP 
to the second server (also as secondary!) instead.

M4



  parent reply	other threads:[~2006-10-16 17:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-16  7:55 Two identical ips connected Julian Hagenauer
2006-10-16  9:41 ` Rob Sterenborg
2006-10-16 10:02   ` Julian Hagenauer
2006-10-16 11:04     ` Gáspár Lajos
2006-10-16 14:48     ` Nathan @ Netdigix Systems
2006-10-16 17:08     ` Martijn Lievaart [this message]
2006-10-26 15:47     ` R. DuFresne
2006-10-17  0:34 ` David Lang
     [not found] <200610160944.k9G9iEZi013530@mail3.jubileegroup.co.uk>
2006-10-19  9:35 ` G.W. Haywood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4533BC99.6010800@rtij.nl \
    --to=m@rtij.nl \
    --cc=chaosbringer@gmx.de \
    --cc=netfilter@lists.netfilter.org \
    --cc=rob@sterenborg.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox