Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jan 2014 11:04:40 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-net@freebsd.org
Subject:   Re: Showing CDP info in ifconfig?
Message-ID:  <201401141104.40813.jhb@freebsd.org>
In-Reply-To: <52D50065.8060907@fsn.hu>
References:  <52D50065.8060907@fsn.hu>

next in thread | previous in thread | raw e-mail | index | archive | help
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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
> 
options=401bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
>          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<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>          media: Ethernet autoselect (1000baseT <full-duplex>)
>          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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: connected to someswitch (eth1/1/3)
...
cxl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: connected to someotherswitch (Eth3)
...

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401141104.40813.jhb>