How Subnet Masks are Used to Determine the Network Number
The router performs a set process to determine the network (or more specifically, the subnetwork)
address. First, the router extracts the IP destination address from the incoming packet and retrieves
the internal subnet mask. It then performs alogical ANDoperation to obtain the network number.
This causes the host portion of the IP destination address to be removed, while the destination
network number remains. The router then looks up the destination network number and matches it
with an outgoing interface. Finally, it forwards the frame to the destination IP address. Specifics
regarding the logical AND operation are discussed in the following section.