0

I'm using arch-linux.

route and ip route give basically the same information to me.

But route takes much more time than ip route.

What is the reason?

  • different code? what exactly are you looking for in an answer? – MaQleod Mar 30 '14 at 7:39
  • Why route takes more time than ip route? – vfsoraki Mar 30 '14 at 7:40
  • 1
    That is like comparing apples to oranges. They are entirely different commands. If you're interested in what they're doing you can examine the source code or watch a truss or strace. ip route is meant to replace route, see here: serverfault.com/questions/523388/… – MaQleod Mar 30 '14 at 7:45
1

The difference is in age: ip, part of the iproute2 package, is newer and intended to replace older tools such as route.

The Linux Foundation explains:

Most network configuration manuals still refer to ifconfig and route as the primary network configuration tools, but ifconfig is known to behave inadequately in modern network environments. They should be deprecated, but most distros still include them. Most network configuration systems make use of ifconfig and thus provide a limited feature set. The /etc/net project aims to support most modern network technologies, as it doesn't use ifconfig and allows a system administrator to make use of all iproute2 features, including traffic control.

iproute2 is usually shipped in a package called iproute or iproute2 and consists of several tools, of which the most important are ip and tc. ip controls IPv4 and IPv6 configuration and tc stands for traffic control. Both tools print detailed usage messages and are accompanied by a set of manpages.

As documented by wikipedia, ip route is intended as the replacement for route while ip addr and ip link will replace ifconfig.

  • Thanks. I found than route -n is almost as fast as ip route. So it could be DNS or something (maybe?). Anyway, thankQ! – vfsoraki Mar 30 '14 at 8:07
  • 1
    @thelastblack Yes, route -n avoids DNS lookups. – John1024 Mar 30 '14 at 8:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.