netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Tushar Shinde <mtk.tushar@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: IPv6 Policy based routing not working.
Date: Wed, 27 Aug 2014 00:01:22 +0200	[thread overview]
Message-ID: <1409090482.1152.8.camel@localhost> (raw)
In-Reply-To: <CABQpAL7X9_=RTS2cd_m3jkCzWOM8hjcu22yQdnRD6S4fs5AF2Q@mail.gmail.com>

Hi,

On Di, 2014-08-26 at 21:32 +0530, Tushar Shinde wrote:
> Hello NetDev,
> 
> I am facing problem where if ipv6 route (outside to current subnet) is
> reachable only if route is present in main table. Policy based routes
> are not working.
> 
> Following is my setup,
> 
> eth0   inet6 2001:1::10/120 scope global
> eth1   inet6 2001:1::11/120 scope global
> 2001:1::1 is gateway
> 2.6.32-431.11.2.el6.x86_64 kernel (I tried on 3.x also)
> 
> [root@ipv6node1 ~]# ip -6 route show tab 1
> 2001:1::/120 dev eth0  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
> default via 2001:1::1 dev eth0  metric 1024  mtu 1500 advmss 1440
> hoplimit 4294967295
> [root@ipv6node1 ~]#
> [root@ipv6node1 ~]# ip -6 route show tab 2
> 2001:1::/120 dev eth1  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
> default via 2001:1::1 dev eth1  metric 1024  mtu 1500 advmss 1440
> hoplimit 4294967295
> [root@ipv6node1 ~]#
> [root@ipv6node1 ~]# ip -6 rule show
> 0:    from all lookup local
> 16383:    from 2001:1::10 lookup 1
> 16383:    from 2001:1::11 lookup 2
> 32766:    from all lookup main
> [root@ipv6node1 ~]#
> 
> If I add default vai eth0 only ip of eth0 is reachable from outside or
> eth1 dont work. In above setup default route is not present.
> 
> But default entry in "table" is never getting used to resolve route
> 
> [root@ipv6node1 ~]# ping6 -I eth0 2001:2::20
> connect: Network is unreachable
> [root@ipv6node1 ~]#
> [root@ipv6node1 ~]# ping6 -I eth1 2001:2::20
> connect: Network is unreachable
> [root@ipv6node1 ~]#

ping6 selects the ipv6 address based on netlink route lookup given the
specified interface but without setting the source address. That said,
it is probable that the rule lookup happens with a completely different
ipv6 address. Please verify this. ping6 -I also accepts a source ipv6
address, can you try this?

Otherwise please specify with which 3.x kernel you tested this.

Thanks,
Hannes

  reply	other threads:[~2014-08-26 22:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 16:02 IPv6 Policy based routing not working Tushar Shinde
2014-08-26 22:01 ` Hannes Frederic Sowa [this message]
2014-08-27  4:54   ` Tushar Shinde
2014-08-27  5:55     ` Hannes Frederic Sowa
2014-08-27  6:02       ` Tushar Shinde
2014-08-27  6:05         ` Hannes Frederic Sowa
2014-08-27 13:41           ` Tushar Shinde
2014-08-27 14:19             ` Hannes Frederic Sowa

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=1409090482.1152.8.camel@localhost \
    --to=hannes@stressinduktion.org \
    --cc=mtk.tushar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).