Information Technology Reference
In-Depth Information
255.255.255.255 255.255.255.255 223.1.1.128 223.1.1.128 1
Default Gateway: 192.168.2.1
===========================================================================
Persistent Routes:
None
In the preceding output, the entry that has both a network destination and a netmask of
0.0.0.0 and a metric of 1 represents the default static route. All data to routes not otherwise
specified in the routing table will be directed through the gateway of 192.168.2.1 .
A common use of route print is to create a static route with parameters similar to the
following:
Destination network: 192.168.100.0
￿
Destination subnet: 255.255.255.0
￿
Gateway: 192.168.0.10
￿
￿Metric: 2
Use the following command to add this route.
> route add 192.168.100.0 mask 255.255.255.0 192.168.0.10 metric 2
Or, use the delete command to remove the static route to the 192.168.100.0 network:
> route delete 192.168.100.0
How It Works
Add static routes to the IP routing table when you need to connect with a nonlocal network
through a router that is not also the default gateway. One very common scenario is an organi-
zation that has a connection to the Internet but also a separate connection (gateway) to a
branch office. Create a static route to the branch office so that workstations will be able to
access resources at that site.
Line entries in the routing table fall into one of three categories:
￿
Network route: Specifies the path to a particular network. This type of route is more
common than a host route.
￿
Host route: Specifies the path to a particular host, rather than to the entire network. Use
a host route when you need to optimize network performance.
￿
Default route: Provides a fallback when no routes are explicitly defined for the packets
being sent.
The metric value specified in the routing table entries are defined such that the route to a
particular destination will be selected based on the lowest metric value. For example, if two
routes exist for the same destination network, the route with the lower metric value will be
selected before that with the higher value.
Search WWH ::




Custom Search