Understand Networking (IP and Subnet Mask)

What is IP?

IP stands for Internet Protocol. It likes home number. Subnet mask is like district.
Every IP address is made up of 32 bits. (4 octets) 1 octet = 8 bits.

Let me explain it with a sample.
Example; is an IP address. Computers work only with binary address. In computer language this IP is shown below.
      204     .     132    .       40      .     155

IP Classes (WAN): This IP ranges are public IPs. For example; google.com = DNS converts google.com to

Class          Address Range                      Supports
Class A  : to     Supports 16 million hosts on each of 127 networks.
* Ranges 127.x.x.x are reserved for the loopback or localhost, for example, is the loopback address. 
Class B  : to Supports 65,000 hosts on each of 16,000 networks.
Class C  : to Supports 254 hosts on each of 2 million networks.
Class D  : to Reserved for multicast groups.
Class E  : to Reserved for future use, or Research and Development Purposes.

LAN IP Ranges: (This IP ranges are usually used for LAN such as in school network or a company network.)
Class A :       -
Class B :     -
Class C :    -

What is Subnet Mask?

Think like that! IP is a home number. Subnet mask is a district. Subnet Mask is also grouped by classes.
Class A Subnet Mask:                        (CIDR version: x.x.x.x /8)
Class B Subnet Mask:                    (CIDR version: x.x.x.x /16)
Class C Subnet Mask:                (CIDR version: x.x.x.x /24)
Class D Subnet Mask:            (CIDR version: x.x.x.x /32)
* Only red part changes.
** CIDR (Classless Inter-Domain Routingis a method for allocating IP addresses and IP routing. = 11111111.00000000.00000000.00000000 (binary system) There are 8 one (1). an IP can be shown as /8 . It means its subnet mask is

If you want to calculate how many host (device) can get IP in a local network;
Count 0 (zero) in subnet mask = n
2^n-2  (Why -2? Because the forst one is network ID, the last one is Broadcast IP.) Let me explain with an example:

IP: /22
Explanation:  " /22 " means there 22 one (1) in subnet mask which makes 11111111.11111111.11111100.00000000   =
This IP hosts are 2^10-2 = 1024-2 = 1022

So, IP can be between and => Network ID => Broadcast IP

Find network ID&Broadcast IP with AND Operation:

Let me explain it with a sample!
What is the network ID of the IP node with a subnet mask of

First turn both numbers to binary, then AND operation:

10000001  00111000  10111101  00101001 IP Address
11111111   11111111   11110000  00000000 Subnet Mask
10000001  00111000  10110000  00000000 Network ID   =>>

Also, there are several online IP calculator. You can use them to find IP range as well.
One of them is http://jodies.de/ipcalc


Popular posts from this blog

MCAS ProctorCache Setup

My CCNA Useful Links