Besides using the appropriate subnet masks, each gateway needs
to be configured so that it can properly route messages among the
several subnetworks. Following are descriptions of two types of
routing: explicit routing and dynamic routing. When using explicit
routing, you must specify the IP address of each gateway to which
you are directly connected. When using dynamic routing, you need
to specify only the IP address of one gateway, and the system learns
the IP address of other gateways from the specified gateway.
Explicit Routing |
 |
There are many ways to set up routing. For example, you might
use the route(1M) command or you may add the following entries to
the netconf file on Host A in Figure 6-9 “Network Map I”:
ROUTE_DESTINATION[0]="net 192.6.12.128" ROUTE_GATEWAY[0]="192.6.12.36" ROUTE_COUNT[0]="1" |
ROUTE_DESTINATION[1]="net 192.6.12.96" ROUTE_GATEWAY[1]="192.6.12.34" ROUTE_COUNT[1]="1" |
ROUTE_DESTINATION[2]="net default" ROUTE_GATEWAY[2]="192.6.12.35" ROUTE_COUNT[2]="1" |
The 1 in each ROUTE_COUNT entry specifies an indirect route.
For example, messages for the system on the 192.6.12.128 subnetwork
will first be sent to Host B (192.6.12.36), and from there they
will be forwarded to the destination system.
Dynamic Routing |
 |
Alternatively, and perhaps the easiest way to manage growth
on the 192.6.12 network, you might add the following entries to
each netconf file.
Hosts A, B and C:
ROUTE_DESTINATION[0]="default" ROUTE_GATEWAY[0]="192.6.12.35" ROUTE_COUNT[0]="1" |
Host D (Site gateway):
ROUTE_DESTINATION[0]="net 192.6.12.64" ROUTE_GATEWAY[0]="192.6.12.33" ROUTE_COUNT[0]="1" |
ROUTE_DESTINATION[1]="net 192.6.12.128" ROUTE_GATEWAY[1]="192.6.12.36" ROUTE_COUNT[1]="1" |
ROUTE_DESTINATION[2]="net 192.6.12.96" ROUTE_GATEWAY[2]="192.6.12.34" ROUTE_COUNT[2]="1" |
ROUTE_DESTINATION[3]="default" ROUTE_GATEWAY[3]="192.6.20.1" ROUTE_COUNT[3]="0" |
If you add a new subnetwork to the Facility LAN at a later
time, you will need to add only an appropriate routing entry on
Host D. It will not be necessary to configure the other subnet gateways
A, B, and C.
With this configuration, each subnet gateway (Hosts A, B,
and C) will initially route messages for a system outside its subnet
to Host D. The subnet gateway, however, will learn of the more direct
routes automatically when Host D redirects the messages to one of
the other subnet gateways. Subsequent messages for the destination
system will be routed directly to the appropriate subnet gateway.
For example, referring to Figure 6-9 “Network Map I”, suppose messages are sent from system A1 (192.6.12.67)
to system B1 (192.6.12.131). The first message will actually be
routed to Host D (through Host A). Host D then will redirect the
message through Host B. At the same time, Host D will notify Host
A that Host B is a more direct route for messages to system B1.
Subsequent messages to system B1 will be routed directly from Host A
to Host B.
Redirected routes are called dynamic routes. You can see these
dynamic routes by executing the command netstat -r on Host A. Dynamic routes are indicated in the
display by a D flag.
Proxy ARP Server |
 |
The default direct route entry on Host D assumes that there
is a proxy ARP server on the 192.6.20 network. If one does not exist,
additional indirect route entries can be configured for each gateway
that is directly connected to the 192.6.20 network.
For example, referring to Figure 6-9 “Network Map I”, you might add the following indirect routes on Host
D to send messages to Division 2 and Division 3.
ROUTE_DESTINATION[4]="net 192.6.14" ROUTE_GATEWAY[4]="192.6.20.2" ROUTE_COUNT[4]="1" |
ROUTE_DESTINATION[5]="net 192.6.13" ROUTE_GATEWAY[5]="192.6.20.3" ROUTE_COUNT[5]="1" |