ip versus ifconfig

21

Depois de ler this resposta, comecei minha busca pela diferença entre ip e ifconfig para sistemas * nix. Logo aprendi que ip tinha "mais" recursos que ifconfig , mas qual é a diferença real? Existe alguma razão para não usar ifconfig quando ele fornece as funções que eu preciso? (Por exemplo, implicações de segurança) Gostaria de saber, já que sou um usuário ávido de ifconfig .

    
por BloodPhilia 30.01.2011 / 22:25

2 respostas

11

Resposta simples: no Linux ifconfig é obsoleto.

De man ifconfig :

This program is obsolete! For replacement check ip addr and ip link. For statistics use ip -s link.

    
por 30.01.2011 / 22:56
18

De Por que razão iproute2? :

Most Linux distributions, and most UNIX's, currently use the venerable arp, ifconfig and route commands. While these tools work, they show some unexpected behaviour under Linux 2.2 and up. For example, GRE tunnels are an integral part of routing these days, but require completely different tools.

With iproute2, tunnels are an integral part of the tool set.

The 2.2 and above Linux kernels include a completely redesigned network subsystem. This new networking code brings Linux performance and a feature set with little competition in the general OS arena. In fact, the new routing, filtering, and classifying code is more featureful than the one provided by many dedicated routers and firewalls and traffic shaping products.

As new networking concepts have been invented, people have found ways to plaster them on top of the existing framework in existing OSes. This constant layering of cruft has lead to networking code that is filled with strange behaviour, much like most human languages. In the past, Linux emulated SunOS's handling of many of these things, which was not ideal.

This new framework makes it possible to clearly express features previously beyond Linux's reach.

    
por 30.01.2011 / 22:59