MultiCloud Classroom notes 18/Jun/2025

Networking contd

Network

  • Network is used to connect devices
  • Each device in a network gets an unique id which is referred as ip address.
    Preview
  • Ip address = network id + host id
  • There are two schemes of ip addresses
    • ipv4:
    • ipv6
      Preview
  • ipv4 is a 32 bit number divided into 4 equal parts and each part is referred as octet
X.X.X.X
range: 0.0.0.0 to 255.255.255.255
  • Lets find network id and host id.
     1   2  3  4
ip: 192.168.0.105
sm: 255.255.255.0
-------------------


  • Network Id: What octets have 255’s in subnet mask => 1, 2, 3. The equivalent in ip
192.168.0
  • Host Id: What octects have 0’s in subnet mask => 4
105
  • network id is constant/fixed for all devices in a network and hid is unique for every devices
  • Summary
ip: 192.168.0.105
sm: 255.255.255.0
-------------------
nid: 192.168.0
hid: 105
  • Size of network is number of hosts which you can connect to a network. the host id is deciding factor
nework size = 2^ (number of host id bits) - 2
hid = 1 octet => 8 bits => 2^8 - 2 = 256 -2 = 254
ip:  172.16.10.17
sm:  255.255.0.0

nid: 172.16
hid: 10.17

size = 2^16 -2 = 65536-2 = 65534
  • consider the following example
ip: 10.0.11.12
sm: 255.0.0.0

nid => 10
hid: 0.11.12

size => 2^24 - 2 = 16777216 - 2 = 16777214
  • Lets find the subnet mask based on our size needs
  • I need a network to connect 150 devices
2 ^ n - 2 = Size
  n => 8,16,24

2^n ~= Size
2^n  = 150
 n = 8

SM = 255.255.255.0
  • I need a netowrk to connect 270 devices
2^n ~= 270

n = 16

SM = 255.255.0.0
  • Since this scheme has a chance of creating networks which are way larger than needs, the alternative apporach is to look at SM as bits rather than octets
  • That means network id is number of bits where you will be having continuous 1’s and host id bits where you be having continous 0’s
  • I want a network of 280 devices
2^n-2 = size

2^n - 2 ~= 280
n = 9 (number of host id bits)
total bits = 32
network id bits = 32 - 9 = 23

SM: 1111111.1111111.1111110.00000000

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