From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Balaev Date: Thu, 03 Aug 2017 11:29:26 +0000 Subject: VRF and PBR question Message-Id: <20170803112924.GB21737@rnd.localhost> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org 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?