Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)
81–90 of 141 posts
Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)
#82There's no reason why someone can't get their act together and fix ifconfig, or if that is insurmountable, rewrite it while maintaining the same outward appearances. I think this is not specific to Linux at all, and is not really about kernel ABI. This is a problem I see a lot, often in proprietary software too. Firstly, people opt to rewrite before they fix or even before they fully understand the old thing. Secondl…
> or even before they fully understand the old thing. I feel that /sbin/ip is in almost every way a better tool than /sbin/ifconfig, is that not the concensus? > Linux introduced a very complicated new API. Which highlights the fact that the moment you want to have in-depth interactions with a driver for a piece of hardware ioctls are the wrong choice. OSS was great if you had exceptionally simple needs.. the moment…
1) name. It’s to configure the interface
2) default format. Far better spaced than “ip”’s various outputs. I find “ip -o a” just about manageable, but if config shows data far more cleanly imo
Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)
#83Earlier quoted context omitted.
> or even before they fully understand the old thing. I feel that /sbin/ip is in almost every way a better tool than /sbin/ifconfig, is that not the concensus? > Linux introduced a very complicated new API. Which highlights the fact that the moment you want to have in-depth interactions with a driver for a piece of hardware ioctls are the wrong choice. OSS was great if you had exceptionally simple needs.. the moment…
My opinion is that `ip` is a more powerful tool, but it is not as useful for quickly obtaining information or performing a basic action like up/down.
Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)
#84Earlier quoted context omitted.
While I agree that different defaults might be nice, modern versions of ip support a -br[ief] option which is pretty nice: $ ip -br a lo UNKNOWN 127.0.0.1/8 ::1/128 eth0 UP 10.123.45.67/24 fe80::7ed3:aff:fe51:4612/64 $ ip -br l lo UNKNOWN 00:00:00:00:00:00 eth0 UP 7c:d3:0a:51:46:12
'ip -br a' get real messy if you have IP6 unfortunately. IPv6 hosts like to make lots and lots of addresses, which all get smooshed together on a single line of hard-on-the-eyeballs hex noise.
I've just run up the manual and the kool kids could be using 'ip --json --pretty address' or 'ip -j a | jq'
Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)
#85Earlier quoted context omitted.
ifconfig enp2s0:1 192.168.1.42 Now try ip addr add dev enp2s0 192.168.42.1/24 and observe how ifconfig ignores the second IP on the same interface. enp2s0:1 is an alias to enp2s0, not enp2s0 itself. To replicate your ifconfig command, you'd use ip addr add dev enp2s0 192.168.1.42/32 label enp2s0:1 and then it shows up in ifconfig as well.
Understood, thanks, I'm so used to ifconfig that always tried to avoid using ip. Time to learn it I guess.
# ip a a 192.168.1.32/24 dev eth0
Then put 192.168.1.1 into browser etc. Do job. Back to term. Up arrow to get last command, change the second a to d (for delete) and the extra address is gone.
Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)
#86It's not quite that simple. People actually tried to update net-tools ifconfig (one of the two ifconfigs back in 2018). In 2019, I simply wrote an ifconfig that uses the netlink API, because for portability I needed a Linux ifconfig that had a FreeBSD-like command-line syntax. It doesn't have the old interface aliasing mentioned in the headlined article, and has no problems setting up and reporting IPv6 addresses or…
Another off-topic question (using this forum as your author page is quite discouraging about sending you emails ....)
What's the reason for naming cyclog files with the time they were closed? (other than that's how djb did it?), since this information is available easily with 'ls -l'?
I use a logger that opens a $CREATE_TIMESTAMP.u file, and makes "current" a symbolic link to it; and on close renames it to ".s", which I find more intuitive and informative (also provides time between log creation and first message, which is unavailable with cyclog). I was considering changing the ".u"/".s" marking to be an attribute (-w or +i or +t to signify "safely closed") to help repeated rsyncs of log directories, but haven't done that yet.
I'm sure there's some useful aspect of existing cyclog/multilog behaviour that I'm missing, but I haven't been able to figure what it is for the last 10 years ...
Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)
#87There's no reason why someone can't get their act together and fix ifconfig, or if that is insurmountable, rewrite it while maintaining the same outward appearances. I think this is not specific to Linux at all, and is not really about kernel ABI. This is a problem I see a lot, often in proprietary software too. Firstly, people opt to rewrite before they fix or even before they fully understand the old thing. Secondl…
But it's telling that nobody stepped up and actually bothered to do that despite all the bitching and moaning.
Successful code is generally produced to solve problems, not fullfil some abstract ideals
Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)
#88This is highly biased opinion piece. I like BSD. I liked pre-Oracle Solaris. And I like Linux at lot too. And it is factually inaccurate. Deprecation of ifconfig is a distro issue. "Linux" did not deprecate it. And the reason is that it was unmaintained, not that it couldn't handle multiple IP addresses. In fact it can, I still use it 50% of the time. Works fine for setting and displaying multiple addresses. The Debi…
Re: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)
#89I really do not like the default UI in ip. You have to remember a lot of weird stuff to get useful information. The default listing is compressed, hard to read, and noisy. Then I saw someone who had these aliases: alias ipa 'ip -br -color a' alias ipl 'ip -br -color link' Night and day! I try to not use the aliases because I'm often on servers without them, but the options for brief and color with the command to list…
alias ip='ip -brief -color'
which propogates the options to everything. Then if you need the full output, just call ip without the alias: $ \ip a
$ \ip lRe: Linux maintains bugs: The real reason ifconfig on Linux is deprecated (2018)
#90If it were necessary to use the matching version of userland tools to your kernel version, then a container engine would only be able to run container images that match the kernel version -- you wouldn't be able to run containers based on two different versions of Debian, for example.