42

A lot of people is stating that the ifconfig command is deprecated in favor of the ipone (on linux at least).

This is often used as an argumentation to switch from ifconfig to ip (see some comment and answer of Should I quit using Ifconfig?).

Where can we find a statement about that (i.e. where is it stated that ifconfig won't be supported in the future) ?

Bruno BEAUFILS
  • 523
  • 1
  • 4
  • 5

4 Answers4

32

The official statement regarding the plans to obsolete net-tools was made on the debian-devel mailing list in early 2009 by one of the net-tools maintainers. True to their statement, net-tools has been hardly maintained at all since that time.

Luk Claes and me, as the current maintainers of net-tools, we've been thinking about it's future. Net-tools has been a core part of Debian and any other linux based distro for many years, but it's showing its age.

It doesnt support many of the modern features of the linux kernel, the interface is far from optimal and difficult to use in automatisation, and also, it hasn't got much love in the last years.

On the other side, the iproute suite, introduced around the 2.2 kernel line, has both a much better and consistent interface, is more powerful, and is almost ten years old, so nobody would say it's untested.

Hence, our plans are to replace net-tools completely with iproute, maybe leading the route for other distributions to follow. Of course, most people and tools use and remember the venerable old interface, so the first step would be to write wrappers, trying to be compatible with net-tools.

At the same time, we believe that most packages using net-tools should be patched to use iproute instead, while others can continue using the wrappers for some time. The ifupdown package is obviously the first candidate, but it seems that a version using iproute has been available in experimental since 2007.

The idea to write wrappers was eventually abandoned as unworkable, and nearly all Linux distributions have switched to iproute2 since then.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
22

The man page of ifconfig says:

IFCONFIG(8)           Linux System Administrator's Manual          IFCONFIG(8)

NAME
       ifconfig - configure a network interface

SYNOPSIS
       ifconfig [-v] [-a] [-s] [interface]
       ifconfig [-v] interface [aftype] options | address ...

NOTE
       This  program  is obsolete!  For replacement check ip addr and ip link.
       For statistics use ip -s link.

The Arch Linux news page says:

Deprecation of net-tools

2011-06-08 - Tom Gundersen

This April marked the ten year anniversary of the last net-tools release. We decided to look at this as an opportunity to deprecate net-tools and provide alternative, and better maintained, solutions for net-tools functionality. This has a few consequences, but most people should not notice.

net-tools will continue to be in the repositories, so scripts relying on it should still work.

And Linux Foundation says much the same thing:

net-tools
By Linux Foundatio... - November 19, 2009 - 10:23am

networking

Overview

A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system. This package includes arp(8), hostname(1), ifconfig(8), ipmaddr, iptunnel, mii-tool(8), nameif(8), netstat(8), plipconfig(8), rarp(8), route(8) and slattach(8).

Maintainers: Bernd Eckenfels, Phil Blundell
Current Version: net-tools 1.60 (see upstream git for updates)

Please keep in mind that most net-tools programs are obsolete now:

program   obsoleted by
arp       ip neigh
ifconfig  ip addr
ipmaddr   ip maddr
iptunnel  ip tunnel
route     ip route
nameif    ifrename
mii-tool  ethtool

You would probably want to review iproute2 page.

I am not sure why Ubuntu doesn't carry the note on deprecation though.

kubanczyk
  • 13,502
  • 5
  • 40
  • 55
Question Overflow
  • 2,023
  • 7
  • 28
  • 44
  • You don't say in what distro. Ubuntu still has a real man page for iconfig. – Andrew Schulman Oct 03 '14 at 02:42
  • @AndrewSchulman, updated my answer with a link to the man page. – Question Overflow Oct 03 '14 at 03:26
  • 1
    It has been deprecated upstream, though. No telling when that will eventually work its way down administratively. Some subsystem updates seem to have taken a second seat to changes in the default window manager (Unity) for a few years -- which, oddly, exactly zero people I personally know use, including myself. But eventually net-tools will go away; nothing new is being written against its libraries. – zxq9 Oct 03 '14 at 03:58
  • @AndrewSchulman, I have rolled back your statement on Ubuntu since that is not what I meant to say. – Question Overflow Oct 03 '14 at 04:20
12

This is a distro-specific issue. net-tools has been deprecated by just about every major distro (or distro upstream), though, so in effect the entire community is switching from ifconfig to ip -- but the change is slow, as some distros have an extremely long shelf-life (RHEL,for example).

You are less likely to find a deprecation announcement than an item in the release notes of a major release for a distro stating something like "As of FooLinux v2.0 net-tools has been deprecated in favor of the 'ip' command". (If the distro has major releases, that is. Gentoo and Arch being interesting exceptions which handle this sort of thing through news announcements that appear as admin notices within the system and sometimes on their websites: https://www.archlinux.org/news/deprecation-of-net-tools/.)

You can find plenty of chatter about net-tools' (slow) demise in bug trackers and dev roadmaps, also:

It is entirely possible that a distro somewhere may decide to stick with net-tools and adopt maintenance of it as their pet project, but this is unlikely since the end result would be expending substantial effort maintaining a set of tools nobody writes other software against. Unless that distro is owned by Apple, of course. ;-)

In the end, the real lesson is to read your release notes. Linux is a moving target, especially if you are managing more than a single distro at once, so don't disregard the docs or assume something in release X is the same as it was in X-1.

zxq9
  • 229
  • 1
  • 6
  • I can see why the change is slow. I'm a daily Linux user, use ifconfig all the time, had no clue it was deprecated at all let alone many years ago! Wow! Learn something new everyday! :-) – Brian Knoblauch Oct 03 '14 at 15:41
  • 1
    @BrianKnoblauch Don't think about this too hard. There is a complex mix of political, business and (actual) technical reasons some things change so fast and others so slow. Just have to accept that things will periodically blow up on us and pay attention to release notes every so often. :-) – zxq9 Oct 03 '14 at 16:43
  • +1 for the focus on distro-specific. – R.. GitHub STOP HELPING ICE Oct 04 '14 at 15:40
  • Also note that a distro wanting to use the old utils does not need to take up maintaining them. There are perfectly well-maintained versions in Busybox that are not going away anytime soon. – R.. GitHub STOP HELPING ICE Oct 04 '14 at 15:42
  • 1
    @R Maintenance always includes at *least* packaging against whatever core utilities your distro includes (which eventually means porting or patching other, unrelated upstream packages you also include to work within the constraints of a system that includes outdated stuff) -- not to mention security patching (consider Apple's increasing dilemma). Old packages become tarbabies over time, especially the ones you least expect. Bastiat's distinction between what is seen and what is not seen is peripherally instructive here, as is Heinlein's assertion that "There's no such thing as a free lunch". – zxq9 Oct 04 '14 at 18:38
  • 2
    This is incorrect: **any distro that uses a currently maintained kernel can have network interfaces set up that don't work with ifconfig**. – mikemaccana Aug 28 '15 at 14:58
  • @mikemaccana I'm trying to figure out how your comment has any bearing on my answer. The OP asked "Where is the statement of deprecation of ifconfig?" and I answered that it is a distro-specific issue and explained how this is a maintenance/packaging issue, and provided a list of links to these announcements at the distro level. That interfaces can be made that don't work with some arbitrary version of net-tools is unsurprising -- that anyone *could* (but likely won't) update net-tools to add functionality it lacks is equally unsurprising. What is your point? – zxq9 Aug 28 '15 at 17:36
  • 1
    @zxq9 I understand you mentioned it was a distro specific issue. I showed that it is not a distro specific issue; all Linux distros use the same kernel, not a single distro will use a kernel that can express all its networking concepts in such a way that ifconfig will show the configured network interfaces correctly. – mikemaccana Aug 31 '15 at 19:53
  • @mikemaccana First off, no. Not all distros use the same kernel. Not even remotely true. Second, the OP's question is about the *statement of deprecation*, not whether or not a given version of a given kernel fork can be placed in valid states which conflict with ifconfig. This is *indeed* a distro-specific issue. – zxq9 Aug 31 '15 at 21:19
  • 1
    @zxq9 All Linux distros use the Linux kernel, which is where network `ioctl`s are implemented. You've misunderstood and thought I meant kernel version. All Linux distros that are maintained (eg, use a kernel younger than 10 years) have the problem that ifconfig cannot represent, eg, a virtual ip on a VLAN on a bonded NIC (which is more popular than you think). **Since it affects all maintained Linux distributions, once again, it is not a distro-specific problem.** – mikemaccana Sep 01 '15 at 14:44
  • @mikemaccana Some distros have a support cycle that exceeds 10 years. Many distros do not build in features designed for data-center use by default. There are forks and extended patched flavors of the kernel, not just versions of the main branch. There are distros that deliberately elect to avoid certain kernel features. There are features in the kernel for which there are no standard tools (why is this case so special it affects all Linux but those don't?). This does not affect all distros -- thousands of SL5 instances at CERN, for example. Where is the deprecation notice for *all of Linux*? – zxq9 Sep 01 '15 at 16:24
  • 1
    @mikemaccana I see the perspective difference here. The *problem* of ifconfig not supporting modern network interface features indeed is a kernel issue.This is what you are focusing on. The OP asked the question "where is the statement of deprecation?", and it is clear that different distros have been approaching this at their own pace over the last several years -- which is why there is no central deprecation notice, but a cascade of distro announcements. This is what I focused my answer on, because it answers the question that was asked. – zxq9 Sep 01 '15 at 16:27
  • Ack @zxq9 re: the perspective difference. I'll ignore your comment about LTS distros then and not reply, since I gather the newer message deprecates it. – mikemaccana Sep 01 '15 at 16:37
2

ifconfig isn't part of Linux. It's a tool that's available under most Linux based distributions. You will have to refer to distribution specific documentation to find out why it's being deprecated.

Gene
  • 3,633
  • 19
  • 39
  • 4
    It's not part of Linux *now*. It started life in Linux when Linux used the BSD IP Stack (ifconfig is a part of the BSD IP Stack). Linux wrote their own IP stack around 2001 and wrote their own ifconfig as part of net-tools for compatibility. – Chris S Oct 03 '14 at 02:08