as the author of the route code in olsr I can explain what I was trying to do:

for routing purposes what we need are point-to-point routes, the subnets on the mesh interfaces are there only to facilitate broadcasting the routing packets. because of the way freebsd is wired, to support multiple interfaces i resorted to a raw packet library.

i never much liked this, but it works

the reason for the broadcast is to provide an undirected address to send packets to that everyone would receive. with no subnet we'd have to send OLSR packets to each and every other host we're directly connected to.

if i had to do it over again, i'd probably use multicast. i actually used another protocol (TBRPF) and IPv4 multicast successfully in a prior project. multicast would eliminate the need for subnetting and would cope with the problem you have with multiple host interfaces that have the same address but aren't connected to each other.

dave c

At 09:23 PM 9/3/2006, John Hay wrote:
On Mon, Sep 04, 2006 at 11:04:44AM +0900, [EMAIL PROTECTED] 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 -- [EMAIL PROTECTED] / [EMAIL PROTECTED]
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to