Beruflich Dokumente
Kultur Dokumente
Before heading deeper into IP addresses, you should be aware of the following terms
Dotted-decimal, as in 172.16.30.56
Binary, as in 10101100.00010000.00011110.00111000
Hexadecimal, as in AC.10.1E.38
All these examples represent the same IP address. To further make it easier to read and remember, the
binary numbers are converted to decimal. For example, an IP address such as
11000000100000000000110000000001 is divided to make it
11000000.10000000.00001100.00000001.
When this address is converted to decimal, it will become 192.128.12.1. This format of IP address is
called the dotted decimal format. Some applications also covert the address to hexadecimal format
instead of decimal format.
Topics in this chapter require binary to decimal conversions. Table 2-1 shows the decimal value of each
bit location in a byte. To easily convert from binary to decimal, add up the decimal value corresponding
to the bit place that is “on” (1). For example, a binary value of 10110000 can be easily converted to
decimal by adding the decimal value of each bit that is 1. That gives us 128+32+16 = 176.
Table 2-2 shows the decimal value for the most common binary numbers you will encounter in this
chapter.
128 64 32 16 8 4 2 1
Table 2-2 Decimal Values for common binary numbers
Binary Decimal
Value Value
10000000 128
11000000 192
11100000 224
11110000 240
11111000 248
11111100 252
11111110 254
11111111 255
An IP address does not only represent the host address. In fact it represents the network where the host
resides and the host itself. In effect, the IP address consists of two parts:
1. 1. The Network component – Defines network (or subnet), in an internetwork, the host
resides in.
2. 2. The Host component – Defines the host itself in the network.
Each combination of the network component and the host component should be unique in the entire
Internetwork. To make it easy to identify which portion of the address is network component and which
one is the host component, addresses are broken down into 5 classes discussed below:
Class A – The first byte (8 bits) is the network component and the remaining three bytes (24 bits)
are host component (network.host.host.host). This class is for an internetwork with small number
of networks and large number of hosts per network. Class A network addresses are 1 byte long,
with the first bit of that byte reserved and the 7 remaining bits available for manipulation
(addressing). As a result, the maximum number of Class A networks that can be created is
27=128. The actual maximum usable number of nodes for a Class A network is 2 24 minus 2,
which equals 16,777,214
Class A Valid Host IDs
Here’s an example of how to figure out the valid host IDs in a Class A network address:
Class B – The first two bytes (16 bits) are the network component and the remaining three bytes
are host components (network.network.host.host). This class bridges the gap between Class A and
Class C by providing for medium number of networks with medium number of hosts. Class B
network addresses should start with the binary digit 1, then 0. This leaves 14 bit positions to
manipulate, therefore 16,384, or 214 unique Class B network addresses. This is 216 minus the two
reserved patterns of all 0s and all 1s for a total of 65,534 possible node addresses for each Class B
network.
Class B Valid Host IDs
Here’s an example of how to find the valid hosts in a Class B network:
o All host bits turned off is the network address: 172.16.0.0.
o All host bits turned on is the broadcast address: 172.16.255.255
o The valid hosts would be the numbers in between the network address and the broadcast
address: 172.16.0.1 through 172.16.255.254.
Class C – The first three bytes (24 bits) are the network component and the last byte (8 bits) is
the host components (network.network.network.host). This class provides for large number of
networks with fewer hosts per network. In a Class C network address, the first three bit positions
are always the binary 110. Hence, there are 221, or 2,097,152, possible Class C networks.
In a binary address the first 5 bits of the address and the first octet in a dotted decimal address shows the
class of address. Table 2-3 shows the first 5 bits and the first octet range of each class of address.
Notice that first few bits in each class have a fixed value. For example a class A address should have the
first bit set to 0. Similarly class C should have first 2 bits set to 1 and the third bit set to 0. Another point
to note is that though the class A range is from 0 to 127, the address 0.0.0.0 is reserved to mean “any
network” and 127.0.0.1 is reserved as a loopback address which refers to the host itself. So the class A
network is restricted to the 1-126 range.
Exam Alert: Class of addresses and their address range is a very important topic. You will have to remember the
range associated with each class.
Before moving ahead, spend some time to figure out the class of some addresses given below. Also try to
figure out which portion is the network and which portion is the host part:
1. 1. 9.140.2.87 – This is a Class A address because the first octet lies in 1-126 range. 9 is the
network part while 140.2.87 is the host part because class A addresses have a
network.host.host.host format.
1. 2. 172.30.4.190 – This is a Class B address because the first octet lies in 128-191 range. 172.30
is the network part while 4.190 is the host part because class B addresses have a
network.network.host.host format.
1. 3. 194.144.5.10 – This is a Class C address because the first octet lies in the 192-223 range.
194.144.5 is the network part while 10 is the host part because class C addresses have a
network.network.network.host format.
1. 4. 45.22.187.1 – This is again a class A address with 45 being the network part and 22.187.1
being the host part.
Some IP address such as 127.0.0.1 have a special meaning. Table 2-4 lists such addresses and what they
represent.
The IANA also designated a range of addresses in class A, B and C for use in private networks. These
addresses can be used by anyone within their network without any required permission but these
addresses are not routable on the Internet. You ISP or your organization usually assigns you one of these
addresses and later translates it to a public address when you want to get out to the Internet. The
designated ranges for private IP addresses are:
Exam Alert: It is very important to remember the range of private IP addresses as you will more than likely see a
question about them on your CCNA exam.