Address classes – D-Link DES-3326 User Manual
Page 42
DES-3326 Layer 3 Fast Ethernet Switch User’s Guide
address easier to read. A computer sees an IP address not as four decimal numbers, but as a long
string of binary digits (32 binary digits or 32 bits, IP addresses are 32-bit addresses).
The three IP addresses in the example above, written in binary form are:
1. 11010010.11001010.11001100.11001101
2. 10111101.00010101.11110001.00111000
3. 01111101.01010111.00000000.00000001
The dots are included to make the numbers easier to read.
Eight binary bits are called a ‘byte’ or an ‘octet’. An octet can represent any decimal value between ‘0’
(00000000) and ‘255’ (11111111). IP addresses, represented in decimal form, are four numbers whose
value is between ‘0’ to ‘255’. The total range of IP addresses are then:
Lowest possible IP address -
0.0.0.0
Highest possible IP address -
255.255.255.255
To convert decimal numbers to 8-bit binary numbers (and vice-versa), you can use the following chart:
Binary Octet Digit
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
Decimal Equivalent
128
64 32 16 8
4
2 1
Binary Number
128+64+32+16+8+4+2+1=
255
1 1 1 1 1 1 1
1
Table 5-4. Binary to Decimal Conversion
Each digit in an 8-bit binary number (an octet) represents a power of two. The left-most digit represents
2 raised to the 7
th
power (2x2x2x2x2x2x2=128) while the right-most digit represents 2 raised to the 0
th
power (any number raised to the 0
th
power is equal to one, by definition).
IP addresses actually consist of two parts, one identifying the network and one identifying the
destination (node) within the network.
The IP address discussed above is one part and a second number called the Subnet mask is the other
part. To make this a bit more confusing, the subnet mask has the same numerical form as an IP
address.
Address Classes
Address classes refer to the range of numbers in the subnet mask. Grouping the subnet masks into
classes makes the task of dividing a network into subnets a bit easier.
There are 5 address classes. The first 4 bits in the IP address determine which class the IP address falls
in.
•
Class A addresses begin with 0xxx, or 1 to 126 decimal.
•
Class B addresses begin with 10xx, or 128 to 191 decimal.
•
Class C addresses begin with 110x, or 192 to 223 decimal.
•
Class D addresses begin with 1110, or 224 to 239 decimal.
•
Class E addresses begin with 1111, or 240 to 254 decimal.
Addresses beginning with 01111111, or 127 decimal, are reserved. They are used for internal testing on
a local machine (called loopback). The address 127.0.0.1 can always be pinged from a local node
because it forms a loopback and points back to the same node.
42