[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: More complicated ipv6 routing with radvd



Hello,

Ron Murray a écrit :

I presume box (1) is the right place to run radvd advertising itself as
a default route. That part works. radvd will, I suppose, also need to
run on box (2) to work with machines on the wireless subnet. That part
works too, but how do I set up radvd on that box to advertise the route
to the wireless subnet on the Ethernet subnet? I can only get it to
advertise itself as a default route, which is clearly wrong.

As Bernhard pointed out, you have to add a route to the wireless prefix on router (1) either statically or using a routing protocol, because a router ignores RAs.

About router (2) advertising the route to the wireless prefix for the ethernet hosts, you could use the 'route information' option described in RFC 4191. You would have to set the router lifetime to 0 so it won't be used as a default route by hosts on the ethernet link. So radvd.conf on router (2) would basically look like this :

============ /etc/radvd.conf ===================
interface <wireless>
{
	AdvSendAdvert on;

	prefix <wireless_prefix>
	{
	};
};

interface <ethernet>
{
	AdvSendAdvert on;
	AdvDefaultLifetime 0;

	route <wireless_prefix>
	{
	};
};
================================================

In practice, things are not that simple. The 'route information' option is not part of the original Router Discovery specification, so older IPv6 implementations may not support it. Linux supports it since version 2.6.17 if configuration option IPV6_ROUTE_INFO is enabled, but it is functionnally disabled by default because the sysctl parameters net.ipv6.conf.*.accept_ra_rt_info_max_plen which defines the maximum prefix length of accepted route information is set to 0 by default. In order to accept a route for a /64 prefix, you must set it to at least 64. In Debian it can be set at startup for all interfaces by appending the following line in /etc/sysctl.conf, assuming that the 'ipv6' module has been loaded before (.e.g. by adding it in /etc/modules), otherwise the parameter won't exist yet :

net.ipv6.conf.default.accept_ra_rt_info_max_plen=64

If an ethernet host ignores the route information in RAs, it will send packets for the wireless prefix to the default router, (1). Router (1) will forward the packets to router (2). It should also send an ICMPv6 Redirect to tell the host that there is a better route to the prefix. However I tested this scenario on my Debian router with 2.6.24 kernel and didn't see it sending ICMPv6 Redirects, although it forwarded the packets back on the same interface as expected.


Reply to: