The default route has a netmask of zero bits, and in the configuration presented above, the locally attached networks have a 24-bit netmask. If a datagram matches a locally attached network, it will be routed to the appropriate device in preference to following the default route because the local network route matches with a greater number of bits. You can build routing tables by a variety of means. Depending on the size of the network, you'll need to use different routing protocols. We depend on dynamic routing to choose the best route to a destination host or network based on the number of hops .
Hops are the gateways a datagram has to pass before reaching a host or network.
The shorter a route is, the better RIP rates it. Very long routes with 16 or more hops are regarded as unusable and are discarded. RIP manages routing information internal to your local network, but you have to run gated on all hosts. At boot time, gated checks for all active network interfaces. Otherwise, it will only passively receive RIP updates and update the local routing table.