Adhering to a fixed network ID size ultimately limits the number of hosts a network caninclude. For example, leasing an entire Class C network of addresses gives you only 254usable IPv4 addresses. In addition, using classful addressing makes it difficult to separatetraffic from various parts of a network. As you have learned, separating traffic offers manypractical benefits. For example, if an organization used an entire Class B network ofaddresses, it could have up to 65,534 hosts all on one network segment. Imagine thechallenges involved in managing such a highly populated network, not to mention the poorperformance that would result. In 1985, because of the difficulty of managing a wholenetwork class of addresses and the dwindling supply of usable IPv4 addresses, computerscientists introduced subnetting.IPv4 Subnet Masks Subnetting depends on the use of subnet masks to identify how anetwork is subdivided. A subnet mask indicates where network information is located in anIPv4 address. The bits in a subnet mask that are assigned the number 1 indicate thatcorresponding bits in an IPv4 address contain network information. The bits that areassigned the number 0 indicate that corresponding bits in an IP address contain host information. For example, a subnet mask of 11111111 11111111 11111111 00000000, or255.255.255.0 in dotted decimal notation, indicates that the first three octets of all IPaddresses belonging to that subnet will contain network information. The last octet willcontain host information. As you have learned, 255.255.255.0 is the default subnet maskfor Class C IPv4 addresses.Each network class is associated with a default subnet mask, as shown in Table 9-1. Forexample, by default, a Class A address’s first octet (or 8 bits) represents networkinformation and is composed of all 1s. That means that if you work on a network whosehosts are configured with a subnet mask of 11111111 00000000 00000000 00000000, or255.0.0.0, you know that the network is using Class A addresses. Furthermore, you cantell that the network is not using subnetting because 255.0.0.0 is the default subnet maskfor a Class A network. If the network had been subnetted, the subnet mask would bemodified.To calculate a host’s network ID given its IPv4 address and subnet mask, you follow a logical process of combining bits known asANDing. In ANDing, a bit with a value of 1 plusanother bit with a value of 1 results in a 1. A bit with a value of 0 plus any other bit resultsin a 0. If you think of 1 as “true”and 0 as“false,”the logic of ANDing makes sense.
đang được dịch, vui lòng đợi..