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
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
Binary Octet Digit | 27 | 26 | 25 | 24 | 23 |
| 22 | 21 | 2 |
|
|
|
|
|
|
|
|
| 0 |
|
|
|
|
|
|
|
|
|
|
Decimal Equivalent | 128 | 64 | 32 | 16 | 8 |
| 4 | 2 | 1 |
Binary Number | 1 | 1 | 1 | 1 | 1 |
| 1 | 1 | 1 |
128+64+32+16+8+4+2+1= |
|
|
|
|
|
|
|
|
|
255 |
|
|
|
|
|
|
|
|
|
Table |
|
|
|
Each digit in an
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