GCP Classroom Series – 11/Feb/2021

Networking Foundations

IP Addressing

  • This is used to uniquely identify a system connected to a network
  • There are two popular Ip Addressing formats
    • IP Version 4
    • IP Version 6
  • IP v4 address structure:
    • This a 32 bits divided into 4 eight bit Octet (group of eight)
    • IP v4 is represented in a format called as dot-decimal format
    Binary Value: 10101001.11100011.00011001.11011010
    Decimal value: 169.227.25.218
    
    • ip v4 addresses will be in the following range in dot decimal format
    0.0.0.0 to 255.255.255.255
    
  • Using IpV4 to create networks Classfull IP addressing was introduced Preview
  • IP Address: Preview
  • IP Address is combination of two addresses network id and host id. Just by looking at ip address we cannot specify what is network id and what is host id
ip: 192.168.0.10
  • To determine network id and host id we need subnet mask
ip: 192.168.0.10
sm: 255.255.0.0
nid: 192.168.0.0
hid: 0.10
network size => number of hosts that can be connected to this network
hid size => 2 octets => 16 bits => 2^16-2 (one for network id and one for broadcast address) => 65536-2 => 65534


ip: 10.11.25.10
sm: 255.255.255.0
nid: 10.11.25.0
hid: 10

network size => 1 octet => 2^8-2 => 254

ip: 172.16.0.9
sm: 255.255.255.0
nid: 172.16.0
hid: 9
network size=> 1 octet => 8 positions => 2^8-2 => 256-2 =>254
  • If we follow this convention we have 3 possible networks
network 1 SM => 255.255.255.0 => Network size = 254
network2 SM => 255.255.0.0 => 65534
network 3 SM => 255.0.0.0 => 16777214

  • Scenario: In my office network i want to connect 500 devices
    • So as per the above ip addressing you have to go with network 2 which is of size 65534 whereas we require only 500 devices
    • Other approach can be create two networks of size 254 each
  • Now Lets under CIDR (Classless Interdomain routing) addressing scheme
  • Till now we are looking at SM octets as decimal, if we start looking at SM as binary numbers
ip: 192.168.0.10
SM => 11111111.11111111.11111111.00000000
n/w size => 2^8-2 = 254
cidr => 192.168.0.10/24

ip: 192.168.0.10
SM => 11111111.11111111.11111110.00000000 => 255.255.254.0
n/w size => 2^9-2 => 512-2 => 510
cidr => 192.168.0.10/23

ip: 192.168.0.10
SM => 11111111.11111111.11111000.00000000 => 255.255.248.0
n/w size => 2^11-2 => 2048-2 => 2046
cidr => 192.168.0.10/21


ip: 192.168.34.193
SM: 255.255.255.240
SM: 11111111.11111111.11111111.11110000
n/w => 2^4-2 =>14
cidr: 192.168.34.193/28

  • How does two systems in a network know that they belong to same network?

    • Two systems are considered to be ina a same network when their n/w id is same Preview
  • Basic Networking rule: A system can communicate with other system in the same network. Network packets can travel only with in a network

  • Two networks cannot communicate directly, we need a router to forward packets from one network to other Preview

  • In the ip config we have default gateway is ip address of router.

Leave a Reply

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

About learningthoughtsadmin