Library Table of Contents Index Previous Next Comments

Modifying the routing table

About modifying the routing table  Top

The route command enables you to add or delete a specific route for a host or a network in the routing table.

Cluster considerations  Top

In takeover mode, Data ONTAP maintains the routing table on each filer in the cluster. You can make changes to the routing table of the takeover filer, or you can make changes to the routing table on the filer in partner mode using the route command. However, the changes you make in partner mode are lost after a giveback.

Modifying the routing table  Top

To modify the routing table, complete the following step.

Step

Action

1

Enter the following command:

route [ -fn ] add|delete [ host|net ] destination 
[gateway [ metric ]] 

Use the following table for explanations about the options and parameters used in the command.

Option/Parameter

Description

-f

Removes all gateway entries in the routing table. If this is used in conjunction with one of the commands, route removes the entries before performing the command.

-n

Prints the IP address (numeric) of a host or a network rather than the host name or network name.

add|delete

Adds or deletes the specific route for the given destination in the routing table.

host|net

Routes to a particular host are distinguished from those to a network by interpreting the IP address associated with the destination. The optional keywords host and net force the destination to be interpreted as a host or a network, respectively.

If the host and net keywords are not specified and the destination IP address (specified in the dot decimal notation) has a host part of 0, or if the destination is the symbolic name of a network, the route is assumed to be to a network; otherwise, it is assumed to be to a host.

destination

Specifies the destination for which the route is being added or deleted. The destination can be a specific host or a network.

The netmask for a route to a network is implicitly derived from the class of the network. To override this, the destination for a network route can have /bits or &mask after it, where bits is the number of high-order bits to be set in the netmask, and mask is the netmask (either as a number that defaults to decimal, preceded with 0x for hexadecimal or with 0 for octal, or as an IP address in dot decimal notation).

All symbolic names specified for a destination are looked up as a host name in the /etc/hosts database. If the lookup fails, the name is looked up as a network name in the /etc/networks database. The keyword default is also a valid destination. The default destination is used if there is no specific host or network route.

gateway

Specifies the next-hop gateway to which packets should be forwarded for the corresponding destination.

metric

The metric option indicates the number of hops to the destination. The metric option is required for the add command; it must be zero if the destination is on a directly attached network, and nonzero if the route is through one or more gateways.

A metric of zero implies that the route does not refer to a gateway, but rather to one of the machine's interfaces. Destinations matching such a route are sent out on the interface identified by the gateway address.

Library Table of Contents Index Previous Next Comments