Sunday, January 13, 2008

Introduction of IP Addresses !!

What is an IP Address?

Every system connected to the Internet or connected to a particular network has a unique Internet Protocol Address of an IP Address. Just as in the real world every person has his or her own Home Contact Address, similarly every system connected to the Internet has its own unique IP Address. Your IP Address is the address to which data should be sent to ensure that it reaches your system. The IP Address of a system acts as the system’s unique identity on the net.
Structure of an IP Address:

An Internet Address (IP Address) is a 32-bit address or number, which is normally written as four decimal numbers (of 8 bits each), each separated from the other by a decimal. This standard is known as the dotted-decimal notation.

For Example,

A Typical IP Address would be as follows: 192.168.1.1
It can be further broken down as:

192 representing the first 8-bits.
168 representing the next 8-bits.
1 representing the third 8-bits.
1 representing the fourth 8-bits.

Thus when considered together 192.168.1.1 represents 32-bits. So basically we can conclude that each decimal in an IP Address represents 1 byte or 8 bits. It is important to note than an IP Address can contain numbers from 0-255.

There are a huge number of IP Addresses in use in the present day wired age. All these IP Addresses have some sort of relation with each other and each individual IP Address can reveal a lot of secrets about the Network, of which it is a part. Before we move on to that, we need to understand the fact that all IP Addresses being used are divided into a number of ranges, which are as follows:

Class Range

A 0.0.0.0 to 127.255.255.255
B 128.0.0.0 to 191.255.255.255
C 192.0.0.0 to 223.255.255.255
D 224.0.0.0 to 239.255.255.255
E 240.0.0.0 to 247.255.255.255

We can easily conclude that one can find out the Class to which an IP Address belongs to simply by comparing the numeral before the first decimal of the IP Address with the above table.

For Example,
In The IP Address 192.168.1.1, the number before the first decimal is 192 and the above table tells us that it belongs to Class C of the range of IP addresses.

The various IP Addresses are divided into the different classes on the basis of the structure of their Network or in other words on the basis of what the various numbers separated by decimals actually stand for. To understand this, let us refer to the following:

Class Information

A It has the first 8-Bits for Netid and the last 24-bits for Hostid
B It has the first 16-Bits for Netid and the last 16-bits for Hostid
C It has the first 24-Bits for Netid and the last 8-bits for Hostid
D It represents a 32-bit multicast Group ID.
E Currently not being used.

The above table will be clearer after reading the following examples:
Examples:

An IP Address 192.168.1.1 belonging to Class A means that the network ID is 192 and the host ID is 168.1.1

If the Same IP Address belonged to Class B, then the network ID would become 192.168 and the host ID would become 1.1

And if it belonged to Class C then the network ID would become 192.168.1 and the host ID would become 1.
Almost all ISP’s prefer to use a Class B Network. If that is the case then each time you login to your ISP, then the first 2 octets of your IP Address would not change, while the last two are likely to change. However, even if only the last octet changes, and the remaining three remain constant, it is likely that the ISP uses Class B addressing.

How do you find out the IP Address of your own system?

In order to get your own IP Address all you have do is, follow the below process:

1. Connect to the Internet.
2. Launch MSDOS.
3. Type: netstat –n at the prompt.

You will get an output similar to the below:

C:\WINDOWS>netstat -n

Active Connections

Proto Local Address Foreign Address State

TCP 192.168.1.1:1025 64.4.13.56:1863 ESTABLISHED
TCP 192.168.1.1:1031 209.143.242.119:80 ESTABLISHED

The IP Address shown under the Local Address Field denotes the IP address of your system.

An IP Address, which belongs to the Class-A addressing system having a network ID equal to 127, is referred to as the special address. It is actually known as the Loopback Interface. It allows clients and servers on the same system to communicate with each other.

The loopback address, which is commonly used, is 127.0.0.1. Almost all systems have also given the loopback address the special name ‘localhost’.

No comments: