With the servers that mount Infiniband cards, when I use the ifconfig
command, I get this warning:
Ifconfig uses the ioctl access method to get the full address
information, which limits hardware addresses to 8 bytes.
Because Infiniband address has 20 bytes, only the first 8 bytes
are displayed correctly.
Ifconfig is obsolete! For replacement check ip.
Should I quit using ifconfig
? Is it deprecated in favor of the ip
command? Or will it be updated in the near future?
Note: This question and answers are in regards to GNU/Linux's "major" distributions. It should not be assumed that the information applies to all distributions, and especially not other OSes.
Quoting Thomas Pircher's website (cc-by-sa):
ifconfig vs ip
The command
/bin/ip
has been around for some time now. But people continue using the older command/sbin/ifconfig
. Let's be clear:ifconfig
will not quickly go away, but its newer version,ip
, is more powerful and will eventually replace it.The man page of
ip
may look intimidating at first, but once you get familiar with the command syntax, it is an easy read. This page will not introduce the new features of ip. It rather features a side-by-side comparison ififconfig
andip
to get a quick overview of the command syntax.Show network devices and configuration
Enable a network interface
A network interface is disabled in a similar way:
Yes,
ifconfig
is deprecated in favor of iproute2 (theip
command) on Linux.Similarly, the
arp
,route
andnetstat
commands are also deprecated.However, iproute2 is Linux specific, when some other Unixes use
ifconfig
, so it may help to know/remember how it works if you're ever going to use another Unix...To learn the "new way", I suggest you to look at those 3 links :
ip
when it does).According to the last link,
ifconfig
has not been maintained for +15 years:ifconfig
is deprecated for many years now, time to switch, especially in a case like yours.ip
has been the replacement forifconfig
for a while, probably at some pointifconfig
will update, however I wouldn't wait for it and learn to work withip
as well. Its supported on all linux distri's