3

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. Commented Mar 27, 2019 at 11:01

1 Answer 1

4

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.)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.