03 September, 2010

What is an IP Address


What is an IP Address
An IP address is an address used to uniquely identify a device on an IP network. An IP network is nothing but a connection of multiple computers forming a network. An IP address can be given to any kind of network component that has to communicate over the network, such as computers, servers, routers, switches, etc. Any two computers, or any other network devices, cannot communicate with each other if they do not have an assigned IP address. They are designed to uniquely identify each network device and allow them to communicate with each other, regardless of the physical location of the sender and receiver.
Hence, an IP address is the unique identity of any network device where each one should have their own IP address defined. On the Internet, computers are recognized by their IP addresses only. IP addresses have an equal significance as the postal addresses have for human beings. Can you send a letter to anyone if you do not know where he/she lives? This should explain the importance of an “IP address”.

IP Address
An IP address is 32 (thirty two) bits in length, which can be divided into a network portion and a host portion with the help of a subnet mask. It is represented in form of four octets, where 1 octet = 8 bits. Each octet is converted to a decimal format and is separated by a dot (‘.’). For this reason, an IP address is said to be expressed in a ‘dotted decimal format’.
Examples of IP addresses in decimal format: 10.1.1.1, 255.255.255.255, 220.3.1.5
The value in each octet ranges from 0 to 255 in decimal format. The ‘dotted decimal format’ is used to make it easier for the humans to read and remember the numbers, but computers use IP addresses in a binary format only.
Example of an IP address in binary format: 10011101.11100010.10101110.11101000

Binary Octet to Decimal Format Conversion

There exist a well-defined method for converting binary IP addresses into its equivalent decimal format, and vice-versa. Humans prefer to operate on the dotted decimal format, whereas behind the curtain, computers deal with IP addresses in the binary form.
The right most bit, or the least significant bit, of an octet will hold a value of 20. The bit just to the left of it will have a value of 21. This series continues till the left-most 8 th bit which gets a value of 27 Hence, if all the binary bits of an octet are ‘1’, then the decimal equivalent would be 255.
1
1
1
1
1
1
1
1
2 7
2 6
2 5
2 4
2 3
2 2
2 1
2 0
128
64
32
16
8
4
2
1
11111111 (binary octet) = 1+2+4+8+16+32+64+128 = 255 (decimal format)
Given below is an example where all octet bits are not ‘1’.
0
1
0
0
0
0
0
1
2 7
2 6
2 5
2 4
2 3
2 2
2 1
2 0
128
64
32
16
8
4
2
1
01000001 (binary octet) = 1+0+0+0+0+0+64+0 = 65 (decimal format)

The IP Header

                                                                       IP Address Header
1.      Version : Current version of the IP addresses being used. The version can be either IPv4 or IPv6.
2.      Length : Total length of the IP header.
3.      TOS : TOS stands for Type of Service, which is used for the quality of service in high performance networks. This field establishes the way routers treat IP packets and prioritize them as they are queued to be sent.
4.      Size of Datagram : Total length of the IP header, and the data or the IP Packet. It is usually measured in bytes.
5.      Identification : An exclusive identification value assigned to the IP packet.
6.      Flags : Specifies if fragmentation should occur, i.e. the default flag indicates that fragmentation should not be performed.
7.      Fragmentation Offset : A byte count which provides segmentation and reassembly of large IP packets, bigger than the MTU.
8.      Time to Live : Number of hops/jumps which the IP packet can be routed over. This value is decremented with each hop an IP address makes.
9.      Protocol : Indicates the type of network protocol or an upper layer protocol. Such as, 23 = Telnet; 21= FTP; 6 = TCP; 17= UDP.
10.  Header Checksum : It is used to detect the processing errors introduced into the IP packet and to maintain the integrity of the data sent via the IP packet.
11.  Source Address: IP address of the original sender who transmits the IP packet.
12.  Destination Address : IP address of the last destination of the packet, for whom the IP packet was intended.
13.  Options : It is used for various reasons such as testing, security, etc. The option field is optional, but when used, the length of the IP header increases in size.
14.  Data : The actual data to be sent over the network.

Types of IP Addresses

  • Unicast IP Address : It is used to transmit information to a specific network device on the network.
  • Broadcast IP Address : It allows information to be sent to all the computers on a given subnet rather than a particular machine. The exact notation can differ by the operating system, but the standard is laid out in RFC 919. The IP packets directed to the broadcast address are received by each and every machine on the subnet. It is generally used for mass communication such as a radio transmission over to multiple listeners.The broadcast address is calculated by taking the bit complement of the subnet mask and then applying OR operation bitwise with the IP address.Example: To broadcast a packet to an entire class B subnet using a private IP address space, the broadcast address would be 172.16.255.255. This can be done with the help of the subnet mask; 255.255.0.0, and the IP address; for e.g. 172.16.48.196. The complement of the subnet mask is 0.0.255.255, and 172.16.48.196 || 0.0.255.255 = 172.16.255.255.255.255.255.255 is a limited broadcast IP address, which does not reach every node on the Internet, only nodes on LAN.
  • Multicast IP Address : Multicast IP addresses are reserved and used only for specific groups of machines residing in a large domain. For example, an IP packet destined for a multicast address will be sent only to machine which are part of that Multicast Group. The address range of class D IP addresses from 224.0.0.0 to 239.255.255.255, or equivalent 224.0.0.0/4, is particularly reserved for Multicasting.Examples are RIP which uses 224.0.0.9 and OSPF which uses 224.0.0.5 address.
  • Private IP Address : These are local addresses which cannot be routed over the Internet. Two organizations can use the same private IP address. These addresses are free for use by anyone.
  • Public IP Address : It is a unique IP address assigned by IANA (Internet Assigned Network Authority). Duplication of the public IP addresses is impossible; hence these addresses need to be bought.

0 comments:

Post a Comment