what's the difference between "ip a" and "ifconfig" under SUSE 11

3

1

I found the output of the two commands are different and it seems that "ip a" will list more interface's infomation that ipconfig, so the simple question is why? from my understanding, "ip a" is just kind of alias for ifconfig.

HaiYuan Zhang

Posted 2011-10-25T21:56:29.780

Reputation: 3 239

Answers

2

ip from iproute2 is intended to be a replacement for the older ifconfig, route and arp net-tools programs, providing a more consistent interface. It also supports various new features not supported by net-tools such as policy routing, multiple IPv4 addresses per interface (without the need for :aliases), or CIDR instead of subnet masks. (As far as I know, net-tools haven't been maintained since 2001.)

user1686

Posted 2011-10-25T21:56:29.780

Reputation: 283 655

0

They're very similar commands. The exact sets of information they list is not precisely the same. ifconfig, for example, lists packet counts. ip a, for example, lists IPv4 addresses not associated with aliases.

David Schwartz

Posted 2011-10-25T21:56:29.780

Reputation: 58 310

ip -stat link lists packet counts. – user1686 – 2011-10-25T23:40:17.217

0

ifconfig is just to configure an interface, while ip can additionally set routes, tunnels, monitor an interface and more. Compare man ifconfig with man ip.

ott--

Posted 2011-10-25T21:56:29.780

Reputation: 1 911