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)
Wildcard route through a remote host gateway>0 default UG
Subnets
The network facilities support variable-length subnetting. An Internet address is made up of a network
address portion, and a host address portion of an address of the form:
192.34.17.0
Subnet addresses are defined as a portion of the network’s Internet address. This scheme provides for:
Network addresses that identify physicallydistinct networks.
Subnet addresses that identify physicallydistinct subnetworks of the same network.
A network manager can subdivide the Internet address of the local network into subnets using the host
number space. This facility allows several physical networks to share a single Internet address.
To allow for this, three Internet classes are defined, each accommodating a different amount of network
and host addresses. The address classes are defined by the most significant bit of the binary form of the
address.
The following table lists the number of networks, nodes, and the address ranges for each address class:
Nodes per
Class Networks Network Address Range
A 127 16777215 0.0.0.1 - 127.225.225.254
B 16383 65535 128.0.0.1 - 191.255.255.254
C 2097151 255 192.0.0.1 - 223.244.244.243
Reserved 224.0.0.0 - 255.255.255.255
The first 8 bits of a Class A network has network space for only 127, while accommodating the largest
number of nodes possible among the classes defined. A single class B network has the network address lim-
itation of 16 bits, and 16 bits to define the nodes.
For example, a Class C address space is as follows:
Indicates Class C
Class C subnet
networks portion
||
___ ___
10000000.00000110.00000001.11100001
__________________________ ________
||
Network Address Host
= 192.6.1 Address
=1
A subnet for a given host is specified with the ifconfig command (see ifconfig(1M)), using the netmask
parameter with a 32-bit subnet mask.
The default masks for the three 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
An example Class C network number is 192.34.17.0. The last field specifies the host number. Thus, all
hosts with the prefix 192.34.17 are recognized as being on the same logical and physical network.
If subnets are not in use, the default mask used is 255.255.255.0.
If subnets are used and the 8-bit host field is partitioned into 3 bits of subnet and 5 bits of host as in the
above example, then the subnet mask would be 255.255.255.192.
If a host has multiple interfaces, then it can belong to different subnets. Unlike the past releases, the sub-
nets can have different sizes even if they may have the same network address. This is accomplished by
using a different netmask on each of the host interfaces. For example, the lan1 and lan2 interface shown in
the netstat tables above are connected to two distinct subnets of the same network, 147.253. The subnet
that lan1 belongs to can have at most 14 hosts, because its netmask is 255.255.255.240. Note, the host por-
tion of those IP addresses in the subnet cannot be all 1’s or all 0’s, therefore this subnet cannot support 16
hosts, but only 14 hosts instead. The subnet that lan2 belongs to can have up to 510 hosts, because its
Section 7106 3 HP-UX Release 11i: December 2000
___
___