From owner-freebsd-net@FreeBSD.ORG Thu Jan 20 15:40:07 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAD7A106566B; Thu, 20 Jan 2011 15:40:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 5BC898FC1E; Thu, 20 Jan 2011 15:40:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 3479B41C7A5; Thu, 20 Jan 2011 16:40:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id NGWOMpD3YTWJ; Thu, 20 Jan 2011 16:40:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 5B79541C7A8; Thu, 20 Jan 2011 16:40:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id B8B164448F3; Thu, 20 Jan 2011 15:38:13 +0000 (UTC) Date: Thu, 20 Jan 2011 15:38:13 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Hajimu UMEMOTO In-Reply-To: Message-ID: <20110120153637.W3489@maildrop.int.zabbadoz.net> References: <20110119024431.GC39356@cicely7.cicely.de> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org, Bernd Walter , ticso@cicely.de Subject: Re: strange netstat -ian output 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, 20 Jan 2011 15:40:08 -0000 On Fri, 21 Jan 2011, Hajimu UMEMOTO wrote: > Hi, > >>>>>> On Wed, 19 Jan 2011 03:44:31 +0100 >>>>>> Bernd Walter said: > > ticso> This is one of the blocks for this interface: > ticso> re0 1500 2a02:21e0:16e 2a02:21e0:16e0:20 0 - - 1 - - > ticso> ff02:1::2 (refs: 1) > ticso> ff02:1::d (refs: 1) > ticso> ff02:1::202 (refs: 1) > ticso> ff02:1::1:ff00:103 (refs: 1) > ticso> ff01:1::1 (refs: 1) > ticso> ff02:1::2:6214:d648(refs: 1) > ticso> ff02:1::1 (refs: 1) > ticso> ff02:1::1:ff00:7992(refs: 1) > > ticso> 2a02:21e0:16e seems to be the truncated IP. > ticso> The first line has 2a02:21e0:16e0:20 - I assume this should say 2a02:21e0:16e0:2000::103, > ticso> but it is truncated as well... > > Yes, an IPv6 address is too long for the traditional netstat output > format. :) > > ticso> Adding -W won't help on truncation. > > It seems -W is not handled, here. > > ticso> - ff02:1::2 > ticso> is not just truncated - this obviously should be ff02::2. > ticso> This '1' is part of every multicst address listed, although they > ticso> don't belong there. > ticso> By looking at systems with a large number of interfaces I came to the > ticso> conclusion that this is the scope ID, but why is it listed as part > ticso> of the IP? > > Yes, it is the internal scope address representation of the KAME IPv6 > stack. It is hided in the output of 'netstat -rn'. But, it seems not > for `netstat -ani'. There is no reason to not hide it for `netstat > -ani', IMHO. So, I've just committed to hide it: > > http://svn.freebsd.org/viewvc/base?view=revision&revision=217642 Thanks; there's also a PR somewhere about it from today or yesterday. The real problem of course is that those things are still queried by kvm(3) rather than by a real interface in which case I think the kernel shouldn't export the addresses with the scope embedded. We should make sure that with libnetstat or whatever, this will not come back. /bz -- Bjoern A. Zeeb You have to have visions! Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html