MultiCloud Classroom notes 21/Feb/2024

IP v4 Address

  • Unique number given to a device on a network.
  • IPV4 is a 32 bit number which is grouped into 4 octets (8 bits)
X.X.X.X

X = octet
  = 8 bits
  = 2^8
  = 0 to 2^8-1
  = 0 to 256 - 1
  = 0 to 255
  • Range of IPv4
0.0.0.0 to 255.255.255.255
  • Ip Address: i have asked for ip address and i got
    • subnet mask
    • default gateway
  • IP Address = network id + host id
  • Network id is same for the entire network i.e. it is fixed
  • host id represents a host in a network. number of unique host ids we can have defines size of the network.
  • In every network we can use two ips i.e. (all zeros and all ones)
    • all zeros => network id
    • all ones => broadcast id
192.168.0.10
  • To figure out the network id from ip address we need subnet mask

ip: 192.168.0.10
sm: 255.255.255.0
--------------------
    192.168.0         => network id
               10     => host id
                      octects for host id = 1 = 8 bits = 2^8  
                      size = 2^n - 2
                            = 2^8 - 2
                            = 256 -2 
                            = 254
                      192.168.0.xxxxxxxx
                      192.168.0.0 => network id
                      192.168.0.255 => broadcast id

ip: 10.10.0.11
sm: 255.255.0.0
---------------------
    10.10             => network id
           0.11       => host id 
                      => host id size = 2 octects = 2 * 8 = 16
                      size = 2^16 - 2
                           = 65536 -2
                           = 65534

ip: 10.0.0.8
sm: 255.0.0.0
--------------------
     10              => network id
        0.0.8        => host id
                     => size = 3 octects = 3*8
                     size = 2^24-2
                        = 16777216 - 2
                          16777214 


  • Exercise
network 1
ip: 172.16.0.9
sm: 255.255.0.0
---------------------
nid: 172.16
hid:        0.9
size = 2 * 8 = 16 => 2^16-2 = 65534


network 2
ip: 172.16.0.9
sm: 255.255.255.0
---------------------

size = 2^8-2 = 254

  • We have 3 possibilities:
    • 1 octet ~= 250
    • 2 octet ~= 65000
    • 3 octet ~= 16777214
  • To design network we have two ip addressing strategies
    • Classful Network
    • Classless Networks (CIDR classless inter domain routing)
      • start looking at subnet masks as binaries rather than octets
      • private networks:
        • this is not directly acessible from internet
        • duplicates are allowed i.e your network and other network might have same range.
        • all private networks will be in the following ranges
          • 192.168.0.0 to 192.168.255.255
          • 10.0.0.0 to 10.255.255.255
          • 172.16.0.0 to 172.31.255.255
      • public networks:
        • this is accessible directly from internet
        • duplicates are not allowed

Activity 1:

  • Refer Here for 2 power table
  • I want to create a network of 300 devices what would be subnet mask
2^n -2 ~= 300

2^n ~= 300

n = 9
host bits (n) = 9
network id bits (N) = 32 - 9 = 23

SM: 11111111.11111111.11111110.00000000  => 255.255.254.0

  • I want to create a network of 10000 devices what would be subnet mask
2^n ~= 10000
host bits (n) = 14
Network id bits (N) = 32 - 14 = 18
SM: 11111111.11111111.11000000.00000000 = 255.255.192.0
  • I want to create a network of 50 devices what would be subnet mask
2^n ~= 50
host bits (n) = 6
Network id bits (N) = 32 - 6 = 26
SM: 11111111.11111111.11111111.11000000 = 255.255.255.192
  • I want to create a network of 300000 devices what would be subnet mask
2^n ~= 300000
host bits (n) = 19
Network id bits (N) = 32 - 19 = 13
SM: 11111111.11111000.00000000.00000000 = 255.248.0.0
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Exit mobile version
%%footer%%