MultiCloud Classroom notes 19/Jun/2025

CIDR Notation

  • CIDR Notation
x.x.x.x/N

N = number of network id bits
  • examples

1. 10.10.0.0/24

N = 24 (24 bits for network id)
n = 32 -24 = 8 ( 8 bits for host id)

size = 2^n - 2 = 2^8 - 2 = 254

------
2. 192.168.0.0/22

N = 22
n = 32 - 22 = 10

size = 2^10 - 2  = 1024 -2 = 1022
  • Private ip ranges: Private ip ranges are fixed
    Preview
  • 192.168.0.0/16
192.168.0.0/16

N = 16
n = 32 -16 = 16
size = 2^16 -2 = 65534

ip =      192.168     .xxxxxxxx.xxxxxxxx
sip=      192.168     .00000000.00000000  = 192.168.0.0
eip=      192.168     .11111111.11111111  = 192.168.255.255
SM = 11111111.11111111.00000000.00000000

range = 192.168.0.0 to 192.168.255.255
  • 10.0.0.0/8
10.0.0.0/8

N = 8
n = 32 - 8 = 24
size = 2^24 -2 = 16777214

ip  =       10.xxxxxxxx.xxxxxxxx.xxxxxxxx/8
sip =       10.00000000.00000000.00000000 = 10.0.0.0
eip =       10.11111111.11111111.11111111 = 10.255.255.255
SM  = 11111111.00000000.00000000.00000000

range = 10.0.0.0 to 10.255.255.255
  • 172.16.0.0/12
172.16.0.0/12

N = 12
n = 32 - 12 = 20

size = 2^20 -2 = 1048574

ip  = 172.16.0.0/12
           172.0001xxxx.xxxxxxxx.xxxxxxxx
sip =      172.00010000.00000000.00000000 = 172.16.0.0
eip =      172.00011111.11111111.11111111 = 172.31.255.255
SM  = 11111111.11110000.00000000.00000000

range = 172.16.0.0 to 172.31.255.255
  • In any cloud we will be creating private networks

Examples

Scenario 1

  • I want to create a network with 500 devices, create a private network
size = 500

2^n - 2 ~= 500
2^n  ~= 500
n = 9 (number of host id bits)
N = 32 - 9 = 23

options: 172.16.0.0/12
         192.168.0.0/16
         10.0.0.0/8
ip  =  192.168.0.0/23
    =      192.     168.0000000x.xxxxxxxx
sip =      192.     168.00000000.00000000 = 192.168.0.0
eip =      192.     168.00000001.11111111 = 192.168.1.255
SM  = 11111111.11111111.11111110.00000000

range = 192.168.0.0 to 192.168.1.255

Scenario 2

  • I need a private network to connect 25 devices
size = 25
2^n - 2 ~= 25
n = 5
N = 32 -5 = 27

ip  = 172.16.0.0/27
           172.      16.       0.000xxxxx
sip        172.      16.       0.00000000 = 172.16.0.0
eip        172.      16.       0.00011111 = 172.16.0.31
SM  = 11111111.11111111.11111111.11100000
  • Exercise: Try creating private networks of sizes
    • 600
    • 100000

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube