Subject: Question on IPv6 Route table.

From: Naarumanchi Kaushik <[email-masked]>
Date: Mon, 26 Sep 2011 15:48:55 +0530

Hi All,

In linux, route command has an entry for "default"(which is 0.0.0.0). There
will ONLY ONE such entry and it chooses only one physical interface.

default         192.168.2.254   0.0.0.0         UG    0      0        0 eth0

I have configured my linux system with an IPv6 address in my office. When
"route -A inet6" command is executed, we could see two entries for ::/0 for
two interfaces.

::/0                           fe80::224:1ff:fe45:84a2    UGDAe 1024 0     0
eth0
::/0                           fe80::224:1ff:fe45:84a2    UGDAe 1024 0     0
ra0
So dont we have ONLY one default in case of IPV6 as we have in IPv4???? For
this case, which interface we need to select?

-
Kaushik.

---

From: Jeroen Massar <[email-masked]>
Date: Mon, 26 Sep 2011 12:26:40 +0200

On 2011-09-26 12:18 , Naarumanchi Kaushik wrote:
> Hi All,
>  
> In linux, route command has an entry for "default"(which is 0.0.0.0).

Please note that ipv6@ietf is not the "Linux configuration help"
mailinglist. (then again, not any other similar location afaik ;)

> There will ONLY ONE such entry and it chooses only one physical interface.
>  
> I have configured my linux system with an IPv6 address in my office.
> When "route -A inet6" command is executed, we could see two entries for
> ::/0 for two interfaces.
>  
> ::/0                           fe80::224:1ff:fe45:84a2    UGDAe 1024
> 0     0 eth0
> ::/0                           fe80::224:1ff:fe45:84a2    UGDAe 1024
> 0     0 ra0
> So dont we have ONLY one default in case of IPV6 as we have in IPv4????
> For this case, which interface we need to select?

It seems that you have two interfaces both connected to the same network
and thus both receiving the same route.

If you ran DHCPv4 on both interfaces you would likely get the same in IPv4.

Quick solution for you, to get 'rid' of the quite valid route over ra0:

sysctl -w net.ipv6.conf.ra0.accept_ra=0

And put that line also in /etc/sysctl.conf or another similar location
to preserve it for reboots.

Greets,
 Jeroen

---

From: Naarumanchi Kaushik <[email-masked]>
Date: Mon, 26 Sep 2011 16:12:31 +0530

Before I try what you have suggested, i have a question.
the way we have a default interface to be used(when there are multiple
interfaces) in the route table for ipv4, why there was no unique default
entry for ipv6 too?

Assuming my route table looks like this:
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.2.0     *               255.255.255.0   U     1      0        0 eth0
192.168.42.0    *               255.255.255.0   U     2      0        0 ra0
link-local      *               255.255.0.0     U     1000   0        0 ra0
default         192.168.2.254   0.0.0.0         UG    0      0        0 eth0
Any packet destined to a global address will go through eth0 only. But in
ipv6 when we have two entries(with same Next Hop, Same metrics) and if i had
to select one of them, how do we ensure that everytime, we use the same
interface?
pls correct me if i am wrong.

N.V.S.Kaushik.