[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Problem configuring IPV6 - Kindly help
Date: Mon, 11 Mar 2013 22:36:34 +0530
From: Michael David <servers.david%gmail.com@localhost>
| Here is what I have done so far:
| In /etc/rc.conf: I have: *ip6mode=host*
| In /etc/ifconfig.re0: I have:*inet6 2a02:e00:ffff:23:a00b:9aff:feed:88ea
| prefixlen 64 alias*
That's OK too. (The prefixlen is fine, even though it is the default,
and "alias" is actually intended to be used for all IPv6 addresses,
unlike in IPv4 config, so that is OK too - though it isn't required here).
The address is fine too, and doesn't have a "multicast bit" (of which there
really is no such thing by what was meant be that) set, (it would be a10b if
it had the fictional G bit set, not that it would matter if it did).
| I do not know how to set the IPV6 gateway.
defaultroute6 in rc.conf was mentioned already, another way is to but the
address of the router in /etc/mygate6 - the two are essentially equivalent,
which you use is a matter of personal taste.
| So, in /etc/rc.local I added: *route -n add -inet6 default
You could do it that way, but if you want to manually add a route command
then a better place to put it is in /etc/ifconfig.re0, there you would have
! route add -inet6 default ...
The advantage of doing it that way is that the route only gets added if
the interface exists, you can have similar configs in other /etc/ifconfig.*
files with the default router that should be used on each interface, and
only the one that is actually installed on the system will be used.
Of course, this makes little difference on a system that only ever has one
interface whose name never changes.
| where *2a02:e00:ffff:23::1 *is my IPv6 gateway.
But it really shouldn't be - IPv6 is really designed to work using
link local addresses for local routers - stuff like redirects won't work
properly if you configure a global address (the redirect is only processed
if it originates from the correct router address - the address we use to send
to the destination, and redirect messages are always sent from a router's
link local address).
So you should really be using fe80::1%re0 (or whatever the router's LL address
is) as the default gateway (the %re0 is needed as link local addresses need
to indicate which link they apply to.)
| The system does not take my gateway and instead has some other IPv6 value
| called 2a00:1450:400c:c00::63 that I never assigned.
That is the cause of your problem, you need to work out where that is
coming from. Since you have ip6mode=host it should not be from a RA from
some (perhaps rogue) router, it has to be in some local config file, or
perhaps from some routing daemon that you're running.
rc.local gets run very late in the boot process, so almost everything else
is going to start first, so if you're running route6d or xorp or anything
like that, it could be installing a default route before rc.local gets
the chance. NetBSD doesn't allow a "route add" to replace an existing
route, so whatever gets there first wins (do moving the route command to
/etc/ifconfig.re0 or using defaultroute6 or /etc/mygate might "fix" your
problem just by getting your desired defaut route in first - of course,
if there's a routing daemon doing stuff, it can just as easily delete
anything it doesn't like before it installs what it thinks is correct,
so this might not help).
Main Index |
Thread Index |