Linux Routing Table


$ route -n


  The -n option was used which to prevent route from converting IP addresses to hostnames for the routing table.


destination 

   the host, normally, this is a network, but as you'll see in the Flags field, it is possible to have a host-specific route.   

   for the default route, this field contains all zero(0.0.0.0)


gateway 

   If this field contains all zeros (0.0.0.0) or an asterisk (*), it means that the destination network is directly connected to this computer

   and that the "gateway" to that network is the computer's network interface


genmask 

   the bit mask applied to addresses to see if they match the destination address


flags 

    • U - this route is up and operational
    • H - this is a route to a specific host
    • G - gateway is external, directly connected networks do not have the G flag set; all other routes do
    • D - this was added dynamically by a routing protocol or an ICMP Redirect Message
    • A - this route was added during address configuration, it does not appear in the default routing table display
    • M - this route was modified by a dynamic routing protocol
    • ! - this route was marked as bad route

metric 

   the routing cost for this interface.   Normally, this field is zero (0) for routes directly connected networks.


Ref 

   show's the number of times the route was or has been referenced to establish a connection


Use 

   show's the number of times this route was looked up in the cache