ROUTING(4) Series 300 Only ROUTING(4)
NAME
routing - system support for local network packet routing
HP-UX COMPATIBILITY
Level: HP-UX/NON-STANDARD
Origin: UCB
Remarks: Implemented on the Series 300 only.
DESCRIPTION
The network facilities provide general packet routing,
leaving most routing table maintenance to applications
processes.
A simple set of data structures comprise a ``routing table''
used in selecting the appropriate remote host or gateway
when transmitting packets. This table contains a single
entry for each route to a specific network or host. The
table is maintained in the kernel and is created upon
execution of the npowerup(1) command and may be changed
either by the super-user, through the route(1m) command, or
by information received in Internet Control Message Protocol
(ICMP) redirect messages. When the network is powered up
the table is created from entries in the /etc/gateways file
(see gateways(5)).
The routing table may be displayed by using the netstat(1)
command with the -r option. This command will display the
destination internet address, the gateway to use to get to
that destination, and flags. Routing table entries come in
three flavors: for a specific host, for all hosts on a
specific network, for any destination not matched by entries
of the first two types (a wildcard route). The various
types of routes are determined by the flags field of the
display from netstat. The flags field will be either UG or
UGH. The UG flags indicates a route to a network, unless
the destination is the keyword, default, which signifies the
wild card gateway. If the flags include `H', then the route
is to a specific host. Routes that are not valid are not
displayed.
The routing table is used when a connection is being created
and the network number of the specified remote host does not
match a network to which the local host is directly
connected. The routing table is examined to attempt to find
a route to the host. An attempt is first made to find a
route to the specific host. If that search fails the
algorithm looks for a route to the host's network. If both
searches fail, the wildcard gateway is returned, if one is
in the table. If all of the searches fail, there is an
attempt to locate the host on a network directly connected
Hewlett-Packard - 1 - (printed 7/16/86)
ROUTING(4) Series 300 Only ROUTING(4)
to the local host in the event that it is present, but has a
network number unknown to the local host.
The routing algorithm used includes the notion of subnets.
Subnets allow a network manager to partition the host number
space of a given network number into discrete subnetworks.
This facility is desirable if it is necessary for several
physical networks to share a single network number. An
example is a facility with a single class B network number
and several Ethernet-like physical networks. The host space
of a class B address is 16 bits, while a single physical
network may have a limitation of 200-300 hosts. If subnets
are used it is possible for all of the networks to have the
same network number while each host recognizes that another
host with the same network number is not necessarily on the
same physical network. The routing algorithm will attempt
to find a gateway for a host if it is not on the same
subnet, although it may have the same network number.
The subnet for a given host is specified in the npowerup(1).
command. It is specified as a 32-bit subnet mask. The next
paragraph outlines an example use of subnets.
An example class C network number is 192.34.17.0, with the
last field specifying the host number. Normally all hosts
with the prefix 192.34.17 will be recognized as being on the
same logical and physical network. If subnets are not in
use, the default mask used will be 255.255.255.0. When
routing, bitwise ``ands'' are performed between the mask and
the internet address of the remote host, and between the
mask and the local internet address. If the result is non-
zero, then it is assumed that the remote host is on the same
subnet as the local host. If subnets are to be used, and
the 8-bit host field is to be partitioned into 2 bits of
subnet and 6 bits of host, the subnet mask would be
255.255.255.192. Note that a subnet mask of all zeroes will
cause the routing mechanism to assume that all hosts,
whether local or remote, are on the local physical network.
If a subnet mask is not specified in the npowerup(1)
command, the default mask that indicates that subnets are
not in use is used. The default masks for the various
classes of internet addresses are as follows:
Class A: 255.0.0.0
Class B: 255.255.0.0
Class C: 255.255.255.0
Once the subnet mask is specified it cannot be changed until
the system is rebooted and the network again powered up.
SEE ALSO
Hewlett-Packard - 2 - (printed 7/16/86)
ROUTING(4) Series 300 Only ROUTING(4)
npowerup(1), netstat(1), route(1m).
Hewlett-Packard - 3 - (printed 7/16/86)