netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: rename the command ip
       [not found] <6039381f.1c69fb81.45e6d.4dea@mx.google.com>
@ 2021-02-28 21:39 ` Phil Sutter
  2021-03-01  6:20   ` Leon Romanovsky
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Sutter @ 2021-02-28 21:39 UTC (permalink / raw)
  To: William Chen; +Cc: netdev

William,

[Cc'ing netdev list as that's the place to discuss iproute2
development.]

On Fri, Feb 26, 2021 at 12:04:12PM -0600, William Chen wrote:
> I see your excellent contributions to iproute2. I hope that you are well.

Thanks!

> But I have to say the command name "ip" is not good. It renders the command ungoogleable. Why not give it a more googleable name in the first place? Maybe just iproute2? If it is too long, then maybe iprt2?

Well, first of all, this is not my decision to make. Stephen Hemminger
maintains the project, he's the one to ask about such a thing. Apart
from that, renaming a tool because (some)one fails to google it is a
stupid idea: Existing resources won't change spontaneously, also people
will continue to use the old name as they are used to it so you won't
find anything in the future, either.

> The `ip route show` result is not a column-wise format making it hard to see the alignment. In the aspect of output representation, it is worse than both route and netstat.
> 
> $ ip route show
> default via 192.168.1.1 dev eth0 proto dhcp metric 100
> 10.6.0.0/17 dev tun0 proto kernel scope link src 10.6.49.100
> 10.10.0.0/16 via 10.6.0.1 dev tun0 metric 1000
> 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.104 metric 100

You could implement 'brief' output support for ip-route, it is available
for ip-addr and ip-link:

| % ip -br a s
| lo               UNKNOWN        127.0.0.1/8 ::1/128 
| e1000            UP             fe80::215:17ff:fe0b:bf49/64 
| enp34s0          DOWN           fe80::2d8:61ff:fea7:d2fa/64 
| % ip -br l sh
| lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP> 
| e1000            UP             00:15:17:0b:bf:49 <BROADCAST,MULTICAST,UP,LOWER_UP> 
| enp34s0          DOWN           00:d8:61:a7:d2:fa <NO-CARRIER,BROADCAST,MULTICAST,UP> 


> Anyway, the `ip route show` result seems to be different from `route` and `netstat`. Where are, Flags, MSS, Window, Ref and Use?
> 
> $ route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0 eth0
> 10.6.0.0        0.0.0.0         255.255.128.0   U     0      0        0 tun0
> 10.10.0.0       10.6.0.1        255.255.0.0     UG    1000   0        0 tun0
> 192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 eth0
> $ netstat -rn
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
> 0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0
> 10.6.0.0        0.0.0.0         255.255.128.0   U         0 0          0 tun0
> 10.10.0.0       10.6.0.1        255.255.0.0     UG        0 0          0 tun0
> 192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0

Call 'ip -d r s' to see the route type ('U' flag above). 'G' flag is
redundant, assume it's present if a route contains 'via <IP>'. MSS,
Window, Ref and Use are all zero in your output, are they still
relevant?

> The output of `ip route show` is also not of a fixed number of fields. How to interpret what are of a field and what are not of a field?
> 
> $ ip route show | exec awk -e '{ print NF }'
> 9
> 9
> 7
> 11
> 
> Is there a way to make the output maybe in TSV format (or at least in a column-wise format) so that the command `column` can be used to make the output easier to read?

Have a look at '-json' option if you want to parse the output.

> Your help is much appreciated! I look forward to hearing from you. Thanks.
> 
> 
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Luckily I'm the intended recipient so I may choose to disclose the
content (e.g. to a mailing list).

Cheers, Phil

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: rename the command ip
  2021-02-28 21:39 ` rename the command ip Phil Sutter
@ 2021-03-01  6:20   ` Leon Romanovsky
  2021-03-01 11:35     ` Phil Sutter
  0 siblings, 1 reply; 3+ messages in thread
From: Leon Romanovsky @ 2021-03-01  6:20 UTC (permalink / raw)
  To: Phil Sutter, William Chen, netdev

On Sun, Feb 28, 2021 at 10:39:14PM +0100, Phil Sutter wrote:
> William,
>
> [Cc'ing netdev list as that's the place to discuss iproute2
> development.]

<...>

> > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>
> Luckily I'm the intended recipient so I may choose to disclose the
> content (e.g. to a mailing list).

It is OK, he sent the same letter to many of us.

Thanks

>
> Cheers, Phil

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: rename the command ip
  2021-03-01  6:20   ` Leon Romanovsky
@ 2021-03-01 11:35     ` Phil Sutter
  0 siblings, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2021-03-01 11:35 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: William Chen, netdev

On Mon, Mar 01, 2021 at 08:20:33AM +0200, Leon Romanovsky wrote:
> On Sun, Feb 28, 2021 at 10:39:14PM +0100, Phil Sutter wrote:
> > William,
> >
> > [Cc'ing netdev list as that's the place to discuss iproute2
> > development.]
> 
> <...>
> 
> > > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
> >
> > Luckily I'm the intended recipient so I may choose to disclose the
> > content (e.g. to a mailing list).
> 
> It is OK, he sent the same letter to many of us.

At least he expressed his appreciation to each of us individually. :D

Cheers, Phil

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-01 11:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <6039381f.1c69fb81.45e6d.4dea@mx.google.com>
2021-02-28 21:39 ` rename the command ip Phil Sutter
2021-03-01  6:20   ` Leon Romanovsky
2021-03-01 11:35     ` Phil Sutter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).