rename the command ip
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
William,
[Cc'ing netdev list as that's the place to discuss iproute2 development.]
Quoted 1 line · William Chen
I see your excellent contributions to iproute2. I hope that you are well.
Thanks!
Quoted 1 line
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.
Quoted 7 lines
The
ip route showresult 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>
Quoted 16 lines
Anyway, the
ip route showresult seems to be different fromrouteandnetstat. 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?
Quoted 9 lines
The output of
ip route showis 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 11Is there a way to make the output maybe in TSV format (or at least in a column-wise format) so that the command
columncan be used to make the output easier to read?
Have a look at '-json' option if you want to parse the output.
Quoted 4 lines
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
Quoted 4 lines · Phil Sutter
William,
[Cc'ing netdev list as that's the place to discuss iproute2 development.]
<...>
Quoted 4 lines
Quoted 1 line
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
Quoted 2 lines
Cheers, Phil
Quoted 6 lines · Leon Romanovsky
Quoted 4 lines · Phil Sutter
William,
[Cc'ing netdev list as that's the place to discuss iproute2 development.]
Quoted 8 lines
<...>
Quoted 4 lines
Quoted 1 line
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