HP-UX LAN Administrator's Guide (July 2003)

DRAFT COPY Network Addressing
Variable-Length Subnet Addressing
Chapter 6 121
Variable-length subnet masks are assigned using the netmask parameter of the ifconfig
command, SUBNET_MASK in netconf with a 32-bit subnet mask indicated in dot notation,
or SAM. In the example below with a Class C IP address, the host portion has three types of
assigned bits: subnet number bits, growth bits, and host bits, with a chosen subnet mask that
allows for growth in both the host field and subnet field without a mask change.
Figure 6-12 Example of Variable-Length Subnet Mask
The example below shows how the bits might look in the host address portion of a Class C
address in a network with four subnets using variable-length subnetting. In this example “g”
stands for growth bits and “h” stands for host bits. The 0’s and 1’s in the host address are
assigned subnet numbers.
Table 6-8 Subnets with Variable-Length Subnet Mask
Subnet
Host Address
(Bits)
Subnet Mask
(Bits)
A 10gg gghh 1111 1100
B 01gg ghhh 1111 1000
C 110g ghhh 1111 1000
D 001g ghhh 1111 1000
11 111 11 111 11 1111 1111 111011111 000
subnet portion of host address
growth portion of host address
host portion of host address
Predetermined
boundary
Class C Subnet Mask:
network address
255 . 255 . 255 . 240