Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: Awkward scenario: 3 interfaces and 3 devices with same ip/subnet.
Date: Tue, 31 Aug 2010 09:30:13 -0500	[thread overview]
Message-ID: <4C7D11F5.1010105@riverviewtech.net> (raw)
In-Reply-To: <AANLkTik15tix2nxCQfeD=W+t10NuiYLBeSCuYZ8R_2s+@mail.gmail.com>

On 08/31/10 06:34, Giacomo Bernardi wrote:
> want to solve a very awkward scenario?
> 
> There's a linux box with three interfaces (eth0, eth1, eth2) each 
> directly connected to an embedded device that has configuration:
> - IP: 10.0.0.1
> - Mask: 255.255.255.0
> (in other words: all three devices answer to 10.0.0.1/24 and their 
> configuration can't be changed)
> 
> I need to send and receive snmp packets to an arbitrary given device 
> among these three ...how?

I don't know if it would work for you or not, but you could try an old / 
odd / if not dirty trick.

Try adding static ARP entries to each device's MAC address using 
different (bogus) IPs.  Then try communicating with the bogus IPs.  You 
might get lucky and be able to communicate.  It really depends on what 
is included in the higher layer protocol.  (I've not dealt with enough 
SNMP to know if this is possible.)

The main thing that the differing IPs are use for is to translate the 
layer 3 IP address to the layer 2 MAC address.  So, if you can side step 
that problem, you may be golden.

Yes, this is a dirty trick / hack, but sometimes that's what you have 
got to do.



Grant. . . .

  parent reply	other threads:[~2010-08-31 14:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-31 11:34 Awkward scenario: 3 interfaces and 3 devices with same ip/subnet Giacomo Bernardi
2010-08-31 13:41 ` Jan Engelhardt
2010-08-31 14:30 ` Grant Taylor [this message]
2010-08-31 14:49   ` Giacomo Bernardi
2010-08-31 15:25     ` Grant Taylor
2010-08-31 15:33       ` Giacomo Bernardi
2010-09-01  7:14         ` Marek Kierdelewicz
2010-09-02 11:28           ` Giacomo Bernardi
2010-09-02 15:56             ` Marek Kierdelewicz
2010-09-02 16:05               ` Giacomo Bernardi
2010-09-02 16:34                 ` Marek Kierdelewicz
     [not found]                   ` <AANLkTi=uKngWrWpxMQJjLP6qTkfsPay9E3+-CKk2+7NO@mail.gmail.com>
2010-09-02 16:54                     ` Giacomo Bernardi
2010-09-02 17:19                       ` Marek Kierdelewicz

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=4C7D11F5.1010105@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --cc=netfilter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox