From: Greesha Mikhalkin <grigoriymikhalkin@gmail.com>
To: David Ahern <dsahern@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: VRF leaking doesn't work
Date: Mon, 15 Mar 2021 18:10:34 +0100 [thread overview]
Message-ID: <CADbyt6542624xAVzWXM6KEfk=zAOmB_SHbN=nzC_oib_+eXB1Q@mail.gmail.com> (raw)
In-Reply-To: <5f673241-9cb1-eb36-be9a-a82b0174bd9c@gmail.com>
> That's the way the source address selection works -- it takes the fib
> lookup result and finds the best source address match for it.
>
> Try adding 'src a.b.c.d' to the leaked route. e.g.,
> ip ro add 172.16.1.0/24 dev red vrf blue src 172.16.2.1
>
> where red and blue are VRFs, 172.16.2.1 is a valid source address in VRF
> blue and VRF red has the reverse route installed.
Tried to do that. Added reverse route to vrf red like that:
ip ro add vrf red 172.16.2.1/32 dev blue
172.16.2.1 is selected as source address when i ping. But now, when i
look at `tcpdump icmp` i only see requests:
172.16.2.1 > 172.16.1.3: ICMP echo request, id 9, seq 10, length 64
And no replies and anything else. If i look into tcpdump on machine
that's pinged -- it doesn't receive anything.
So it looks like it's not using nexthops from vrf red in that case.
Maybe it has something to do with how address is setup. In routing
table it looks like:
local 172.16.2.1 dev vlanblue proto kernel scope host src 172.16.2.1
next prev parent reply other threads:[~2021-03-15 17:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 10:57 VRF leaking doesn't work Greesha Mikhalkin
2021-03-05 15:37 ` David Ahern
2021-03-05 23:57 ` Greesha Mikhalkin
2021-03-06 16:12 ` David Ahern
[not found] ` <CADbyt66Ujtn5D+asPndkgBEDBWJiMScqicGVoNBVpNyR3iQ6PQ@mail.gmail.com>
2021-03-10 8:34 ` Greesha Mikhalkin
2021-03-12 16:39 ` David Ahern
2021-03-15 17:10 ` Greesha Mikhalkin [this message]
2021-03-15 18:41 ` David Ahern
2021-03-16 0:45 ` Greesha Mikhalkin
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='CADbyt6542624xAVzWXM6KEfk=zAOmB_SHbN=nzC_oib_+eXB1Q@mail.gmail.com' \
--to=grigoriymikhalkin@gmail.com \
--cc=dsahern@gmail.com \
--cc=netdev@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.