42
votes

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) ?

6
  • 15
    The man page, for one. Oct 2, 2014 at 15:50
  • 5
    Be like me... use ipconfig as long as you can... until you can't. Same thing for IPv6!
    – ewwhite
    Oct 2, 2014 at 15:53
  • 3
    @ewwhite RHEL 7 doesn't even install net-tools by default. Good luck with that. Oct 2, 2014 at 15:55
  • 4
    @MichaelHampton Not on my man page
    – Izkata
    Oct 2, 2014 at 19:50
  • 3
    @ewwhite: You use Windows?
    – slebetman
    Oct 3, 2014 at 7:44

4 Answers 4

32
votes

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.

22
votes

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.

4
  • You don't say in what distro. Ubuntu still has a real man page for iconfig. Oct 3, 2014 at 2:42
  • @AndrewSchulman, updated my answer with a link to the man page. Oct 3, 2014 at 3: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 3, 2014 at 3:58
  • @AndrewSchulman, I have rolled back your statement on Ubuntu since that is not what I meant to say. Oct 3, 2014 at 4:20
12
votes

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.

13
  • 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 3, 2014 at 16:43
  • 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 4, 2014 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. Aug 28, 2015 at 14:58
  • 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. Aug 31, 2015 at 19:53
  • 1
    @zxq9 All Linux distros use the Linux kernel, which is where network ioctls 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. Sep 1, 2015 at 14:44
2
votes

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.

1
  • 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 3, 2014 at 2:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .