From owner-freebsd-net@FreeBSD.ORG Tue Jan 14 20:15:57 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A90CBEE4 for ; Tue, 14 Jan 2014 20:15:57 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 82D9210B0 for ; Tue, 14 Jan 2014 20:15:57 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6ED90B941; Tue, 14 Jan 2014 15:15:56 -0500 (EST) From: John Baldwin To: freebsd-net@freebsd.org Subject: Re: Showing CDP info in ifconfig? Date: Tue, 14 Jan 2014 11:04:40 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <52D50065.8060907@fsn.hu> In-Reply-To: <52D50065.8060907@fsn.hu> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201401141104.40813.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 14 Jan 2014 15:15:56 -0500 (EST) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 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, 14 Jan 2014 20:15:57 -0000 On Tuesday, January 14, 2014 4:16:21 am Attila Nagy wrote: > Hi, > > Anybody thought about how useful would be showing CDP info in ifconfig > output? > > Something like this: > # ifconfig igb2 > igb2: flags=8843 metric 0 mtu 1500 > options=401bb > ether ac:16:2d:9a:18:ce > inet6 fe80::ae16:2dff:fe9a:18ce%igb2 prefixlen 64 tentative > scopeid 0x3 > inet 10.0.2.2 netmask 0xffffff00 broadcast 10.0.2.255 > nd6 options=29 > media: Ethernet autoselect (1000baseT ) > status: active > neighbor id: DP1106-A05-11-N5K(SSI3235613KZ) > neighbor ip: 172.28.2.24 > neighborport-id: Ethernet109/1/47 > > And maybe some other info (like VLAN tags, MTU etc). lladvd (for LLDP) implements this by using the information it gleans to set the optional description field on an interface. The result looks like: igb0: flags=8843 metric 0 mtu 1500 description: connected to someswitch (eth1/1/3) ... cxl0: flags=8843 metric 0 mtu 1500 description: connected to someotherswitch (Eth3) ... -- John Baldwin