CA 16 - Write a blog on IP address and Subnet

 IP ADDRESS:

        Ip Address is a unique address given to the devices which are connected on a network. There are two types of IP address:
                        
                                   1. IPv4 Address
                                   2. IPv6 Address
    
    IPv4 :- Ipv4 address has total bit of 32 bit, where each 8 bits are seperated by dot and represent the value between the range of 0-255. 
    
    IPv6 :- IPv6 was introduced to meet the increased demand for IP address due to the incresed number of devices on network. IPv6 address contain total of 128 bits leveraging more number of address for the devices to use.

    
       But the IPv6 has not been commercialized , which is seen as a faiure model.

    IP address can be classified based on it's persistent allocation to a specific device :
                                               
                                                1.Static IP
                                                2. Dynamic IP

    Static IP: The IP address is alocated for the specific device, so even when the device disconnects from the internet and then connect back, the device wil have the same IP. Static IP are purchased by companies which host their application on internet, this if people have to access it they will make use of the static ip (indirectly)

    Dynamic IP: This is the IP which we commonly used by people (consumers), we will be assigned with a IP for our device and if we disconnect and connect again a new IP will be assigned. So the device will not have a fixed IP address rather the IP address changes everytime the device connects to the network.

    Due to the shortage of the IPv4 address subnet what introduced. With the introduction of the subnet came the private IP and public IP.

    Public IP: Public IP uniquley represents a device on the whole internet.
    Private IP: Private IP uniquely represents a device in a loval network.


SUBNET:

    Subnet: Decentralizing the single network into cluster of networks. Say that instead of having a single large class for the whole CSE department, it is decentralised as CSE -A , CSE - B, CSE-C and CSE-D.

    We could explain this same example for the use of private and public IP. Let us consider roll number for students which is only inside the class like Roll no: 1,2,3,4 so on. And each class has it's own identity which can be as CSE-A :- 104A , CSE-B :- 104B etc.

    Here CSE-A student's can have roll no from 1,2,3,4...... as well as CSE-B ,CSE-C and CSE-D too can have the same. Thus student in class A can have the same roll number as student in class B, but cannot have same roll no inside his or her class itself. But the roll number for the class CSE-A,CSE-B,CSE-C and CSE-D will have unique roll numbers. [Wild assumption that class has a roll number :-) ]

    So in this example the roll number of student is Private IP - which is used to uniquely identify a student inside the classroom and the roll number of the class is Public IP - Which is used to identufy the class uniquely in the entier college.

    The IPv4 address has two parts:
                        
                        1. Network Part
                        2. Host Part

    Network Part: It is determined by the (class in our exmaple) by the modem. Network part is fixed.
    Host Part: It is determined by the (student in our example) by the device in private network

                                                          10.31.81.4 / 24 

    The 24 determines the network part in a IP, Which is as previously told IPv4 is of 32 bits, out of that the first 24 bits are fixed by the modem, thus any devices connected to this modem will have this starting 24 bits fixed and the rest 8 bits is determined by the host.

    2^8 - 256 values so the range is 0-255. The 10.31.81.0, 10.31.81.1, 10.31.81.255 are pre occupied for the modem and broadcasting channel. So any devices connecting to this modem can take up value from 10.31.81.2 - 10.31.81.254. so 252 devices can connect to this modem, if in case any more dvices try to connect they cannot connect [ Tested and proved by Mr.Sayed Jaffer with the help of docker, thank you bro ]

     

Comments

Popular posts from this blog

CA 04 - Two Sum & Sorted Two Sum

CA 05 - Reverse the array

CA 21 - Basic Select SQL Queries