Address comparison

The destination address and the local network address are compared by performing the logical AND and exclusive OR on the subnet mask of the source host.

The comparison process is outlined below:

  1. Perform a logical AND of the destination address and the mask of the local subnet address.
  2. Perform an exclusive OR on the result of the previous operation and the local net address of the local interface. If the result is all 0's, the destination is assumed to be reachable directly through one of the local interfaces.
  3. If an autonomous system has more than one interface (therefore more than one Internet address), the comparison process is repeated for each local interface.
For example, assume that there are two local interfaces defined for a host network, T125. Their Internet addresses and the binary representations of those addresses are shown in the following example:
CLASS A    =  01001001 00000001 00000101 00000010

CLASS B  =  10010001 00010101 00000110 00000011
The corresponding subnet masks for the local network interfaces are shown in the following example:
CLASS A    =  11111111 11111111 11100000 00000000

CLASS B  =  11111111 11111111 11111111 11000000

If the source network, T125, is requested to send a message to a destination network with the host address (represented in binary as: 01110010 00010000 00010111 00001000), the system checks whether the destination can be reached through a local interface.

Note: The subnetmask keyword must be set in the configuration database of each host that is to support subnets. Before the subnetwork capability can be used, all hosts on the network must support it. Set the subnet mask permanently in the configuration database using the Network Interface Selection menu in SMIT. The subnet mask can also be set in the running system using the ifconfig command. Using the ifconfig command to set the subnet mask is not a permanent change.