3. Computer A compares its IP address to Computer B’s IP address
using the subnet mask, as shown in Figure 7.16. For clarity, I’ve
added a line to show you where the ones end and the zeroes begin
in the subnet mask. Computers certainly don’t need the pretty red
line!
Ah ha! Computer A’s and Computer B’s network ID match! It’s a
local call. Knowing this, Computer A can now send out an ARP
broadcast, as shown in Figure 7.17, to deter mine Computer B’s
MAC address.
The Address Resolution Protocol (ARP) is how TCP/IP networks
figure out the MACaddresses based on the destination IP address.
4.
5. Computer B responds to the ARP by sending Computer A an ARP
response (Figure 7.19). Once Computer A has Computer B’s MAC
address, it will now start sending packets.
But what happens when Computer A wants to send a packet to
Computer C? First, Computer A compares Computer C’s IP address to
its own using the subnet mask (Figure 7.20).
It sees that the IP addresses do not match in the ones part of the
subnet mask—the network IDs don’t match—meaning this is a long-
distance call.
6.
7. Whenever a computer wants to send to an IP address on another
LAN, it knows to send the packet to the default gateway. It still sends
out an ARP, but this time to the default gateway (Figure 7.21).
Once Computer A gets the default gateway’s MAC address, it then
begins to send packets.
Subnet masks are represented in dotted decimal just like IP addresses
—just remember that both are really 32-bit binary numbers.
All of the following (shown in both binary and dotted decimal
formats) can be subnet masks: