Live data from Hacker News

There are real reasons for Linux to replace ifconfig, netstat, etc

utcc.utoronto.ca

81–90 of 270 posts

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#81
post #18

I'm trying hard to fight my old muscle memory to use ip instead of ifconfig on Linux. I have a few issues though: * "ip" is useless as a keyword if you're looking for help online. It's extremely frustrating and probably my main issue actually learning how to use the damn thing. * ifconfig's output is simply more readable IMO: https://svkt.org/~simias/up/20180525-113825_ip-vs-ifconfig.p... . It's pretty weird that a b…

> "ip" is useless as a keyword Most docs will mention iproute2. You can use that for googling.

On my CentOS 7 system, there is no iproute2 package, but there is an iproute package. Neither 'man iproute' nor 'man iproute2' produce any man pages. The iproute package provides the contents of /etc/iproute2, among other things, so why is the package name just iproute? The man page for ip has the name iproute2 at the very bottom, where it is easily missed. It would never have occurred to me to look for either iproute or iproute2 for information on ip had I not come across this posting. A little consistency of naming, with better cross referencing, would sure be nice...

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#82

I've never understood the purpose of IP aliases like the "secondary em0" the author is setting up with systemd.networkd. These aliases are practically useless, you cannot bind() to them without knowing the IP, you cannot use them in firewall rules, you cannot setup dhcp for them etc. What are people using them for? I'm not sure what the low level difference is between an alias like in the article, or a "eth0:1" type…

> What are people using them for?

In my case, keepalived VRRP floating addresses.

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#83
Hi so here is something to chew on . If the “new” system is so great why do I still need the old route command to deal with multicast routes ? Also the motivation to use the “new” bsd-ish style of poking the kernel is just half baked . It’s neither new nor well planned .

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#84
post #36

Earlier quoted context omitted.

I'm not sure having everything crammed into a single line makes it better (at least if a human is supposed to parse it and not a machine): https://svkt.org/~simias/up/20180525-125636_ip-vs-ifconfig-2...

I have used ip -oneline to parse configuration of servers, and it's really practical. The only real gripe I have with IP is their long argument/switch format. Unlike everyone else, ip is a minority, which accepts long options with single dash "-". This prevents someone from combining many short parameters under a single dash, also it's confusing to use. Yes, it unofficially supports the old double dash format, but if…

This is ridiculous. I would love to know their justification for using single dash for long options. When did that become the "old way"?? Very old X11 commands and many Solaris commands use a single dash, but nearly all modern commands use double dash. And I agree that this syntax makes it hard to combine single-character options. They must have had a very compelling reason to use a non-standard option syntax.

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#86
post #43
post #32

Earlier quoted context omitted.

to get the gateway: ip route show default > > ifconfig's output is simply more readable IMO I prefer iproute2's terseness.

I'm not sure "terse" is the right adjective. It presents basically the same amount of information as ifconfig (minus the packet counters) and actually adds a few more flags. It's all about the formatting really. Simply adding an empty line between each interface would go a long way. Also starting the line with the interface name instead of the index. Adding more punctuation to delimit the fields (, : etc...) would be…

I can take "mtu 1500" part, and sort-of "qdisc", but what's up with repeating obscure parameters at their default values, for each and IP address:

  valid_lft forever preferred_lft forever

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#87

When I started learning Linux when it was, I think, 0.99, I appreciated that so many commands where cross-Unix. It was a Unix lookalike. I could watch how something is done on one Unix, type this stuff into my Linux terminal, and get an equivalent result in Linux, and this helped a lot and created a sense of community. Now I see that Linux tears the standards apart, there are more and more obstacles with porting comp…

Consistency is great, but there’s a trade off between consistency and innovation. In a sense, what you’re describing is stagnation.

OpenBSD's ifconfig did not stagnate. It handles aliases, bridges, wifi, etc.

No, the issue is that no one at GNU or Linux cares about correct, simple tools (2 APIs for networking in the kernel?! What happened to manpages?! WTF info?). And thanks to that it runs on anything.

Pick your poison

https://man.openbsd.org/ifconfig.8

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#88
post #32

Earlier quoted context omitted.

> ifconfig's output is simply more readable IMO Yes, this is key, and why ip is so terrible for the way I currently work. No doubt I'll have to get used to it, like those stupid biosdevname interfaces. 90% of my machines don't have more than 1 IP per physical interface, the rest are aliases ifconfig outputs clear whitespace, so picking out the specific details of - interface name - ip address Is far easier. I do pref…

to get the gateway: ip route show default > > ifconfig's output is simply more readable IMO I prefer iproute2's terseness.

When asking "what's the default gateway?", more often than not, the real question you have is "what's the gateway to IP address X", which would be:

  ip route get X

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#89

When I started learning Linux when it was, I think, 0.99, I appreciated that so many commands where cross-Unix. It was a Unix lookalike. I could watch how something is done on one Unix, type this stuff into my Linux terminal, and get an equivalent result in Linux, and this helped a lot and created a sense of community. Now I see that Linux tears the standards apart, there are more and more obstacles with porting comp…

Consistency is great, but there’s a trade off between consistency and innovation. In a sense, what you’re describing is stagnation.

It's not stagnation if the majority system (Linux) makes an effort to reach consensus with the minority systems (*BSD) on changes and improvements. It is unclear to me that that happens to any meaningful degree.

Re: There are real reasons for Linux to replace ifconfig, netstat, etc

#90
post #43
post #32

Earlier quoted context omitted.

to get the gateway: ip route show default > > ifconfig's output is simply more readable IMO I prefer iproute2's terseness.

I'm not sure "terse" is the right adjective. It presents basically the same amount of information as ifconfig (minus the packet counters) and actually adds a few more flags. It's all about the formatting really. Simply adding an empty line between each interface would go a long way. Also starting the line with the interface name instead of the index. Adding more punctuation to delimit the fields (, : etc...) would be…

Huh, does "ip" also support "tc" (traffic control) commands - qdisc is a queueing discipline... tc seems to be the an earlier thing from the people who brought us ip. tc must have the worst command line interface and documentation ever - it is very hard and very frustrating to use, like no other command line interface I've ever seen.

I once tried to use tc and gave up after more than a day of trying, that is how bad it is. The syntax is a word soup and the semantics are very poorly explained.

Post reply on HN