Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jun 2022 10:56:41 -0400
From:      Chris Ross <cross+freebsd@distal.com>
To:        freebsd-net@freebsd.org
Cc:        Chris Ross <cross+freebsd@distal.com>
Subject:   Netstat -i 5-character interface name length?
Message-ID:  <F986B88D-4497-4290-9DE0-3387D734F5B9@distal.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hello folks.  I just noticed something that I’m sure has been true forever, but I checked and it’s still true on my 12.3-STABLE system.

In the daily run output, I’m seeing the network interface names truncated.  This comes from netstat -I apparently only rendering the first 5 characters of the interface name.  Many of my systems have `vlanNN` interfaces, but they show up as `vlanN` in netstat output.  Unfortautnely, I have all of vlan1, vlan3, vlan11, and vlan33 on one of my systems (plus others).  This makes it impossible to identify which of the lines of output are which interface:

vlan0  1500 <Link#7>      90:e2:ba: dd:ee:ff 7898136066     0     0 6455161338     0     0     0 
vlan0     - A.B.C.D/ pool-A.B.C.D 1172409474     -     - 780810867     -     -     - 
vlan1  1500 <Link#8>      90:e2:ba:dd:ee:ff 4317051938     0     0 4879301946     0     0     0 
vlan1     - fe80::%vlan1/ fe80::92e2:baff:f   702196     -     -  4498316     -     -     - 
vlan1     - 2001:470:e24c hostname           5966892     -     -  9302547     -     -     - 
vlan3  1500 <Link#9>      90:e2:ba:dd:ee:ff 230398636     0     0 317573885     0     0     0 
vlan3     - fe80::%vlan3/ fe80::92e2:baff:f   399612     -     -  4042723     -     -     - 
vlan3     - 2001:470:e24c 2001:470:e24c:66   523819     -     -  7747524     -     -     - 
[…]
vlan1  1500 <Link#13>     90:e2:ba:dd:ee:ff 220678168     0     0 525414925     0     0     0 
vlan1     - 192.168.11.0 hostname           2931863     -     -  6448727     -     -     - 
vlan1     - fe80::%vlan11 fe80::92e2:baff:f   518679     -     -  4145688     -     -     - 
vlan1     - 2001:470:e24c 2001:470:e24c:11   614377     -     -  7638691     -     -     - 
vlan3  1500 <Link#14>     90:e2:ba:dd:ee:ff   179779     0     0   173578     0     0     0 
vlan3     - 192.168.33.0/ hostname             12888     -     -    12311     -     -     - 
vlan3     - fe80::%vlan33 fe80::92e2:baff:f      939     -     -    26025     -     -     - 
vlan3     - 2001:470:e24c 2001:470:e24c:33:     2227     -     -     2915     -     -     - 

Can someone check if this is still so in 13 or CURRENT, and/or let me know if I’m doing something wrong?

             - Chris
[-- Attachment #2 --]
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello folks. &nbsp;I just noticed something that I’m sure has been true forever, but I checked and it’s still true on my 12.3-STABLE system.<div class=""><br class=""></div><div class="">In the daily run output, I’m seeing the network interface names truncated. &nbsp;This comes from netstat -I apparently only rendering the first 5 characters of the interface name. &nbsp;Many of my systems have `vlanNN` interfaces, but they show up as `vlanN` in netstat output. &nbsp;Unfortautnely, I have all of vlan1, vlan3, vlan11, and vlan33 on one of my systems (plus others). &nbsp;This makes it impossible to identify which of the lines of output are which interface:</div><div class=""><br class=""></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan0 &nbsp;1500 &lt;Link#7&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;90:e2:ba:</span>&nbsp;<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">dd:ee:ff</span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">&nbsp;7898136066 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 6455161338 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan0 &nbsp;&nbsp;&nbsp;&nbsp;- A.B.C.D/ pool-A.B.C.D 1172409474 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- 780810867 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan1 &nbsp;1500 &lt;Link#8&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;90:e2:ba:dd:ee:ff 4317051938 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 4879301946 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan1 &nbsp;&nbsp;&nbsp;&nbsp;- fe80::%vlan1/ fe80::92e2:baff:f &nbsp;&nbsp;702196 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;4498316 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan1 &nbsp;&nbsp;&nbsp;&nbsp;- 2001:470:e24c hostname &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 5966892 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;9302547 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan3 &nbsp;1500 &lt;Link#9&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;90:e2:ba:</span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">dd:ee:ff</span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">&nbsp;230398636 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 317573885 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan3 &nbsp;&nbsp;&nbsp;&nbsp;- fe80::%vlan3/ fe80::92e2:baff:f &nbsp;&nbsp;399612 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;4042723 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan3 &nbsp;&nbsp;&nbsp;&nbsp;- 2001:470:e24c 2001:470:e24c:66 &nbsp; 523819 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;7747524 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">[…]</span></font></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">vlan1 &nbsp;1500 &lt;Link#13&gt; &nbsp;&nbsp;&nbsp;&nbsp;90:e2:ba:</span></font><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">dd:ee:ff</span><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">&nbsp;220678168 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 525414925 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;</span></font><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan1 &nbsp;&nbsp;&nbsp;&nbsp;- 192.168.11.0&nbsp;</span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">hostname</span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2931863 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;6448727 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan1 &nbsp;&nbsp;&nbsp;&nbsp;- fe80::%vlan11 fe80::92e2:baff:f &nbsp;&nbsp;518679 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;4145688 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan1 &nbsp;&nbsp;&nbsp;&nbsp;- 2001:470:e24c 2001:470:e24c:11 &nbsp; 614377 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;7638691 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan3 &nbsp;1500 &lt;Link#14&gt; &nbsp;&nbsp;&nbsp;&nbsp;90:e2:ba:</span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">dd:ee:ff</span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">&nbsp;&nbsp; 179779 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;173578 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan3 &nbsp;&nbsp;&nbsp;&nbsp;- 192.168.33.0/&nbsp;</span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">hostname</span><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;12888 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;12311 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan3 &nbsp;&nbsp;&nbsp;&nbsp;- fe80::%vlan33 fe80::92e2:baff:f &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;939 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;26025 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">vlan3 &nbsp;&nbsp;&nbsp;&nbsp;- 2001:470:e24c 2001:470:e24c:33: &nbsp;&nbsp;&nbsp;&nbsp;2227 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;2915 &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class=""></span></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">Can someone check if this is still so in 13 or CURRENT, and/or let me know if I’m doing something wrong?</span></font></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- Chris</span></font></div></body></html>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F986B88D-4497-4290-9DE0-3387D734F5B9>