What is an IP Address?
IP address is the short expression used for Internet Protocol (IP) address.
An IP address is an identifier for a computer or device on a TCP/IP network. All networks using TCP/IP protocol route messages (data packets) based on the IP address of the destination device.
The IP address consists of 32 bits which are often shown as 4 octets of numbers between 0 and 255. These numbers are commonly expressed in decimal form instead of being shown in their binary form. Just to have an idea please check the below example:
Obviously it is easier for us to remember the decimal form an IP instead of that string made of one and zero, however the binary form of the IP is crucial when we need to determine which class of network the IP address belongs to.
The two parts of an IP address
An IP address is made of two parts: network and host.
The class determines which part belongs to the network and which to the host. All the nodes on a specific network share the same network prefix, however they must have an unique host number.
Class A addresses are assigned to networks with a very large number of hosts. The high-order (first) bit in a class A address is always set to zero, the decimal number can be anywhere from 1 to 126. The next seven bits (completing the first octet) complete the network ID. The remaining 24 bits (the last three octets) represent the host ID. This allows for 126 networks and 16,777,214 hosts per network.
An example of a Class A IP address is 220.127.116.11 , where 101 is the identifies for the network , and “165.224.240” identifies the host on the network.
Class B addresses are assigned to medium-sized to large-sized networks. The two high-order bits in a class B address are always set to binary 1 0, therefore the decimal number can be anywhere from 128 to 191. [NOTE: The number 127 is reserved for loopback and is used for internal testing on the local machine.] The next 14 bits (completing the first two octets) complete the network ID. The remaining 16 bits (last two octets) represent the host ID. This allows for 16,384 networks and 65,534 hosts per network
An example of a Class A IP address is 18.104.22.168 , where “131.150” is the identifies for the network , and “247.136” identifies the host on the network.
Class C addresses are used for small networks. The three high-order bits in a class C address are always set to binary 1 1 0, therefore the decimal number can be anywhere from 192 to 223. The next 21 bits (completing the first three octets) complete the network ID. The remaining 8 bits (last octet) represent the host ID. This allows for 2,097,152 networks and 254 hosts per network. Figure 1.6 illustrates the structure of class C addresses.
An example of a Class A IP address is 22.214.171.124 , where “200.190.140” is the identifies for the network , and “119” identifies the host on the network.
Class D addresses are reserved for IP multicast addresses. The four high-order bits in a class D address are always set to binary 1 1 1 0, therefore the decimal number can be anywhere from 224 to 239. The remaining bits are for the address that interested hosts recognize. Microsoft supports class D addresses for applications to multicast data to multicast-capable hosts on an internetwork.
Class E is an experimental address that is reserved for future use. The high-order bits in a class E address are set to 1111, therefore the decimal number can be anywhere from 240 to 255.
The most used network classes are A, B and C, so you will rarely encounter any Class D or Class E network in any environment.
The number of unassigned Internet addresses is running out, so a new classless scheme called CIDR is gradually replacing the system based on classes A, B, and C and is tied to adoption of IPv6. In IPv6 the IP address size is increased from 32 bits to 128 bits.