IP Address – all you need to know 😀

Current there are 2 versions of IP address namely IPv4 and IPv6. The large number of devices that are connected to the internet today, makes the number of IPv4 addresses insufficient. Hence IPv6 comes in.

This post is about IP addresses and how they work and will focus on IPv4. Nevertheless below are the difference between the 2.

IPv4 class system:

Below are the class system for IPv4. Current network prefer classless addressing system which will be explained later

  • IPv4 – 32 bits address system arrange in block of 8 bits separated by a dot(period). Is display as numeric system. Example: 192.168.3.2
  • Class C address : 1st octet (1st 8 bits or byte) is from 192 to 223. eg. 220.30.8.x or 193.5.5.x . The last octet is up to the user to assign. Here you can have up to 254 hosts. Octets 1, 2 ,3 and network address portion and last octet is hosts portion.
  • Class B address: eg 150.34.x.x . 1st octet is from 128 to 191. The last 2 octets is assign by the user. Here you can have 65534 hosts. First 2 octets are network portion and last 2 are hosts portion.
  • Class A address: eg. 6.x.x.x . 1st octet is between 0 and 127 ( 0 and 127 can’t be used)

IPv6:

IPv6 – 128 bits address system arrange in 8 groups of 4 hexadecimal digits or in 8 groups of 16 bits separated by colons. Refer to here for more detailed visualization.

So now let’s go back IPv4 and its involvement in a network.

Special IP addresses

Broadcast address: If a computer sent a packet with a destination IP address of 255.255.255.255, all the somputer in the network will received the packet hence the name broadcast.

Loopback address: In a network, through the cmd window, you can ping a computer by keying ‘ping’ followed by its IP address. Example, ‘ping 192.168.4.4’ . This is to check if your connection with that computer is ok. But sometime you want to check your own connection in the LAN, for that you can key ‘ping 127.0.0.1’. 127.0.0.1 is call the loopback address. This is the same as ‘ping localhost’. Both do the same thing, that is to check your own connection.

Private IP addresses: These addresses are normally use in LAN behind a router without exposing to the internet as compared to Public IP address which is exposed to servers and routers on the internet. The 3 Private IP addresses are:

  • Any address that starts with 10. Example 10.123.4.5.
  • Any address that starts from 172.16.0.0 to 172.31.255.255 inclusive.
  • Any address that starts with 192.168.x.x.