Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After reading this answer, I began my quest for the difference between ip and ifconfig for *nix systems. I soon learned that ip had "more" features than ifconfig, but what's the real difference? Is there any reason not to use ifconfig when it provides the functions I need? (E.g. security implications) Like to know since I'm an avid ifconfig user.

share|improve this question

2 Answers 2

up vote 9 down vote accepted

Simple answer: On Linux ifconfig is obsolete.

From man ifconfig:

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

share|improve this answer
    
But does that include negative side effects when using it? –  BloodPhilia Jan 30 '11 at 22:09
    
@BloodPhilia, if you are using some of the advanced iproute features, using ifconfig can mess them up. You would almost certainly know if you where using them. For the most part using ifconfig is safe. –  Zoredache Jan 30 '11 at 22:17
    
@zoredache Thanks –  BloodPhilia Jan 30 '11 at 22:19
1  
Can you please expand your answer and tell us why, what are the drawbacks, why it's superseded, et cetera? –  slhck Jul 18 '12 at 0:49
1  
This is clearly stated in man ifconfig: linux.die.net/man/8/ifconfig –  Andrejs Cainikovs Jul 18 '12 at 9:36

From Why iproute2?:

Most Linux distributions, and most UNIX's, currently use the venerable arp, ifconfig and route commands. While these tools work, they show some unexpected behaviour under Linux 2.2 and up. For example, GRE tunnels are an integral part of routing these days, but require completely different tools.

With iproute2, tunnels are an integral part of the tool set.

The 2.2 and above Linux kernels include a completely redesigned network subsystem. This new networking code brings Linux performance and a feature set with little competition in the general OS arena. In fact, the new routing, filtering, and classifying code is more featureful than the one provided by many dedicated routers and firewalls and traffic shaping products.

As new networking concepts have been invented, people have found ways to plaster them on top of the existing framework in existing OSes. This constant layering of cruft has lead to networking code that is filled with strange behaviour, much like most human languages. In the past, Linux emulated SunOS's handling of many of these things, which was not ideal.

This new framework makes it possible to clearly express features previously beyond Linux's reach.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.