2

In the routing table output by route, What do a network route and a host route look like? From https://www.cyberciti.biz/faq/what-is-a-routing-table/

Network Route: A route (path) to a specific Network ID in the internetwork.

Host Route : A route to a specific internetwork address (Network ID and Host ID). Host routes allow intelligent routing decisions to be made for each network address. Host routes are used to create custom routes to control or optimize specific types of network traffic.

Are a network route and a host route related to flag:

  • H (target is a host)

  • G (use gateway)?

Are a network route and a host route related to whether the next hop is a gateway or a local network interface?

Thanks.

1
  • This is under the context of understanding the usage of route command. If this question is posted on networkingengineering.se, it will be closed as OS specific. They want nothing about OS, user programs, or application level.
    – Tim
    Mar 27 '19 at 11:01
3

A "host route" is route to a single host, a "network route" is route to a network of more than one host. The only difference is really the netmask of the target. 192.168.1.0/32 is only one address, so a route to it is a host route; but 192.168.1.0/24 is a block of 256 addresses, and a route to it is a network route.

That's completely orthogonal to if the next hop is a local network interface, or one reached by a gateway.

(Though any locally connected network would probably have more than one address, so you might as well have a route for the whole network. Point-to-point links might be an exception, of course.)

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.