From: David Ahern <dsa@cumulusnetworks•com>
To: Luca Dionisi <luca.dionisi@gmail•com>, netdev@vger•kernel.org
Subject: Re: Disable "received packet with own address as source" check
Date: Sun, 3 Jan 2016 09:27:57 -0700 [thread overview]
Message-ID: <56894C0D.9060401@cumulusnetworks.com> (raw)
In-Reply-To: <CADGFtMWL+G+Tq_qrtQ3iQ6QeJBk_vetZin5Wqh8RPpykADOJ=Q@mail.gmail.com>
On 1/2/16 9:25 AM, Luca Dionisi wrote:
> My linux box has a duty. It has to forward IP packets for a "private"
> network which it doesn't belong to.
>
> The network is "private" has the meaning that the hosts that belong to
> the network have IP addresses that are unique only between them.
>
> Say that the network is formed by 4 nodes: "a", "b", "c", "d", with
> their IP addresses: 10.0.1.1, ..., 10.0.1.4.
>
> The nodes "a", "b" and "c" are connected, but the only way from "c" to
> "d" is through my box, let's call it "x".
>
> The problem is that "x" has to live inside another "private" network,
> and in this other network the address of "x" is 10.0.1.4.
>
> When I send a PING-request from "c" to "d" the packet goes to a
> specific NIC of "x". Thanks to some carefully designed
> iptables+ip-rule tricks in "x", the PING-request is effectively
> relayed from "x" to the node "d", although "x" has the same IP as the
> destination of the packet.
>
> Now the node "d" sends a PING-reply to "c". This packet goes to a
> specific NIC of "x". There, the same tricks would send the packet to
> "c". But this is not happening.
>
> I suspect that the problem is that the box "x" refuses to relay a
> packet that has an IP source equal to one of its local IP addresses,
> although this IP is assigned to another NIC.
>
> I have this suspect because of the tcpdump traces that I have
> collected. But I don't seem to succeed in finding other evidences (I
> looked into dmesg and /var/log/syslog).
>
> Is there a tunable in linux to change this behaviour? I want to say to
> "x": When a packet comes in through NIC0, relay it without bothering
> if it has your IP as source address.
The VRF device added in 4.3 solves this problem.
https://www.kernel.org/doc/Documentation/networking/vrf.txt
prev parent reply other threads:[~2016-01-03 16:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-02 16:25 Disable "received packet with own address as source" check Luca Dionisi
2016-01-03 16:27 ` David Ahern [this message]
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=56894C0D.9060401@cumulusnetworks.com \
--to=dsa@cumulusnetworks$(echo .)com \
--cc=luca.dionisi@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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