|
|
If there are only one or two routers connected to a local network, you can make clients direct all outward bound packets to one router. This is known as the default route. When this router receives packets which it needs to redirect to another router on the same subnet, it sends ICMP routing-redirect messages to the source host. This allows the hosts to adjust their routing tables dynamically so that they will subsequently use the correct router.
This approach yields a limited advantage in terms of performance over running a routed or gated routing daemon on each host, but it is unsuitable in an environment where subnets are only connected by bridges. This is because bridges do not generate ICMP routing-redirect messages. Further, if the default route goes down, there is no way to maintain service except to alter the routing tables on each host manually using the route(1Mtcp) command.
You can also use the route to prime the hosts' routing tables with static routes. Once you do this, you no longer have dynamic routing. This may not be the best choice if it is possible that you may add other routers or change the network topology in the future.
To specify a default route:
sort-key:/usr/sbin/route::y::add default router:Substitute the IP address or host name of the router on your local network for router. Ensure that the flag field contains the value ``y'' to enable the entry.
sort-key:/usr/sbin/in.routed:/usr/sbin/in.gated:n:::
If your client is on the eng network, the entry for /usr/sbin/route in its /etc/inet/config file would be:
sort-key:/usr/sbin/route::y:add default jekyll:If your client is on the mktg network, the entry in /usr/sbin/route would be:
sort-key:/usr/sbin/route::y:add default hyde:In both examples, the argument default indicates that all communication directed outside the local network from your client will be directed through the router.
If a host is on a local subnet that has more than one router, you may want to specify static routes that should be used.
For example, consider the networks shown in ``Choosing specific routers''.

Choosing specific routers
In this example, two routers, nile and cairo, are available on the local places network. Your system needs to communicate regularly with networks named rivers and cities. The router nile is directly connected to the rivers network and cairo is directly connected to the cities network. To specify explicitly the routes that traffic from your system should follow to these networks, you would add the following entries to /etc/inet/config:
sort-keya:/usr/sbin/route::y:add -hopcount 1 rivers nile: sort-keyb:/usr/sbin/route::y:add -hopcount 1 cities cairo:These entries set up your system so that it sends messages intended for different networks through different routers, rather than sending all traffic through the same router.
If all of your routes are statically defined in /etc/inet/config, you can disable the routed daemon entry in /etc/inet/config to improve system performance.
If the rivers network also contained one or more connections to other networks, such as the Internet, you could also add an entry for a default route:
sort-key:/usr/sbin/route::y:add default nile:This would handle traffic to all other networks. For more information, see route(1Mtcp).