23 Kasım 2022

CIDR (Classless Inter-Domain Routing) Notation


{8Bits}. {8Bits}. {8Bits}. {8Bits} / {Allocated Bits}

00000000 = 0

11111111 = 255

 Example: 102.123.149.240 / 24

 

Allocated Bits To Address         Allocated For Range

102.123.149                                .240 / 24                       => 102.123.149.000 - 102.123.149.255

102.123                                       .149.240 / 16                => 102.123.000.000 - 102.123.255.255

102.123                                       .149.240 / 20                => 102.123.144.000 - 102.123.159.255 

 

Algorithm For 102.123.149/20

102.123 => 8+8 => 16 Bits Used Remained 4

149 => 1 0 0 1 0 1 0 1 => 1 + 4 + 16 +128 

First 4 are allocated we will use remained ones

1 0 0 1 0 0 0 0  to 1 0 0 1 1 1 1 1

=> 128+16 to 128+16+8+4+2+1

=> 144 to 159

Thus =>

102.123.144.000 - 102.123.159.255