Network and
Host Portions
IPv4
addresses have two parts: the network portion and the host portion. For each
IPv4 address, some portion of the most significant bits, or high-order bits, represents the net-work
address. At Layer 3, a network is defined as a group of hosts that have
identical bit patterns in the network address portion of their addresses. That
is, all the bits in the network portion of their addresses are identical.
In
the following example, the two addresses have identical network portions.
Therefore, hosts assigned these two addresses would be on the same logical
network:
172.16.4.20 172.16.4.32
network
host network host
portion portion portion portion
Although
all 32 bits define the IPv4 host address, a variable number of bits represent
the host portion of the address. The number of bits used in this host portion
determines the number of hosts within the network. In the previous example, the
last octet, the lowest 8 bits, are the host portion. This means that the bits
for the upper three octets represent the network portion.
You
determine how many bits are required for the host portion based on the number
of hosts that a network requires. If a particular network requires at least 200
hosts, you would need to use enough bits in the host portion to be able to
represent at least 200 different bit patterns. To assign a unique address to
200 hosts, you would use the entire last octet. With 8 bits, a total of 256
different bit patterns can be achieved. As with the previous example, this
means that the bits for the upper three octets represent the network portion.
Calculating the number of hosts and determining which portion of the 32 bits of
an IPv4 address refers to the network portion will be covered in the section
“Calculating Network, Hosts, and Broadcast Addresses,” later in this chapter.
Tidak ada komentar:
Posting Komentar