All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Balaev <mail@void.so>
To: lartc@vger.kernel.org
Subject: VRF and PBR question
Date: Thu, 03 Aug 2017 11:29:26 +0000	[thread overview]
Message-ID: <20170803112924.GB21737@rnd.localhost> (raw)

Hi all.

I've got network:

+------+        +----------------+
| isp1 |<------>|eth0            |
+------+        |                |       +--------------------+ 
                |           eth2 |<----->|  LAN:10.10.2.0/24  |
+------+        |                |       +--------------------+
| isp2 |<------>|eth1            |
+------+        +----------------+

Interfaces eth0,eth1 and eth2 are enslaved in VRF:

# ip link add vrf0 type vrf table 10
# ip link set dev vfr0 up
# ip link set dev eth0 master vrf0
# ip link set dev eth1 master vrf0
# ip link set dev eth2 master vrf0

I need to route some clients via ips1 and others via isp2.
So and I got two rules:

# ip rule add from 10.10.2.2 table isp1
# ip rule add from 10.10.2.3 table isp2

But I cannot add route to tables isp1 and isp2 because there are no
link-local routes in main table, they are inside vrf:

# ip r show vrf vrf0:
10.10.0.0/24 dev eth0 ....

So when I tries to add route I got error:

# ip r add 10.100.0.0/24 via 10.10.0.2 table isp1
RTNETLINK answers: Network in unreachable.

How can I use source routing inside VRF?

                 reply	other threads:[~2017-08-03 11:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20170803112924.GB21737@rnd.localhost \
    --to=mail@void.so \
    --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.