CIDR Notation / Network Prefix
Classless Inter-Domain Routing -CIDR
=========================================================================SID = Subnet ID, HID = Host ID, NID = Network ID
===============================================================
There is a simple scenario of CIDR,
192.240.10.0/28
1) Network id bit ?
This is class C ip. So network id have first 3 octet in ip. It is 24 bits. NID = 24 bits
2) Subnet id bit ?
CIDR = 28 = NID + SID = 24 +4
Then SID = 4 bits
3) Subnets ?
We can find the subnet count by SID count
SID = 4 bits, So 2^4 = 16
So there are 16 subnets
4) Host id bit ?
All ip bits - (NID + SID)
32-28 = 4
4 hosts
5) Address count ?
This depend on host id bits count,
HID = 4, So 2^4 = 16
6) Host count ?
NA = Network Address, BA = Broadcast Address
All IP host bit Count - (NA +BA)
16 -2 = 14
7) Subnet Mask ?
we can find the subnet mask by adding value 1 for NID, SID and adding value 0 for HID.
CIDR = NID + SID
So that similar to find the subnet mask by adding value 1 CIDR and adding value 0 for HID.
Then,
11111111.11111111.11111111.11110000
255 255 255 240
Subnet mask = 255.255.255.240
Comments
Post a Comment