168.0.0 255.255.0.0 168.0.1 TO 168.255.254UNDERSTANDING AN...

192.168.0.0 255.255.0.0 192.168.0.1 to 192.168.255.254

Understanding ANDing and Binary Numbering

Once we define our subnetworks, the machines will need to communicate with othermachines on the network.The determination of the host as a local or remote destination isderived by applying the subnet mask of the source host to the IP address of the destination.This process involves applying a Boolean logic method called ANDing. By ANDing thebinary representation of an address and a subnet mask, the IP layer can determine if theaddress is on the same logical network or a different one.In Table 3.5, we have a source and a destination host address. First, the subnet mask isapplied to the source address using Boolean AND logic.To perform the AND operation,start from the left and compare each bit in the binary numbers representing the IP addressand the subnet mask. If both are 1 (1 AND 1), then the result is 1; otherwise, the result is 0.After the comparison is performed with each address, if the resulting binary values areequal, then the addresses are on the same network; if they are not equal, then they are ondifferent logical networks.

Table 3.5

Applying the Subnet Mask to IP AddressesSource IP Address 172.16.5.16 Destination IP Address 172.16.2.251Subnet Mask 255.255.254.0 Subnet Mask 255.255.254.0