ipv6 host routes
John Hay
jhay at meraka.org.za
Mon Sep 4 00:23:18 PDT 2006
On Mon, Sep 04, 2006 at 11:04:44AM +0900, gnn at freebsd.org wrote:
> At Sun, 3 Sep 2006 15:22:14 +0200,
> John Hay wrote:
> >
> > Hi,
> >
> > Does anybody know how to add a direct IPv6 host route that actually works?
> > What I mean is not through a gateway, but for one directly reachable.
> >
> > I know it normally isn't needed because it will just work, but I'm
> > trying to add FreeBSD IPv6 capability to net/olsrd. It looks like I have
> > most of the rest working, but this is one of the last things tripping
> > me up.
...
> >
> > So anybody that know how to add a direct IPv6 host route on FreeBSD?
> >
>
> Can you show us the commands, network layout and the output of netstat
> -r and ndp -a?
Well maybe I should start with how it works on IPv4. You can see the code
in work/olsrd-0.4.10/src/bsd/kernel_routes.c if you extract the net/olsrd
port. In the case where the machine is directly connected, ie. not through
a gateway, a network route with a /32 netmask is added with the cloning
flag. So if you use the 10.1.9.0/24 network and have two hosts that can
"see" each other, 10.1.9.1 and 10.1.9.2, on 10.1.9.1 you will see a route
like this added:
10.1.9.2/32 link#2 UC 0 0 ath1
and as soon as there is traffic the arp will cause this:
10.1.9.2 00:02:6f:34:21:a2 UHLW 2 2286102 ath1 1176 =>
So I guess I want to imitate something like this in a way that the linux
boxes that also run olsr can interoperate.
My current test setup have 3 boxes on the 2001:4200:7000:15:: subnet, so
ifconfig on rtrg looks like this:
################
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::202:6fff:fe22:9547%ath0 prefixlen 64 scopeid 0x3
inet6 2001:4200:7000:15:202:6fff:fe22:9547 prefixlen 64
inet6 2001:4200:7000:15:: prefixlen 64 anycast
ether 00:02:6f:22:95:47
media: IEEE 802.11 Wireless Ethernet autoselect <adhoc> (autoselect <adhoc>)
status: associated
ssid koppiemesh channel 149 bssid 02:02:6f:41:19:27
authmode OPEN privacy OFF txpowmax 24 bmiss 7 burst bintval 100
################
To lessen my typing I have these entries in /etc/hosts:
2001:4200:7000:15:202:6fff:fe22:9547 rtrg
2001:4200:7000:15:202:6fff:fe41:1927 rtr2
The machine I am working on is the first one, rtrg. If I don't do
anything, I can ping6 rtr2, but I would like to add a route and still
have it work. I have tried many things on rtrg but none seem to give
me something that works. Some of the ones I have tried:
route add -inet6 -host rtr2 -interface ath0
route add -inet6 -host rtr2 -interface ath0 -cloning -nostatic --llinfo
route add -inet6 -net rtr2 -prefixlen 128 -interface ath0 -cloning -nostatic --llinfo
route add -inet6 -host rtr2 fe80::202:6fff:fe22:9547%ath0 -ifp ath0
route add -inet6 -host rtr2 -interface fe80::202:6fff:fe22:9547%ath0 -ifp ath0
route add -inet6 -host rtr2 rtrg -cloning -nostatic
Thanks.
John
--
John Hay -- John.Hay at meraka.csir.co.za / jhay at FreeBSD.org
More information about the freebsd-net
mailing list