Network Routes and Host Routes Explained

When you assign an IP address to a router's interface, the router automatically adds two routes to the routing table. These routes are the network and host routes.

A network route represents an IP subnet. An IP subnet is a group of IP addresses. The subnet mask of an IP subnet tells the number of IP addresses it represents. A host route belongs to a single IP address.

Each IP address belongs to an IP subnet. Each IP subnet has a network address. The router adds the IP address's IP subnet's network address to the routing table. In the routing table, these routes are called directly connected network routes. In other words, all directly connected network routes are the network routes. The router also adds the IP addresses of interfaces to the routing table. In the routing table, these routes are called local host routes. In other words, all local host routes are the host routes.

The router uses the following process to add the directly connected network and local host routes from an interface's IP configuration.

  • It reads the IP configuration of the interface.
  • It changes the configured subnet mask to /32 and adds the IP address as the local host address to the routing table.
  • It finds the IP subnet of the configured IP address and adds the network address of the IP subnet to the routing table as the directly connected network route.

Let us take an example. Suppose you assign the IP address 20.0.0.1/8 to GigabitEthernet0/0 on a router. This IP address belongs to the IP subnet 20.0.0.0/8. The network address of this subnet is 20.0.0.0/8. The router adds the 20.0.0.0/8 as the directly connected route. It adds 20.0.0.1/32 as the local route. It uses the subnet mask /32 for the locally configured host addresses in the routing table. In this example, 20.0.0.0/8 is a network route, and 20.0.0.1/32 is the local route. You can verify it by viewing the routing table entries. Use the show ip route command to view the routing table entries.

network and host routes

In addition to GigabitEthernet0/0, the router has two other interfaces: GigabitEthernet0/1 and GigabitEthernet0/2.
The IP address of the GigabitEthernet0/1 is 192.168.0.6/30. The router adds this as the local host address (192.168.0.6/32) to the routing table. It belongs to the IP subnet 192.168.0.4/30. The network address of this IP subnet is 192.168.0.4/30. The router adds this address as the directly connected network route (192.168.0.4/30).
The IP address of the GigabitEthernet0/2 is 192.168.0.9/30. The router adds this as the local host address (192.168.0.9/32) to the routing table. It belongs to the 192.168.0.8/30 IP subnet. The network address of this IP subnet is 192.168.0.8/30. The router adds this address as the directly connected network route (192.168.0.8/30).

Routers use the host routes to reach locally configured IP addresses. You can use the subnet masks to identify network and host routes in the routing table. If a route in the routing table has a subnet mask in the range /8 to /30, it is a network route. The valid subnet mask range for network routes is /8 to /30. A host route always uses the subnet mask /32. If a route in the routing table has the subnet mask /32, it is a host route.

Differences between network and host routes

The following table compares the network and host routes and lists their differences.

Network routes Host routes
A network route belongs to an IP subnet. A host route belongs to a single IP host.
Routing protocols add only network routes to the routing table. Routing protocols do not add host routes to the routing table.
A network route can have any subnet mask value in the range 8-30 in slash notation. A host route always has a subnet mask value /32 in slash notation.
In decimal notation, it can have any subnet mask from 255.0.0.0 to 255.255.255.252. In decimal notation, it always has the subnet mask 255.255.255.255.
Routers use it to forward data packets. Routers use it to accept remote connections.

This tutorial is part of the tutorial series "Routing Table Updating Methods and Route Types". Other parts of this series are the following.
Chapter 1  The show ip route command on Routers
Chapter 2  Routing Table Updating Methods
Chapter 3  Directly Connected Routes and Local Routes
Chapter 4  Static and Floating Static Routes Explained
Chapter 5  Static and Dynamic routes in the Routing table
Chapter 6  Default Route in the Routing Table
Chapter 7  Network Routes and Host Routes Explained
Chapter 8  CCNA Exam Practice Question with Answer 1

Conclusion

A routing table can have many types of routes. This tutorial explained the directly connected network and local host routes and listed their differences.

ComputerNetworkingNotes CCNA Study Guide Network Routes and Host Routes Explained

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com