Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jul 2022 11:11:07 +0200 (CEST)
From:      Ronald Klop <ronald-lists@klop.ws>
To:        George Michaelson <ggm@algebras.org>
Cc:        freebsd-net@freebsd.org, "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>, mike tancsa <mike@sentex.net>, Chris Ross <cross+freebsd@distal.com>
Subject:   Re: Netstat -i 5-character interface name length?
Message-ID:  <1823295646.70.1656666667833@localhost>
In-Reply-To: <CAKr6gn2TpdcWS-J159zPiCM5t=PKKp8gw5jEq7gefLqJ-88zZA@mail.gmail.com>
References:  <0843509a-fe0c-ffe8-2cfe-534872bc33bd@sentex.net> <202206301516.25UFGSrM090126@gndrsh.dnsmgr.net> <CAKr6gn2TpdcWS-J159zPiCM5t=PKKp8gw5jEq7gefLqJ-88zZA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_69_1342544045.1656666667825
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

 
Van: George Michaelson <ggm@algebras.org>
Datum: vrijdag, 1 juli 2022 00:50
Aan: "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>
CC: mike tancsa <mike@sentex.net>, Chris Ross <cross+freebsd@distal.com>, freebsd-net@freebsd.org
Onderwerp: Re: Netstat -i 5-character interface name length?
> 
> Is there a reason (avoid bikeshedding) the field width can't be
> increased to allow the bgeXhexIsVeryLong0 names to work?


I agree. I hope POLA is more leaning towards "why does netstat not print the interface name correctly?" than "my 15 year old script parsing the output of netstat doesn't understand strings longer than 5 chars".
$ netstat -i | grep Link
Name    Mtu Network       Address              Ipkts Ierrs Idrop    Opkts Oerrs  Coll
genet  1500 <Link#1>      dc:a6:32:da:f4:3b 62095311     0     0 105591894     0     0
lo0   16384 <Link#2>      lo0                      1     0     0        1     0     0
bridg  1500 <Link#3>      58:9c:fc:00:3e:aa 18616989     0     0 18652615     8     0
vlan3  1500 <Link#4>      dc:a6:32:da:f4:3b  9673278     0     0  5695824     8     0
epair  1500 <Link#5>      02:c8:49:24:bd:0a  3041667     0     0  4467006    17     0
epair  1500 <Link#7>      02:d5:f0:fe:9e:0a  1529717     0     0  1932170    17     0
epair  1500 <Link#9>      02:96:17:58:ce:0a  2384154     0     0  4740683    17     0
epair  1500 <Link#11>     02:b2:7f:d6:da:0a     8746     0     0    22125    22     0
epair  1500 <Link#17>     02:81:38:75:d1:0a    87264     0     0   178535    21     0
epair  1500 <Link#19>     02:ad:f2:49:60:0a    78055     0     0   160252    21     0
epair  1500 <Link#21>     02:0d:07:81:b2:0a  1814108     0     0  1455889    16     0

So all "default" interface names do not fit. I don't like the solution of "rename all your interfaces" as I think the out-of-the-box experience can be made better.
I'll vote for enabling -W by default and add an option for backwards compatibility.

Regards,
Ronald.



 > 
> I'm not saying "you can alias around this" is bad, but I sense we're
> walking into a world which is where Linux is, with every physical
> device called eth0/1/2 and then "which" device is eth0 becomes a
> question..
> 
> On Fri, Jul 1, 2022 at 1:17 AM Rodney W. Grimes
> <freebsd-rwg@gndrsh.dnsmgr.net> wrote:
> >
> > [ Charset UTF-8 unsupported, converting... ]
> > > On 6/29/2022 10:56 AM, Chris Ross wrote:
> > > > 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.
> > > >
> > > One of the first local mods I do is alias netstat to netstat -W for this
> > > reason. e.g.
> > > alias netstat?? netstat -W
> > >
> > > in /etc/csh.cshrc
> >
> > That only fixes it for your interactive csh processes, the
> > original poster had specifically mentioned output from
> > periodic scrips, aka daily iirc.
> >
> > One thing that can be done to mitigate the long vlan
> > dev name (imho the vlan driver should of just named
> > itself much short, like "vl", as most network devices
> > are 2 litter names anyway) is to use the "name" option
> > of ifconfig to give them a better name than the default.
> >
> > ifconfig vlan2 create vlandev em0 vlan 2 name v2
> >
> > --
> > Rod Grimes                                                 rgrimes@freebsd.org
> >
>  
> 
------=_Part_69_1342544045.1656666667825
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><head></head><body>&nbsp;
<p><strong>Van:</strong> George Michaelson &lt;ggm@algebras.org&gt;<br />
<strong>Datum:</strong> vrijdag, 1 juli 2022 00:50<br />
<strong>Aan:</strong> &quot;Rodney W. Grimes&quot; &lt;freebsd-rwg@gndrsh.dnsmgr.net&gt;<br />
<strong>CC:</strong> mike tancsa &lt;mike@sentex.net&gt;, Chris Ross &lt;cross+freebsd@distal.com&gt;, freebsd-net@freebsd.org<br />
<strong>Onderwerp:</strong> Re: Netstat -i 5-character interface name length?</p>

<blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px">
<div class="MessageRFC822Viewer" id="P">
<div class="TextPlainViewer" id="P.P">Is there a reason (avoid bikeshedding) the field width can't be<br />
increased to allow the bgeXhexIsVeryLong0 names to work?</div>
</div>
</blockquote>
<br />
<br />
I agree. I hope POLA is more leaning towards &quot;why does netstat not print the interface name correctly?&quot; than &quot;my 15 year old script parsing the output of netstat doesn't understand strings longer than 5 chars&quot;.
<pre>
$ netstat -i | grep Link
Name&nbsp;&nbsp;&nbsp; Mtu Network&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ipkts Ierrs Idrop&nbsp;&nbsp;&nbsp; Opkts Oerrs&nbsp; Coll
genet  1500 &lt;Link#1&gt;      dc:a6:32:da:f4:3b 62095311     0     0 105591894     0     0
lo0   16384 &lt;Link#2&gt;      lo0                      1     0     0        1     0     0
bridg  1500 &lt;Link#3&gt;      58:9c:fc:00:3e:aa 18616989     0     0 18652615     8     0
vlan3  1500 &lt;Link#4&gt;      dc:a6:32:da:f4:3b  9673278     0     0  5695824     8     0
epair  1500 &lt;Link#5&gt;      02:c8:49:24:bd:0a  3041667     0     0  4467006    17     0
epair  1500 &lt;Link#7&gt;      02:d5:f0:fe:9e:0a  1529717     0     0  1932170    17     0
epair  1500 &lt;Link#9&gt;      02:96:17:58:ce:0a  2384154     0     0  4740683    17     0
epair  1500 &lt;Link#11&gt;     02:b2:7f:d6:da:0a     8746     0     0    22125    22     0
epair  1500 &lt;Link#17&gt;     02:81:38:75:d1:0a    87264     0     0   178535    21     0
epair  1500 &lt;Link#19&gt;     02:ad:f2:49:60:0a    78055     0     0   160252    21     0
epair  1500 &lt;Link#21&gt;     02:0d:07:81:b2:0a  1814108     0     0  1455889    16     0</pre>
<br />
So all &quot;default&quot; interface names do not fit. I don't like the solution of &quot;rename all your interfaces&quot; as I think the out-of-the-box experience can be made better.<br />
I'll vote for enabling -W by default and add an option for backwards compatibility.<br />
<br />
Regards,<br />
Ronald.<br />
<br />
<br />
<br />
&nbsp;
<blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px"><br />
I'm not saying &quot;you can alias around this&quot; is bad, but I sense we're<br />
walking into a world which is where Linux is, with every physical<br />
device called eth0/1/2 and then &quot;which&quot; device is eth0 becomes a<br />
question..<br />
<br />
On Fri, Jul 1, 2022 at 1:17 AM Rodney W. Grimes<br />
&lt;freebsd-rwg@gndrsh.dnsmgr.net&gt; wrote:<br />
&gt;<br />
&gt; [ Charset UTF-8 unsupported, converting... ]<br />
&gt; &gt; On 6/29/2022 10:56 AM, Chris Ross wrote:<br />
&gt; &gt; &gt; Hello folks. ?I just noticed something that I?m sure has been true<br />
&gt; &gt; &gt; forever, but I checked and it?s still true on my 12.3-STABLE system.<br />
&gt; &gt; &gt;<br />
&gt; &gt; One of the first local mods I do is alias netstat to netstat -W for this<br />
&gt; &gt; reason. e.g.<br />
&gt; &gt; alias netstat?? netstat -W<br />
&gt; &gt;<br />
&gt; &gt; in /etc/csh.cshrc<br />
&gt;<br />
&gt; That only fixes it for your interactive csh processes, the<br />
&gt; original poster had specifically mentioned output from<br />
&gt; periodic scrips, aka daily iirc.<br />
&gt;<br />
&gt; One thing that can be done to mitigate the long vlan<br />
&gt; dev name (imho the vlan driver should of just named<br />
&gt; itself much short, like &quot;vl&quot;, as most network devices<br />
&gt; are 2 litter names anyway) is to use the &quot;name&quot; option<br />
&gt; of ifconfig to give them a better name than the default.<br />
&gt;<br />
&gt; ifconfig vlan2 create vlandev em0 vlan 2 name v2<br />
&gt;<br />
&gt; --<br />
&gt; Rod Grimes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rgrimes@freebsd.org<br />
&gt;<br />
&nbsp;
<hr /></blockquote></body></html>
------=_Part_69_1342544045.1656666667825--



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