Live data from Hacker News

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

utcc.utoronto.ca

11–20 of 270 posts

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

#11
this makes it sound like the only thing ip does is replace ifconfig which is not the case. It is more like like a go to application to manage the network stack to some degree. You can set up various tunnel interfaces, vlans, routes, routing rules, IPsec policies, network namespaces and more. Learning how to deal with it gets you quite far. Learning how to read the help output is often enough to understand everything and definitely worth the effort, even if all you want to do is to show the assigned IP addresses...

I also appreciate very much the mostly consistent syntax for various sub commands. Its often an easy guess to know how to do what...

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

#12
post #11

this makes it sound like the only thing ip does is replace ifconfig which is not the case. It is more like like a go to application to manage the network stack to some degree. You can set up various tunnel interfaces, vlans, routes, routing rules, IPsec policies, network namespaces and more. Learning how to deal with it gets you quite far. Learning how to read the help output is often enough to understand everything…

Learning how to read the help output is often enough

I find the 'ip --help' is virtually incomprehensible, and the man page no better. There's no explanation about what the tool can do, only some machine-readable formatting of the syntax expected. This kind of documentation is useless IMO, it's actively hostile to new users.

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

#13
post #11

this makes it sound like the only thing ip does is replace ifconfig which is not the case. It is more like like a go to application to manage the network stack to some degree. You can set up various tunnel interfaces, vlans, routes, routing rules, IPsec policies, network namespaces and more. Learning how to deal with it gets you quite far. Learning how to read the help output is often enough to understand everything…

Learning how to read the help output is often enough I find the 'ip --help' is virtually incomprehensible, and the man page no better. There's no explanation about what the tool can do, only some machine-readable formatting of the syntax expected. This kind of documentation is useless IMO, it's actively hostile to new users.

the help gets more specific the more complete your command gets. Try "ip link add type vlan help" for example. While i agree it does nothing to explain what the various switches do, if you know what you are trying to achieve this is most of the time enough.

However i do not agree about the man pages the switches are explained there in enough detail in my opinion...

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

#15

Isn't the described mismatch between "reality" and what ifconfig reports once again a case of systemd (networkd) not exposing IP aliases in the traditional way, and replacing established network concepts by it's own stuff? Meant as a genuine question rather than trolling (though I know I'd hate to bow to whatever systemd comes up with rather than just using ifconfig which has worked since the begin of times) eg. ther…

No. The Linux kernel has two APIs, and has had since before systemd even existed. ifconfig uses the ioctl() API, which presents the concept of alias IP addresses in one way. ip uses the netlink API, which presents the concept of multiple IP addresses per interface in a different way. M. Siebenmann did include this point.

* https://sourceforge.net/p/net-tools/bugs/12/

* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=359676

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

#17
post #13

Earlier quoted context omitted.

Learning how to read the help output is often enough I find the 'ip --help' is virtually incomprehensible, and the man page no better. There's no explanation about what the tool can do, only some machine-readable formatting of the syntax expected. This kind of documentation is useless IMO, it's actively hostile to new users.

the help gets more specific the more complete your command gets. Try "ip link add type vlan help" for example. While i agree it does nothing to explain what the various switches do, if you know what you are trying to achieve this is most of the time enough. However i do not agree about the man pages the switches are explained there in enough detail in my opinion...

The switches are useless until you have an idea about what the command can do. And yet the 'IP - COMMAND SYNTAX' section has text like 'link - network device'. What the hell does that mean? So 'ip link' does what exactly? Could the developers have typed more than just two words to try to explain this command (action?) Good luck to anyone who decides to RTFM.

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

#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 brand new tool manages to have worse output than a venerable old unix command. Because of this I often end up configuring the network with ip only to double-check everything is right with a quick ifconfig. That's silly.

I think at this point I would've preferred if they had made an "ifconfig2" instead, mostly identical to the old one but with a few breaking changes to add the missing functionality. An incremental update instead of a full rewrite. There's definitely some NIH going on.

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

#19
post #11

this makes it sound like the only thing ip does is replace ifconfig which is not the case. It is more like like a go to application to manage the network stack to some degree. You can set up various tunnel interfaces, vlans, routes, routing rules, IPsec policies, network namespaces and more. Learning how to deal with it gets you quite far. Learning how to read the help output is often enough to understand everything…

Learning how to read the help output is often enough I find the 'ip --help' is virtually incomprehensible, and the man page no better. There's no explanation about what the tool can do, only some machine-readable formatting of the syntax expected. This kind of documentation is useless IMO, it's actively hostile to new users.

The tool allows one to manipulate kernel objects more or less 1:1, so documentation and help of 'ip' and 'tc' is adequate enough if you know what those kernel objects are and how they behave, but it won't help if you don't know anything about linux networking or traffic shaping in the first place.

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

#20

Isn't the described mismatch between "reality" and what ifconfig reports once again a case of systemd (networkd) not exposing IP aliases in the traditional way, and replacing established network concepts by it's own stuff? Meant as a genuine question rather than trolling (though I know I'd hate to bow to whatever systemd comes up with rather than just using ifconfig which has worked since the begin of times) eg. ther…

Fortunately, not in this particular case - it's just a question of incompatibility between the two APIs. If you create an alias by ifconfig eth0:0, it will be visible by ifconfig. If you add a NIC:n entry to /etc/network/interfaces, ifconfig will display it. I don't believe this API will ever get obsoleted as millions of systems use it that way.
Post reply on HN