IP
ADDRESS
Almost every body who use the Internet should have known or heard about the IP Address. This article, which is based on Internet Protocol Version 4 (IPv4), is to provide a little bit more information on IP address.
What is an IP
Address?
Every computer connected to the Internet has an unique identity. This identity has four decimal numbers, each separated by a dot. This identity or address is called IP address.
A
typical IP address looks like : 193.151.252.11
v To know your current IP address click here : http://whatismyip.com/.
v To know the IP address of a public domain, type nslookup in the command prompt and type the domain name (like www.cisco.com) at the “>” prompt.
Every host (work station, printer etc.) in a TCP/IP network has an unique IP address. If you are using windows as the Operating System, type ipconfig in the command prompt to know the IP address of the NW adapter. On Unix PC’s (Linux or Sun Solaris PC), type ifconfig –a.
What does “IP” in the term “IP
address” stand for?
“IP” stands for Internet
Protocol. A protocol is a special set of rules, used by various equipments in a
Network, to communicate with each other. The
Internet Protocol is the protocol by which data is sent from one computer to
another on the Internet.
v
HTTP, FTP, SMTP or POP - in all these, the last letter
“P” stands for protocol.
v
TCP/IP is a suite of communication protocols.
Octets:
IP addresses are expressed in decimal format. But computers communicate in binary. In a binary format, the IP address presented earlier looks like :
11000001.10010111.11111100.00001011
As
each number contains eight positions they are called octets. Since each of the
eight positions can have two different states (0 or 1) the total number of
possible combinations per octet is 28
or 256. So each octet can contain any value between 0 and 255. Combine the four
octets and you get 232
or a possible 4,294,967,296 unique values. Certain IP addresses are reserved as
we shall see under the “Classes of IP address”.
Classes
of IP address:
The
4 octets of an IP address are divided into two sections : the Net and the Host. The net section identifies the
network to which a host belongs and the host section identifies the host. Based
on this and the initial bits that constitute the first octet, IP addresses are
divided into 5 classes.
v
IP
address classes described here is generally bypassed today by use of
Classless Inter-Domain Routing (CIDR)
addressing. Still the classes form the basis for IP address
assignment.
While
defining the classes let us also see through the IP addresses that are
reserved.
Default Network (0.0.0.0) : This is
reserved for hosts that don't know their IP address - for instance if a host is
configured to get its IP address from a DHCP server this host will initially use
this IP address.
Class
A: The first octet identifies the network. The
other three octets are used to identify each host. The first binary digit of the
first octet is always 0. That means IP addresses with first octet from 1 to 126
belong to Class A. Class A networks account for half of the total available IP
addresses. (50% of the 4.2 billion). Though octet starting with 127 have the
initial bit as 0 they are used for loopback purpose.
Net
|
Host
|
62. |
121.5.146
|
62. |
121.5.147 |
Loopback (127.0.0.1) : The
IP address 127.0.0.1 is used as the loopback address. This means that it is used
by the host computer to send a message back to itself. It is commonly used for
troubleshooting and network testing.
v
Search
for the “hosts” file in your system and you can find the entry for
loopback address there.
Class
B: The first two octets identify the network. The
other two are used to identify the host. The first two binary digits of the
first octet is always 10. That means IP addresses with first octet from 128 to
191 belong to Class B. Class B networks make up a quarter of the total available
IP addresses.
Net
|
Host
|
162.121.
|
5.146 |
Class
C: The First three octets identify the network. The
last octet is used to identify the host. The first three bits of the first octet
is always 110. That means IP addresses with first octet from 192 to 223 belong
to Class C. Class C networks make up an eighth (12.5%) of the total available IP
addresses.
Net
|
Host
|
198.121.5.
|
146 |
We
can skip Class D and Class E here.
Broadcast (255.255.255.255) : When a network
device intends to send messages for all the computers in a network, the messages
always use this IP address. This is called broadcast.
Private IP
addresses:
Those IP addresses which are not routable through the Internet are called private IP addresses. This means they will not be used to send or receive traffic from the Internet. Each class has a block of private IP addresses. These are used for Intranet purposes.
The blocks per classes are as below:
Class A |
10.0.0.0 to 10.255.255.255 |
Class B |
172.16.0.0 to 172.31.255.255 |
Class C |
192.168.0.0 to
192.168.255.255 |
IP addresses used to connect to Internet are called public IP addresses.
Who allocates public IP
addresses:
The Internet Assigned Numbers Authority (IANA) allocates IP addresses from the pools of unallocated addresses to the appropriate Regional Internet Registry (RIR). For instance APNIC is the RIR for the Asia Pacific region. APNIC allocates IP addresses to a Local Internet Registry, National Internet Registry or directly to an Internet service provider (ISP). Users are assigned IP addresses by ISPs.
v IP addresses starting with 61, 202, 203, 210 etc., are allocated by APNIC.
v The following link contains a list of countries and their respective RIRs: http://www.arin.net/library/internet_info/countries.html
Assigning and Configuring IP
addresses:
In an Intranet with a small LAN, IP addresses can be configured manually. However in case of a huge LAN, a Dynamic Host Configuration Protocol (DHCP) server could be deployed. When a computer is configured to obtain an IP address automatically, it will obtain it from the DHCP server in the network. Here the IP address is dynamic – not a fixed one.
In an Internet environment, where the user
dials an ISP, the Remote Access Server (RAS) will assign the IP address
once the authentication is over. Here again the IP address is dynamic. There are
users who need a fixed IP address. This can be achieved with the help of a
suitable device – say a Radius server which holds the profile of the user
ID mapped to a fixed IP address. As the users get the same IP every time these
IP addresses are called Static IP addresses. Even in a private LAN we may
need a static IP addresses while connecting to the internet. Here the private IP
address of the computer will be mapped to a static public IP address. The
mapping is done in the gateway through which the traffic is sent or received
from the internet. This is called Network Address translation
(NAT).
Subnet
Mask:
Let me explain another term which is closely associated with IP address – the Subnet Mask. A subnet is a division of a network where all the IP addresses have a common network address. A subnet mask is used to identify the subnet to which an IP address belongs. It also helps in identifying the number of hosts available in a given network.
v
An AND operation with the binaries of IP address
and Subnet Mask gives you the subnet address.
Effective use of Public IP
address:
To connect to the Internet, we need a public
IP address. Unless necessary it is not viable to obtain a public IP address for
each computer in the LAN. To overcome the limitation of Public IP addresses, a
proxy server or a network layer device which works on Port
Address Translation (PAT) could be deployed. In a proxy server setup, the
proxy server receives and sends the Internet traffic to the client. In a PAT
setup, the private IP address will be mapped to a public IP address.
v
A
router, which connects to the Internet, is a Network layer device.
v
Network layer
is the third layer of the Open System Interconnection (OSI) model which
is the standard for computer networking.
Classless Inter-Domain Routing
(CIDR) removes the limitation of network identifiers - the prefixes of 8, 16 and
24 which form the network part in a class based IP address. Hence they are
called classless. This system has
replaced the class based IP addressing. A CIDR IP address ends with a slash followed by a number, called IP network prefix. For example:
172.150.0.0/16
CIDR allows for more efficient allocation of IP addresses and also helps reducing the entries in the routing table in the routers.
v A routing table contains the routing information such as where a host is located, what are the paths to reach it etc.
IPv6:
Remember I said this article is based on
IPv4. Internet Protocol Version 6 (IPv6) is
designed to replace IPv4.
“IPv6 fixes a number of problems in IPv4,
such as the limited number of available IPv4 addresses. It also adds many
improvements to IPv4 in areas such as routing and network autoconfiguration.
IPv6 is expected to gradually replace IPv4, with the two coexisting for a number
of years during a transition period”
- www.ipv6.org.
An IPv6 address has 128 bits and is expressed in hexadecimal format. It has 8 numbers with each having 16 bits.
v
An IPV6 address looks like: FE80:0:0:0:202:B3FF:FE1E:8329
PS : Any tutorial
on IP address deals extensively with binary digit calculations, which in fact is
very necessary for a comprehensive study of IP addresses. This has been avoided
here because the purpose of this article is to present the basics with an
Internet perspective and also to keep it as simple as possible.
Go Back | Go Top | Go Home |