Unix: More networking basics for the beginner

The ifconfig command doesn't suck; it's just not as cool or sophisticated as ip.

March 24, 2014, 3:59 PM — While the ifconfig command is still available and useful on most if not all Unix/Linux systems today, it is now deprecated
on many Linux distributions. That word, which doesn't appear to be
popularly used in any context other than in reference to Unix commands,
simply means that the command has lost favor and will eventually be
phased out -- though not necessarily any time soon. The command that
has taken ifconfig's place is ip. While the ip command has numerous options and is considered more powerful than ifconfig, the ip commands you are likely to use are not difficult to learn or remember. There's just a lot more of them.
To see the same type of information that ifconfig will show you, the command to use is ip addr.
In this example, the system is using a bonded interface, basically
allowing it to aggregate multiple NICs to achieve a higher data rate.
The interface to pay attention to is, therefore, the bond0 interface.

Once you get comfortable with the ip addr command, you might prefer to abbreviate it to ip a. And, if you just want to see only the IPv4 or the IPv6 information, you can add an option and use the command ip -4 a or ip -6 a,
limiting command's the output to one or the other. You can also limit
the command's response to a particular interface by using a command such
as ip a show bond0.

As you can see, much of the information provided by the ip command is the same as what you'd see with ifconfig -- the IP and MAC addresses, and the "UP" indicator showing that the interfaces are working. The ip link or ip l command shows a briefer display, but does not include the
IP addresses.

The ip n show command ("n" for "neighbor") displays the kind of network information you would expect to see with a command such as arp -a. In other words, it shows information about other systems that have recently connected to your system. You can also use ip n ls.

For per protocol statistics, use the netstat -s command ("s" for
"statistics"). This command provides very detailed network information
-- likely more than you will need to look at very often, but extremely
useful for heavy duty troubleshooting.

Wrap up: You'll probably be comfortable with using ip commands long before ifconfig disappears from your servers, but why wait? Even people like me who have been typing ifconfig for decades can learn some new tricks