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.
Best Answer
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: