From owner-freebsd-net@FreeBSD.ORG Thu Oct 5 09:56:07 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 C476E16A40F for ; Thu, 5 Oct 2006 09:56:07 +0000 (UTC) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BD3D43D5E for ; Thu, 5 Oct 2006 09:56:07 +0000 (GMT) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from impact.jinmei.org (unknown [2001:200:1b1:1010:287f:d090:9e35:f176]) by shuttle.wide.toshiba.co.jp (Postfix) with ESMTP id 3376A15218; Thu, 5 Oct 2006 18:56:05 +0900 (JST) Date: Thu, 05 Oct 2006 18:56:03 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: Alexander Motin In-Reply-To: <45242BA7.5050105@alkar.net> References: <45242BA7.5050105@alkar.net> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.3 Mule/5.0 (SAKAKI) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: freebsd-net@freebsd.org Subject: Re: Point-to-Point interfaces and routing 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: Thu, 05 Oct 2006 09:56:07 -0000 >>>>> On Thu, 05 Oct 2006 00:46:15 +0300, >>>>> Alexander Motin said: > I have found to myself strange behaviour and difference between routing > to IPs on ngX, tunX interfaces. I will be very grateful if somebody > explain me why it is working in such way or give me a link to some good > manual about this. > I have 6.1-STABLE. Do preparations: > Create two interfaces, ng0 (by ngctl) and tun0 (by running interactive ppp). > Bring them down and then up with ifconfig. > Now they looks like: > ng0: flags=88d1 mtu 1500 > inet6 fe80::211:2fff:fea9:7627%ng0 prefixlen 64 scopeid 0x4 > tun0: flags=8051 mtu 1500 > inet6 fe80::211:2fff:fea9:7627%tun0 prefixlen 64 scopeid 0x3 > Opened by PID 11956 > Questions: > 1. If I look for the routing tables I see: > fe80::211:2fff:fea9:7627%ng0 fe80::211:2fff:fea9:7627%ng0 UHL ng0 > fe80::211:2fff:fea9:7627%tun0 link#3 UHL lo0 > So now I can ping ip on tun0, but can't on ng0. Why did they different > and what is right? Which "version" of 6.1-STABLE are you using? I guess this is due to a bug that was fixed recently. A fix was already MFC'ed to RELENG_6 on September 29 (at rev. 1.51.2.10). > 3. mpd ppp daemon on interface up event adds route for the local ip to > the lo0. Is it right way? And how in theory it must work for IPv6? At least we don't have to do that for IPv6. The kernel (IPv6 stack) is designed to install the loopback route for any local address, whether it's on a p2p interface or not. JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp