All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Chung <adrian@enfusion-group.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Proxy Arp with same left/right IP address.
Date: Wed, 13 Feb 2002 16:00:35 +0000	[thread overview]
Message-ID: <marc-lartc-101361605517362@msgid-missing> (raw)
In-Reply-To: <marc-lartc-101361454812335@msgid-missing>

On Wed, Feb 13, 2002 at 04:52:09PM +0100, Ard van Breemen wrote:
> On Wed, Feb 13, 2002 at 10:35:15AM -0500, Adrian Chung wrote:
[...]
> > Except that I'm confused as to how the kernel deals with the fact that
> > both interfaces have the same IP address.
> The kernel sees one IP address, and two nics, with each having some part
> of a network directly attached to it.
> 
> > I guess logically it doesn't matter to the kernel, because the routes
> > clearly delineate which interface to send packets to, proxy-arp
> > connects the two LANs, and both interfaces have different MAC
> > addresses.
> Yep.
> > It just seems wrong. :)
> Nope.
> If you think about it: it is CLEAN!

You're definitely right about that.  It's a *very* cool solution, I'd
been looking for a way to do this.

[...]
> Another thing I am now busy to find out (I am not sure if this also
> works on 2.2, but I have no reason to believe it does not work):
> 
> ip link set up dev eth0
> ip addr add 127.0.0.1/32 dev eth0
> echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
> ip link set up dev eth1
> ip addr add 127.0.0.1/32 dev eth1
> echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp
> ip route add x.x.x.96/28 dev eth0
> ip route add x.x.x.97/32 dev eth1
> 
> The theory behind it: the IP protocol driver needs to be bound to the
> device. This is done by giving any (bogus) ip address to an interface.
> Only after the IP protocol driver is bound to the interface you can use
> it for IP.
> /proc/sys/net/ipv4/conf will only show interfaces bound to the IP
> protocol... :)
> 
> Of course: you cannot reach the firewall, and the firewall can't reach
> you. You need a non-bogus ip address for that... (Hmmmm: ssh 127.0.0.1
> .. Hah! I hacked the firewall.... shutdown -h now ... Uh? ;) )

Is this for real?  So you bind 127.0.0.1 to both eth0 and eth1, not
using an ISP assigned IP at all on the bridging box, and you'd still
be able to route from the ISP's network through to machines on the ISP
assigned network?

That's way too neat. :)

Have you tried this under 2.4?

--
Adrian Chung (adrian at enfusion-group dot com)
http://www.enfusion-group.com/~adrian
GPG Fingerprint: C620 C8EA 86BA 79CC 384C E7BE A10C 353B 919D 1A17
[toad.enfusion-group.com] up 2:11, 1 user, load average: 0.00

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

  parent reply	other threads:[~2002-02-13 16:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-13 15:35 [LARTC] Proxy Arp with same left/right IP address Adrian Chung
2002-02-13 15:52 ` Ard van Breemen
2002-02-13 16:00 ` Adrian Chung [this message]
2002-02-13 16:07 ` Ard van Breemen
2002-02-13 16:13 ` Adrian Chung

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=marc-lartc-101361605517362@msgid-missing \
    --to=adrian@enfusion-group.com \
    --cc=lartc@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.