![]() Each one is a combination of leading ones and trailing zeros. That is why there are only 32 possible values for the network mask. The 1s in the subnet mask identify the IP address's network portion, while the 0s identify the host portion. ![]() When we look at the binary subnet mask, we see that it is made of leading consecutive 1s and then consecutive 0s up to 32 bits. However, routers and switches work with the network mask in binary. We, humans, are used to working with subnet masks represented in decimal numbers, such as: 255.255.255.0 The subnet mask, referred to as the netmask or the network mask, is a 32-bit binary number of consecutive ones that separates an IP address into a network and host portions. Ok, now let's see what exactly is the subnet mask. In the example shown in figure 2, PC1 knows the boundaries of its network (based on the mask) and knows it has to send the packets to its default gateway. Using the mask, PC1 now knows which hosts are on the same network and which are not, as illustrated in figure 2 below. That's where the Subnet Mask comes into the picture. Without knowing the network boundaries, PC1 does not know which process to follow and how to communicate with remote hosts. The router examines the destination IP address and forwards the packet to the appropriate network based on its routing table. It then sends the packets to the default gateway router. When a host on a network sends an IP packet to a host on another network, it uses ARP to resolve the default gateway's MAC address. On the other hand, communication between networks involves IP routing.The LAN switches simply forward the frames based on the destination MAC address. When a host sends a packet to another host on the same network, it uses ARP to resolve the target host's MAC address and directly sends ethernet frames destined for the remote host. Within a network, communication is handled through LAN switches.Recall that there is a major difference when hosts communicate within the same network or between different networks. How would PC1 know whether PC2 is on the same network or not? How would PC1 even know to which network it belongs? Figure 1. Imagine a world where there is no subnet mask alongside IP addresses, as illustrated in figure 1 below. To really understand IP subnetting, you need to have a good understanding of the function of the mask. In short, subnetting is all about the network mask. In this lesson, we will see why we need the netmask and its role in the subnetting process. In the first lesson of this course, we saw why we need subnetting in the first place.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |