CIDR stands for classless inter domain routing
there are some disdavntages with calssful addressing cidr will solve those issues
in classfull adressing if we want 100 ip adresses we can go for class c which have 256 hosts,if we want 300 ip’s we can go for class b which has more than 300 ips
cidr solve that issue by giving required number of ip addresses in block form
cidr blocks will always contains addresses in the power of 2 like 2^8,2^9…etc
There’s no classes in cidr,so how can we find network id ,host id?
cidr notation will tell that,cidr notation will look like this 192.168.1.1/24,here 24 bits used for nid,remaining
bits used for host id.
subnetting in cidr
ex:20.30.40.10/25
we need 2 subnets
lets find host bits
host bits falls on last octet last 7 bits cause nid 25 bits
convert last octet to binary