ifconfig(8) interface description field
Bjoern A. Zeeb
bzeeb-lists at lists.zabbadoz.net
Tue Nov 18 04:10:07 PST 2008
On Tue, 18 Nov 2008, cpghost wrote:
> On Tue, Nov 18, 2008 at 10:34:24AM +0100, sthaug at nethelp.no wrote:
>>>> Oh yeah, since we're in wishful thinking mode, I want interface
>>>> descriptions too...
>>> Have you looked at the 'name' and 'group' keywords in ifconfig(8)?
>>> If this isn't what you want, please expand on your wish.
>> It is not what I want.
>> On routers, switches and lots of other boxes from most vendors you can
>> associate a description string with each interface - where interface
>> can be a physical port, or for instance a VLAN based interface. This
>> description string is useful to document things like
>> - what is the box at the other end of the cable connected to this port
>> - what is the port at the other end of the cable connected to this port
>> - what is the circuit id for the circuit this port is connected to
>> - what is this port used for
>> etc. Typical example, from one of our switches (Cisco syntax):
>> interface GigabitEthernet0/12
>> description TO: fs1.td ID: BTN-11510092 TXT: gi1/0/7 EoSDH 50 Mbps
>> switchport trunk allowed vlan 123,770,1024,1500,1504,1528,1536
>> showing the first three points I mentioned above.
>> Such a description string is can normally be retrieved using SNMP.
> Yes, that's a very useful addition. I'm administering a lot of Cisco
> boxes, and this desc field has been extremely useful over the years.
> Maybe an ifi_desc field could be added to:
> /usr/src/sys/net/if.h:struct if_data
> and some glue so that ifconfig(8) can read and write to it?
> How long should this field be at most?
This is nothing the really belongs in the kernel.
Add an "interface" to set/get the information per interface (index,
name, ...) and store the actual data in a file maybe.
Make the format extensible to store other meta data that
people may want to think along with it in the future.
After all you want the information to be peristent over a reboot so
you have to write it out somehow anyway.
Just my 0.02CAD
Bjoern A. Zeeb Stop bit received. Insert coin for new game.
More information about the freebsd-stable