Live data from Hacker News

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

utcc.utoronto.ca

51–60 of 270 posts

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

#51
post #36

Earlier quoted context omitted.

The man page is good. `ip` takes a --oneline arg to make it more parseable.

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 you are supporting it, there's no point in supporting single dash long options.

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

#52

"... an ongoing effort to obsolete the old, cross-Unix standard network administration and diagnosis commands of ifconfig, netstat and the like and replace them with fresh new Linux specific things like ss and the ip suite." Old does not mean bad but Linux chooses that path as it moves further away from UNIX and being a Unix-like system in its pursuit to be Windows.

> "Old does not mean bad" It doesn't automatically mean "good" either. > "in its pursuit to be Windows" Would you please elaborate?

Windows subsumes a lot of small network daemons into a monolithic process called SVCHOST.EXE.

Systemd does a similar thing.

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

#53

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.

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

#54
It's pretty clear that ip is the superior and more modern tool, i believe they could work on the presentation layer of the software tho... its output pales compared to ifconfig, as other peers have stated.

that's what really gives us grumpy old sysadmins the kneejerk reactions. every time i log into a system and i have to tipo "ip a" i need to stop and try to slowly decode the unformatted soup letter that is presented instead of a nicelly formatted table like on ifconfig.

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

#55
Ok. Fully admit, old unofficial sysadmin here (50, started with computers at 10 - and I don't work as a sysadmin, but often wind up helping our sysadmin who has less experience). ifconfig, netstat, lsof are some of my top go to tools. I haven't learned the iproute suite of tools yet, but this article is prompting me to start doing that. It will be hard, my memory is fuzzy on when net-tools commands first came out..I remember using Slackware in mid 90s, but don't remember if they were in there yet, but I think I've maybe been using them for 20 years, or close to it.

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

#57
M. Siebenmann's actual main point, ignored by much of the "I do/do not like ip/ifconfig." discussion here, is that it is valid to replace ifconfig because the standard output of the command is an interface contract that is set in stone because of people using it in scripts.

I disagree, on two grounds.

Firstly, the ifconfig commands in the BSDs are existence proofs that this is not so. The BSD people actually have modified ifconfig to keep up with changing kernel networking abilities, and one will find the (say) FreeBSD ifconfig of today having a lot more functionality than the Linux one. The BSDs, by their very natures, kept their ifconfig tools aligned with the rest of the operating system as it changed.

* https://freebsd.org/cgi/man.cgi?query=ifconfig

* https://linux.die.net/man/8/ifconfig

* https://unix.stackexchange.com/questions/319350/

Secondly, an aversion to breaking (badly designed) scripts is isn't really the reason that ifconfig hasn't been changed. The reason that ifconfig hasn't been changed, as evident from the net-tools bug and other discussions of this, one of which I have hyperlinked elsewhere in this discussion, is more to do with (purportedly) doing things portably and not having two disjoint code paths, one for Linux using netlink and one for everything else using ioctl. Two code paths and code that was not portable to other operating systems would be the result of adding netlink capability to net-tools's ifconfig.

That reason does not itself hold water, however. The net-tools package is highly Linux-specific anyway, in the first place, so arguments about its portability are moot. Given that, the actually expressed reason for not doing this given by the developers themselves (as opposed to the differing reasons inferred by people other than the developers, the most often given one of which is directly contradicted by git repository activity as recent as 2016) founders.

* https://github.com/ecki/net-tools/commits/master

One of the more disappointing things about Linux's ifconfig is that this:

    # ifconfig lo inet6 ::1
    Don't know how to set addresses for family 10.
    #
is a fairly trivial oversight in a case statement in the code, a missing case for AF_INET6, rather than a fundamental design or implementation problem, and doesn't even need the netlink API to fix.

* https://sourceforge.net/p/net-tools/code/ci/master/tree/ifco...

* https://sourceforge.net/p/net-tools/code/ci/master/tree/ifco...

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

#58
TIL: iproute2 has a color, a brief/human mode, and a one-line mode. I think I am going to be aliasing ip -color to ip from now on.

$ ip -br -c a # ip -brief -color address

  lo     UNKNOWN  127.0.0.1/8 ::1/128 
  eth0   DOWN
  wlan0  UP       192.0.2.1/24 2001:db8::1/64 fe80::1/64
$ ip -br -c l # ip -brief -color link

  lo     UNKNOWN  00:00:00:00:00:00  
  eth0   DOWN     00:12:34:56:78:9a  
  wlan0  UP       12:34:56:78:9a:bc 

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

#59
I've lost much muscle memory and skill with newer systems.

When I was younger I had time for deep dives into configs/manuals/googles/mailthreads. These days my job assumes I know all the stuff and ins and outs, not having a good time re-learning everything I already know how to do...

It's not new anymore and gives no joy for learning new things, no time to do it either. It sucks.

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

#60
post #41

I find it more frustrating that network configuration tools seem to be added in layer after layer, like with the new netplan took in Ubuntu. To me it seems more complex than it needs to be.

new netplan took in Ubuntu

Having fought that monstrosity very recently, I completely agree. The homepage of its site looks more like a marketing blurb than anything else, and everything about it has an unpleasant "enterprisey" feel to it. I don't care about YAML or "abstract network renderers" or whatever buzzword-compliance bingo it claims to support, I just want to configure one NIC for one static IP.

The fact that Windows' networking configuration is actually easier than on "modern Linux" should be a sign that something has gone horribly wrong.

Post reply on HN