Thursday, March 4, 2010

How to Check Your IP Address

Well, you are using Internet and wish to know your Public IP Address that currently used for you Internet connection. This is specially if you are using dial up connection or using a proxy server to connection to the Internet then ipconfig on windows or ifconfig on linux machine does not show your Public IP Address rather they show your Private IP address like below.
E:\>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection:

Media State . . . . . . . . . . . : Media disconnected

Ethernet adapter Wireless Network Connection:

Media State . . . . . . . . . . . : Media disconnected

PPP adapter GP-INTERNET:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 10.130.20.120
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 10.130.20.120

If you are not aware about Private and Public IP address then a little discussion about IP Address will help you to understand the thins.

Internet Protocol (IP) Address is a numerical label that is assigned to a device in order to uniquely identify in a network/Internet. In the Internet Protocol Version 4 (IPV4) the designers of TCP/IP defined an IP address as a 32-bit number which limits the address space to 4,294,967,296 (2 to the power 32) possible unique addresses. Out of 4,294,967,296 IP Addresses some addresses are reserved such as private networks (~18 million addresses) or multicast addresses (~270 million addresses).

The addresses which are reserved for private networks are called Private IP Address and rest addresses are called Public IP Address. Following is the range of all IP Address exists in IPV4.

Class First octet in binary Range of first octet Network ID Host ID Number of networks Number of addresses
A 0XXXXXXX 0 - 127 a b.c.d 27-2 = 126 224-2 = 16,777,214
B 10XXXXXX 128 - 191 a.b c.d 214 = 16,384 216-2 = 65,534
C 110XXXXX 192 - 223 a.b.c d 221-1 = 2,097,151 28-2 = 254


From the above list following is the range of Private IP Address,

Class Start End No. of addresses
24-bit Block (/8 prefix, 1 x A) 10.0.0.0 10.255.255.255 16,777,216
20-bit Block (/12 prefix, 16 x B) 172.16.0.0 172.31.255.255 1,048,576
16-bit Block (/16 prefix, 256 x C) 192.168.0.0 192.168.255.255 65,536


So, 10.130.20.120 is my private IP Address and as Private IP addresses are not routed on the Internet and thus their use need not be coordinated with an IP address registry so to communicate with Internet there must have a Public IP address. There are many websites through which you can check your IP Address along with many features. From them, I see AnalyzeMy really helps me which much more information.

1 comment:

  1. Nice document Arju. There're many pages that shows the public address of the currently connected user. I used to use http://www.whatismyip.com/ and http://www.ip2location.com/

    Once again, thanks for sharing

    ReplyDelete