HP-UX Reference (11i v1 00/12) - 5 Miscellaneous Topics, 7 Device (Special) Files, 9 General Information, Index (vol 9)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man7/!!!intro.7
________________________________________________________________
___ ___
r
routing(7) routing(7)
netmask is 255.255.254.0.
Supernets
A supernet is a collection of smaller networks. Supernetting is a technique of using the netmask to aggre-
gate a collection of smaller networks into a supernet. This technique is particularly useful for class C net-
works. A Class C network can only have 254 hosts. This can be too restrictive for some companies. For
these companies, a netmask that only contains a portion of the network part can be applied to the hosts in
these class C networks to form a supernet. This supernet netmask should be applied to those interfaces
that connect to the supernet using the ifconfig command (see ifconfig(1M)). For example, a host can
configure its interface to connect to a class C supernet, 192.6, by configuring an IP address of 192.6.1.1 and
a netmask of 255.255.0.0 to its interface.
Routing Algorithm
The routing table entries are of three types:
Entries for a specific host.
Entries for all hosts on a specific network.
Wildcard entries for any destination not matched by entries of the first two types.
To select a route for forwarding an IP packet, the network facilities select the complete set of "matching"
routing table entries from the routing table. A routing table entry is considered a match, if the result of the
bit-wise AND operation between the netmask in the routing entry and the IP packet’s destination address
equals to the destination address in the routing entry.
The network facilities then select from the set the routing entries that have the longest netmask. The
length of a netmask is defined as the number of contiguous 1 bits starting from the leftmost bit position in
the 32-bit netmask field. In other words, the network facilities select the routing entry that specifies the
narrowest range of IP addresses. For example, the host route entry that has a destination/netmask pair of
(147.253.56.1, 0xffffffff), is more specific than the network route entry that has a destination/netmask pair
of (147.253.56.0, 0xfffffe00), therefore the network facilities select the host route entry. The default route by
default has a destination/netmask pair of (0,0). Therefore the default route matches all destinations but it is
also the least specific. The default route will be selected only if there is not a more specific route.
There may still be multiple routing entries remaining. In that case the IP packet is routed over the first
entry displayed by
netstat -r. Such multiple routes include:
Two or more routes to a host via different gateways.
Two or more routes to a network via different gateways.
Two default routes.
A superuser can change entries in the table by using the route command (see route(1M), or by informa-
tion received in Internet Control Message Protocol (ICMP) redirect messages.
WARNINGS
Reciprocal
route commands must be executed on the local host and the destination host, as well as all
intermediate hosts, if routing is to succeed in the cases of virtual circuit connections or bidirectional
datagram transfers.
AUTHOR
routing was developed by the University of California, Berkeley.
FILES
/etc/hosts
/etc/networks
SEE ALSO
netstat(1), ifconfig(1M), route(1M).
HP-UX Release 11i: December 2000 4 Section 7107
___
___