From owner-freebsd-net@FreeBSD.ORG Tue Sep 5 01:40:59 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5251816A4DE; Tue, 5 Sep 2006 01:40:59 +0000 (UTC) (envelope-from dave@dogwood.com) Received: from ms-smtp-01.socal.rr.com (ms-smtp-01.socal.rr.com [66.75.162.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB50043D45; Tue, 5 Sep 2006 01:40:58 +0000 (GMT) (envelope-from dave@dogwood.com) Received: from white.dogwood.com (white.dogwood.com [66.91.140.178]) by ms-smtp-01.socal.rr.com (8.13.6/8.13.6) with ESMTP id k851era6029246; Mon, 4 Sep 2006 18:40:54 -0700 (PDT) Received: from Gecko.dogwood.com (dhcp-31.dogwood.com [192.168.231.31]) by white.dogwood.com (8.13.4/8.13.4) with ESMTP id k851eoBD071692; Mon, 4 Sep 2006 15:40:52 -1000 (HST) (envelope-from dave@dogwood.com) Message-Id: <7.0.1.0.2.20060904152932.024c4b78@dogwood.com> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Mon, 04 Sep 2006 15:41:58 -1000 To: John Hay , gnn@freebsd.org From: David Cornejo In-Reply-To: <20060904072313.GA83757@zibbi.meraka.csir.co.za> References: <20060903132214.GA40993@zibbi.meraka.csir.co.za> <20060904072313.GA83757@zibbi.meraka.csir.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (white.dogwood.com [192.168.231.150]); Mon, 04 Sep 2006 15:40:53 -1000 (HST) X-Virus-Scanned: Symantec AntiVirus Scan Engine Cc: freebsd-net@freebsd.org Subject: Re: ipv6 host routes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2006 01:40:59 -0000 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, gnn@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 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 > (autoselect ) > 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@meraka.csir.co.za / jhay@FreeBSD.org >_______________________________________________ >freebsd-net@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-net >To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"