# Introduction to IP Addressing

Thursday, May 24, 2012

## Binary Notation

While it is easy for us to work with decimals, computer work well with binary numbers. IP addresses are made up of 32 bits. Each bit is a binary digit. The value of a bit is either zero (0) or one (1). Having 32 bits allows us to have a total of 4,294,967,296 (2^32) addresses in the IPv4 scheme. However, removing Class D and E, Network 0 and 127, as well as removing the private IP ranges, we have about 3.7 billion addresses that are useable on the public Internet. If you are not familiar with the binary system, it is easy to learn. However, it does take some practice. Since an IP address is made up of four octets, each octet will have eight bits. Refer to the following chart which shows the binary and decimal values from 1-15. You can continue the pattern and reach up to a decimal value of 255 if you have eight bits all set to one (1).

BinaryDecimal
00000001001
00000010002
00000011003
00000100004
00000101005
00000110006
00000111007
00001000008
00001001009
00001010010
00001011011
00001100012
00001101013
00001110014
00001111015

11111111255

## IP Classes

There are actually five different classes of IP networks, Class A, B, C, D and E. For the most part, Classes A - C is discussed for the purposes of designing networks. Class D is reserved for multicasting and Class E is reserved as experimental. Class D and Class E will not be covered in detail in this document. You should also note that the use of IP classes is now rarely used in practice. However, it is still important to understand this concept with respect to IP addressing and subnetting your network. With the introduction of classless inter-domain routing (CIDR), classes are no longer a critical factor in your network configuration. To determine which class an IP belongs to, you only have to look at the five high order bits.

In the graphic shown above, you should quickly note that all Class A address have a zero in the first bit of the address. All Class B addresses have a one in the first bit and a zero in the second bit. All Class C addresses have a one in the first bit, a one in the second bit and a zero in the third bit. Class D and Class E addresses also have their specified bit arrangement.

A subnet mask allows you determine which portion of the IP address identifies the network and which portion of the address identifies the node. When dealing with classes, A, B, and C networks have default subnet masks.

• Class A: 255.0.0.0
• Class B: 255.255.0.0
• Class C: 255.255.255.0

To determine which portion of an IP address is the network ID and which is the host ID, we apply the subnet mask. Let us take a look at the following example. We will need to convert the IP address and subnet mask to binary numbers and perform an AND operation.

```IP: 10.5.15.30
SM: 255.0.0.0

IP: 00001010.00000101.00001111.00011110
SM: 11111111.00000000.00000000.00000000
--------.--------.--------.--------
00001010.00000000.00000000.00000000
```

Once you have the address and the mask represented in binary, then identifying the network and host ID is easy. With the help of the AND operator, we can determine that the network ID of this IP address is 10, and the host ID is 5.15.30. On a local area network, computers generally share the same network ID. On local area networks that have been subnetted, they continue to share the same network ID, but different areas of the network will have their own subnet IDs. In the upcoming articles in this series, we will cover how to take a network ID and further break it up into smaller subnets. This is called subnetting. Network Administrators who work on TCP/IP networks should be comfortable with working with decimal as well as binary notation.

Did you find the page informational and useful? Share it using one of your favorite social sites.

Recommended Books & Training Resources