In Figure 6-9, the addresses
between the network address of 10.0.0.0 and the broadcast address of 10.0.0.255
are the host addresses. This means that the addresses 10.0.0.1 to 10.0.0.254
can be assigned to the hosts in this logical network.
Network
Prefixes
When
you examine a network address, you might ask, “How do you know how many bits of
this address represent the network portion and how many bits represent the host
por-tion?” The answer is the prefix mask. When an IPv4 network address is
expressed, you add a prefix length
to the network address. This prefix length is the number of bits in the address
that gives the network portion. This prefix length is written in slash format. That is a forward slash (/)
followed by the number of network bits. For example, in 172.16.4.0 /24, the /24
is the prefix length. This tells you that the first 24 bits are the network
address. The remaining 8 bits, the last octet, are the host portion.
Networks
are not always assigned a /24 prefix. Depending on the number of hosts on the
network, the prefix assigned can be different. Having a different prefix number
changes the host range and broadcast address for each network. Notice that the
network addresses in Table 6-9 remain the same, but the host range and the
broadcast address are different for the different prefix lengths. You can also
see that the number of hosts that can be addressed on the network changes as
well.
Table 6-9
|
Using
Different Prefixes for the 172.16.4.0 Network
|
|
|
|
|
|
|
|
Network
|
|
Broadcast
|
Network
|
Address
|
Host Range
|
Address
|
|
|
|
|
|
|
|
|
172.16.4.0 /24
|
172.16.4.0
|
172.16.4.1–172.16.4.254
|
172.16.4.255
|
|
|
|
|
172.16.4.0 /25
|
172.16.4.0
|
172.16.4.1–172.16.4.126
|
172.16.4.127
|
|
|
|
|
172.16.4.0 /26
|
172.16.4.0
|
172.16.4.1–172.16.4.62
|
172.16.4.63
|
|
|
|
|
172.16.4.0 /27
|
172.16.4.0
|
172.16.4.1–172.16.4.30
|
172.16.4.31
|
|
|
|
|
Subnet Mask: Defining the Network and Host
Portions of the Address
Another
question you might ask is, “How do the network devices know how many bits are
the network portion and how many bits are the host portion?” The answer to this
question is the subnet mask.
The
prefix and the subnet mask are different ways of representing the same
information: the network portion of an address. The prefix length tells you the
number of bits in the address that are the network portion in a way that is
easier to communicate to humans. The subnet mask is used in data networks to
define this network portion for the devices.
Tidak ada komentar:
Posting Komentar