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; 204.132.40.155 is an IP address. Computers work only with binary address. In computer language this IP is shown below.
      204     .     132    .       40      .     155
 11001100.10000100.00101000.10011011

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

Class          Address Range                      Supports
Class A  : 1.0.0.1 to 126.255.255.254     Supports 16 million hosts on each of 127 networks.
* Ranges 127.x.x.x are reserved for the loopback or localhost, for example, 127.0.0.1 is the loopback address. 
Class B  : 128.1.0.1 to 191.255.255.254 Supports 65,000 hosts on each of 16,000 networks.
Class C  : 192.0.1.1 to 223.255.254.254 Supports 254 hosts on each of 2 million networks.
Class D  : 224.0.0.0 to 239.255.255.255 Reserved for multicast groups.
Class E  : 240.0.0.0 to 254.255.255.254 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 :    10.0.0.0       -   10.255.255.255.255
Class B :  172.16.0.0     -    172.31.255.255
Class C : 192.168.0.0    -    192.168.255.255


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: 255.0.0.0                        (CIDR version: x.x.x.x /8)
Class B Subnet Mask: 255.255.0.0                    (CIDR version: x.x.x.x /16)
Class C Subnet Mask: 255.255.255.0                (CIDR version: x.x.x.x /24)
Class D Subnet Mask: 255.255.255.255            (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.
255.0.0.0 = 11111111.00000000.00000000.00000000 (binary system) There are 8 one (1). an IP can be shown as 10.1.1.1 /8 . It means its subnet mask is 255.0.0.0

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: 192.168.101.0 /22
Explanation:  " /22 " means there 22 one (1) in subnet mask which makes 11111111.11111111.11111100.00000000   =  255.255.252.0
This IP hosts are 2^10-2 = 1024-2 = 1022

So, IP can be between 192.168.101.1 and 192.168.104.254.
192.168.101.0 => Network ID
192.168.104.255 => 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 129.56.189.41 with a subnet mask of 255.255.240.0?

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   =>> 129.56.176.0

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






Comments

Popular posts from this blog

My CCNA Useful Links

My Rise Vision Experience

General Printer Errors