May 02

What is an IP Address?

An IP (Internet Protocol) Address is a four-part number, with each part represented by a number from 0 to 255 (256 Numbers total). Part of the IP Address represents the network the computer exists on, whereas the remainder identifies the specific host of that network.

Here is an example of an IP address:
192.168.45.128

IP Addresses used to be grouped together and assigned to an organization that needed IP addresses, based on IP Address class. Later, a more efficient method, known as Classless Inter-Domain Routing (CIDR), was created to improve routing and waste fewer IP Addresses. So there are two IP Address Methods, Class based IP Addresses and Classless Based IP Addresses. These two IP Address methods are described below.

IP Addresses Classes

The way IP Addresses are assigned is that a network administrator is given a pool of addresses. The administrator can assign specific host addresses within that pool as new computers are added to the organization’s local network. There are three main basic classes of IP Addresses, each representing a different size network.

Class A

Each Class A IP Address has a number between 0 and 127 as its first part. Host numbers within a Class A network are represented by any combination of numbers in the next three parts. A Class A network therefore contains millions of host numbers. Approximately 256 x 256 x 256, with a few special numbers being invalid. A workstation, computer, server etc that is physically connected to the network is a host.

Some examples of valid Class IP Addresses are:

124.128.192.252; 10.0.0.54; 45.85.65.98

Class B

A Class B IP Address has a number between 128 and 191 as it’s first part. However, with a Class B network, the second part also represents the network, but is not restricted to a number between 128 and 191, rather it should be a number between 0 and 255. The other parts of the IP Address can also be any combination of numbers between 0 and 255. This enables a Class B network to have more then 64,000 host addresses. It is rare that all these IP addresses would be used in one organization.

Some examples of valid Class B IP Addresses are:
132.85.192.200; 150.45.152.54; 182.45.65.32

Class C

A Class C IP Address begins with a number between 192 and 223 as it’s first part. With a Class C network, the first three parts of the IP Address represent the network, whereas only the last number represents a specific host. Although the first part of the IP Address must be a number between 192 and 223, the rest of the numbers can be any number combination between 0 and 255. In this case, any Class C network can have 254 hosts (the numbers 0 and 254 cannot be assigned to hosts).

Some examples of valid Class C IP Addresses are:
192.168.0.124; 197.75.95.45; 200.192.184.201

Invalid & Reserved IP Addresses

There are some IP Addresses in each Class that are either completely invalid (it can’t be used) or it is reserved for another purpose. Following is the most common IP Addresses that are classed as “invalid” and why.

127.0.0.1 – This IP Address is the IP address of your local machine. It is internal to the host system that you work on and can only be accessed on your local machine. It is typically used to test some sort of server (web server or ftp server) on the actual machine itself. You do not need to be connected to a network to access your local machine at this number.

X.X.X.254 – Any IP Address with the host number of 254 is generally reserved for the internet gateway and is not used as a host number. However it can still be used as a host number.

X.X.X.0 & X.X.X.255 – Any IP Address that has its host number as 0 or 255 will not function on the network at all. 0 is not a valid IP Address host number and 255 is the maximum host range number.

Telling The Difference Between Networks

The difference between networks is determined by the class it is in as described above.

Class A

The difference between two or more Class A networks is identified by the first part of the IP Address. For example, the IP Address 120.45.65.98 is on a different network to 121.45.65.98. The “120 and 121″ at the beginning of the IP Addresses identify that they are from separate networks. It is these numbers that determine what network the IP Address belongs to.

The other three parts of the IP Address can be any number between 0 and 255 and so long as each IP Address has 120 for example in the first part of the IP Address, the host will exist and be able to communicate in the network with other computers using the same IP Address set (i.e., other computers that have an IP Address that starts with 120).

With only one part of the IP Address being used as the identifier for Class A networks, it is now easy to see why there are so many possible IP Addresses in the A Class.

Class B

The difference between two or more Class B networks is identified by the first two parts of the IP Address. For example, the IP Address 130.85.192.200 is on a different network to 130.84.192.200. Furthermore, 131.85.192.200 and 131.84.192.200 are also on completely different networks. Thus the four different IP Address are all from four different Class B networks.

As you can see, it is the first two parts of the IP Address: X.X.192.200 (The “X” represents the first to parts of the IP Address”) that differentiates one Class B network from another. For example, each host on a network, has an IP Address that starts with 130.48.X.X (The X.X can be any number between 0 and 255), they will be able to communicate with other computers on the network that also have an IP Address that starts with 130.84.X.X.

Class C

The difference between two or more Class C networks is identified by the first three parts of the IP Address. For example, the IP Address 193.168.0.124 is on a different network to 198.75.95.45. The last part of the IP Address is the identifier of the host and can be a number anywhere between 0 and 255. For example, any host on a network that has the IP Address of 197.75.95.X (“X” is a host number between 0 and 254) can communicate with any other host on the same network so long as the IP Address starts the same way (197.75.95).

Private IP Addresses

Private IP Addresses are for use on small networks, although they can also be used on large networks. There is a private IP Address Range in each Class. Private IP Addresses can not be routed across the internet and are therefore reserved for internal use only. They also can not route data over the internet nor are they used publicly on the internet.

Class A:

10.X.X.X – This Private IP Address set has 167,777,216 possible internal IP Addresses.

Class B:

172.16.X.X – 172.31.X.X – This Private IP Address set has 65,536 possible internal IP Addresses.

Class C:

192.168.0.X – 192.168.255.255 – This private IP Address set has 256 possible internal IP Addresses.

Understanding Subnet masks

If you are assigned the Class B IP Address Set of 135.84, but you are only given the pool of numbers available to the address 135.84.118, how do you tell your network that every address beginning with 135.84.118 represents a host or computer on your network? Use a Subnet mask.

A Subnet mask essentially identifies the network number for a network. When you assign the IP Address that is associated with your computer’s NIC, you are asked for a net mask. By default, your computer will fill in a number that masks the part of your IP Address that represents the Class of your network. The default Subnet mask for each Class is as follows

Class A:

255.0.0.0

Class B:

255.255.0.0

Class C:

255.255.255.0

If you network was assigned the network IP Address set of 135.84.118.X, to tell your computer that 135.84.118.X is the network number and not 135.84.X.X (as it normally would be for a Class B Network), you would use the Subnet mask of 255.255.255.0. Thus your network has available host numbers from 1 to 254 (Which would go into the fourth part of the IP Address).

Classless Inter-Domain Routing

The class method of allocating IP Addresses has several major drawbacks. Firstly, it is rare that an organization would fall neatly into one class or another. In most cases, a Class C IP Address set (Up To 256 IP Addresses) was too small and a Class B IP Address set (Up To 65,534 IP Addresses) was to large. The result was allot of wasted IP Addresses. Secondly, IP Classes resulted in too many table entries. As a result, routers were becoming overloaded with information.

To deal with these problems, CIDR was developed. This system is similar to IP Address Classes, but offers more flexibility in assigning how much of the 32 bit IP address is the network identifier. Instead of the first 8, 16 or 32 bits identifying the network, 37 to 27 bits could identify the network. As a result, groups of assigned IP addresses could contain from 32 to about 524,000 host addresses.

A CIDR IP Address is followed by a slash (/) and then a number between 13 and 27. A smaller number indicates a network containing more hosts. A larger number indicates a network containing fewer hosts.

Here is an example of an IP Addresses that uses the CIDR system.
128.8.27.18/16

In this example, the first part of the IP Address and the first number of the second part of the IP Address (the first 16 bits) are used to represent the network number (128.Cool. The remainder of the IP Address (27.1Cool is used to identify the specific host. This network number can contain up to 65,536 hosts (the same as a class B address).

Another example is 203.63.28.231

203.6 – is the network number, defined in the same way as a Class does.

3.28.231 – is used to identify the specific host.

The following list shows how many hosts can be represented in networks using different numbers to identify the network.

/13 -:- 524,288 – hosts

/14 -:- 262,144 – hosts

/15 -:- 131,072 – hosts

/16 -:- 65,536 – hosts

/17 -:- 32,768 – hosts

/18 -:- 16,382 – hosts

/19 -:- 8,192 – hosts

/20 -:- 4,096 – hosts

/21 -:- 2,048 – hosts

/22 -:- 1,024 – hosts

/23 -:- 512 – hosts

/24 -:- 256 – hosts

/25 -:- 128 – hosts

/26 -:- 64 – hosts

/27 -:- 32 – hosts

The CIDR addressing scheme also helps reduce the routing overload problem by having a single, high-level route represent many lower level routes. For example, an Internet Service Provider could be assigned a single /13 IP network and assign the 500,000 plus addresses to its customers. Routers outside the ISP would only need to know how to reach the ISP for those half-million addresses. The ISP would then be responsible for maintaining routing information for all of the host routes with that network address.

written by Easton Royce \\ tags: , ,


Comments are closed.