[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can we kill net-tools, please?



Christian Seiler <christian@iwakd.de> writes:
> On 12/29/2016 08:38 PM, Russ Allbery wrote:

>> ip address also has one of the worst output UI decisions I've ever seen,
>> namely this line:
>> 
>>     inet 192.168.0.195/24 brd 192.168.0.255 scope global dynamic wlan0
>> 
>> specifically "192.168.0.195/24", which is notation (IIRC) invented by this
>> command,

> Nope, that's RFC 4632, Section 3.1, where that was introduced
> first, see
> https://tools.ietf.org/html/rfc4632#section-3.1

No, I'm not talking about CIDR notation, which of course is long-standing
and familiar.  I'm talking about randomly appending a CIDR suffix to
something that is obviously *not* the base for that CIDR block.

In other words, 192.168.0.0/24 is fine.  The problem is with deciding to
merge two completely different things (a CIDR network specification, and
an individual IP address) in this weird hybrid notation that, by RFC 4632,
would mean the network starting at 192.168.0.195 and extending for a /24.
Which is a nonsensical specification.

IIRC, this was done in ip to "save space" instead of using the natural
expression, namely:

    192.168.0.195 net 192.168.0.0/24

Saving space in UI output intended for humans by introducing new notation
is almost never a good idea.

It's possible that some other tool has abused CIDR notation in this way,
but ip is still the only place I ever see it.  It's definitely not common.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: