Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm used to using commands such as ifconfig, route and so forth on linux to check and change network information. However I know there is an ip command (with various subcommands). I heard somewhere this is 'The right way' now. Any particular reason why I should ditch ifconfig/route/etc? What's your preference? Is there anything one set can do that the others can't?

share|improve this question
    
Found a quick comparison for the basic tasks here: tty1.net/blog/2010-04-21-ifconfig-ip-comparison_en.html –  user88113 Jul 19 '11 at 13:15

4 Answers 4

up vote 9 down vote accepted

i think you cannot access more advanced iproute2 features [ for instance multiple routing tables, routing based on src address or filter ] using ipconfig+route.

for me syntax of ip is much more logical and easier to use.

share|improve this answer

The command ip belongs to the collection of utilities called iproute2.

Their manifesto:

Most network configuration manuals still refer to ifconfig and route as the primary network configuration tools, but ifconfig is known to behave inadequately in modern network environments. They should be deprecated, but most distros still include them. Most network configuration systems make use of ifconfig and thus provide a limited feature set. The /etc/net project aims to support most modern network technologies, as it doesn't use ifconfig and allows a system administrator to make use of all iproute2 features, including traffic control.

In short it combines a number of different legacy interfaces and provides access to newer features such as policy based routing. With the benefit of a more consistent command set.

share|improve this answer
1  
And the disadvantage of a command set that most people don't already know. Unless you need features only in iproute, or are likely to, you're as well staying with route/ifconfig. –  Cian Jul 17 '09 at 9:58
1  
True. Quite whether net-tools will ever be truly deprecated seems open for interpretation. I would say go with whatever your distro favours though. That way you won't be shocked if net-tools does disappear and you can avoid instances such as ifconfig ignoring interface addresses that were administered with ip addr. –  Dan Carley Jul 17 '09 at 10:21
    
ifconfig and route (and netstat) are not going to ever go away as long as UNIX as a whole continues to use them: variants from Solaris to HP-UX to AIX and beyond are still using these tools, and they are available on non-UNIX systems such as Windows. The ip utility - though quite nice - is only available on Linux. –  Mei Jul 17 '09 at 18:22

iproute will eventually supersede ifconfig et al. currently there is little difference, but the syntax of ip is (at least for me) way more readable.

share|improve this answer

ifconfig and route are available on all Unixes under the sun (oh oh oh) since 1985 or so (and even on non-unixes, route exists under windows too). ip is overall better, but still uncommon except on recent linux distros. So what? know both ways and hope that everyone will switch to ip soon :)

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.