Tuesday 29 March 2016

IP Addressing Fundamentals


Let's learn the basics of IP Addressing and some terms that would make understanding some other topics quite easier.


An IP Address is a 32-bit dotted decimal number, divided into 4 "octets".
An octet contains 8 bits, which, when multiplied by 4 makes up the 32 bits of an IP address.

An IP address is used by computers in a network to identify them and also to communicate with other computers in the network.

An example of an IP address is 10.50.48.32

IP addresses are divided into five classes which i'll break down for you in a bit.

The five classes of IP addresses are:

Class A, Class B, Class C, Class D and Class E

So, How do we identify if an IP address belongs to any of these classes stated above?

It's simple. All you need to do is look at the first octet (first number) of the IP address and compare it to the following:

Class A:    1       -  126
Class B:    128   -  191
Class C:    192   -  223
Class D:    224   -  239
Class E:    240   -  254


What this means is that you only need to look at the first octet of an IP address and if the number falls within the specified ranges above, then that IP address belongs to the corresponding class.
So, its easy to say that the IP address 193.48.10.15 belongs to class C because the first octet (193) falls within the class C range.

Notice that the number 127 is missing in the class ranges?

This is because 127 is reserved for what we call "loop back test", i.e. to test the IP protocol stack of say, your computer.

Bear in mind that only the first three (3) classes of IP addresses are usable by computers. This means that you cannot assign classes D and E addresses to computers.
Class D IP addresses are used for multicasting, and Class E IP addresses are used for scientific research. Details on that much later in your networking career.

Since IP addresses allow computers to communicate in a network, we would be right to say that every computer that resides in a network should have an IP address.

However, does this mean that we can "make up" any IP address for a computer and gain instant connectivity to the internet? The answer is NO.

Let's quickly learn about Public and Private IP addresses.

A public IP address is one that is routable on the internet. This means that a computer with a public IP address configured on it would enable it access the internet.

On the other hand, a private IP address is not routable on the internet. A computer configured with a private IP address would still be able to communicate with other computers in the network, as long as internet connectivity is not needed as a private IP address does not allow computers to access the internet.


So, the question is this: "How can we identify if an IP address is public or private?"

It's really easy, and i'll spill it out for you real quick.

Private IP Address range
Class A:    10.0.0.0         -     10.255.255.255
Class B:    172.16.0.0     -     172.31.255.255
Class C:    192.168.0.0   -     192.168.255.255

Having known this, it means that any other IP address in a particular class that falls outside this private range is a PUBLIC IP ADDRESS.


To review what we've learnt, test yourself on the following:

What classes do the following IP addresses fall under? Try to identify which of them are in the public or private range.

1.) 192.168.10.50
2.) 171.58.3.60
3.) 48.50.6.90
4.) 11.5.2.1
5.) 10.6.3.254


With the knowledge of IP addresses under our belt, we can confidently gear up for some more interesting stuff in the networking world.

Happy learning!