O'Reilly logo

Linux® Routing by Ron McCarty, Dee-Ann LeBlanc, Joe Brockmeier

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

route

The route command is the interface used to access the Linux kernel’s routing tables. The route command operates in three modes: display, add, and delete. When used to add or delete routes from the routing table, its use is generally limited to adding and removing static route entries.

Using route to Display Routing Information

When route is used with no parameters, the route command prints the routing table to stdout:

[root@lefty /root]# route 
Kernel IP routing table 
Destination     Gateway         Genmask          Flags Metric Ref    Use Iface 
Lefty           *               255.255.255.255  UH    0      0        0 eth0 
192.168.1.0     *               255.255.255.0    U     0      0        0 eth0 
127.0.0.0       *               255.0.0.0        U     0      0        0 lo 
default         192.168.1.1     0.0.0.0          UG    0      0        0 eth0 

The Destination column when combined with the Genmask, which is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required