Sunday, 30 June 2019

Oracle Cloud as Infra - CIDR Notations

CIDR 

Classless inter-domain routing


Problem Statement 

Classless inter domain routing is one of the concept of IPV4.  We know in IPV4 our internet address is been created with the four segments separated by "." like 100.1.2.122.  To make internet working this address has to be unique on the internet so that one system can identify and communicate with other. With the evolution of the internet it became difficult to manage the all Ips and provide the unique ips to all machine, which forces  concept of subnet cto evolve.

 With the Subnet, a computer address has to be unique in the subnet, and then subnet address has to be unique over the network. Its like your IP of the computer has to be unique across your router and then your router IP has to be unique across your ISP, then your ISP might be having a fixed IP. 

Hence here is an requirement to specify the address of the computers over the network because these systems talk to each other over the network. To communicate every system has to have a unique ip in a network hence if two of the local compute want to transfer data then both check ip address and see if network  network address for both are same or not.

Example if Address are like

192.168.0.1   and 192.168.0.2 and  192.168.  is the network address then both belongs to same subnet.

Now there are only three ways to create a network name it will be

*.*.*
*.*
*

where * represents any number from 1-255 and network can have three choices of system under a subnet.

2 *8 = 256
(2*8)*8 =  66536
((2*8)*8)*8 = 16777216


But lets say we want a number in between then we need to put a cross in between like

11111111.11111111.1111 | 1111.11111111
 ----------------------------     ----------------
    Network address               address of systems

we have cut it at 20th place hence bits till 20th place are the network address and last 12 bits are network address,  This is been done in the notation of CIDR which tells, how many bits are used for the network like a.b.c.d/24 mean initial 24 bits are been used for the network and rest are free.

Example

if we say  192.160.0.0/24 is the notation been given then

11001000.10100000.00000000.00000000
------------------------------------   ------------
Nw Add                                        System


11001000.10100000.00000000.00000001
------------------------------------   ------------
Nw Add                                        System


Both of the systems are belongs to same network.


Another example
a.b.c.d./22

10100000.10110000.000000|00.00000001 = 160.176.0.1

10100000.10110000.000000|11.10110001 = 160.176.2.177

Both of the above belongs to same subnet.

we have to give this notation in cloud environments to declare how may instances are going to be created under a subnet also this is pretty useful to understand with the cidr notation if two machines are local or remote to each other.





References

 https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing














No comments:

Post a Comment

Feature Selection in AI

In artifical intelegance/machine learning, everything start and end with data and in current world everyday by using facebook, insta we all ...