When we use cloud to access the applications we need to figure out how to use virtual networks for that we need to have some basics of networking
Networking Basics
Ip address is used to uniquely identify a device on the network.
Let me find the ip of my laptop. On windows ipconfig or linux ifconfig or ip addr
Networking principle:
A device can connect directly to other device in the same network.
Whenever network packets need to travel to the different network they use router.
Default Gateway in the ipconfig is the ip address for the router
Lets understand IPv4 => x.x.x.x where each x is an octet i.e. it has 8 bits. The range of ip address is from 0.0.0.0 to 255.255.255.255
Ip address is combination of network id and host id
ip => network id + host id
Find the network id and host id
ip: 192.168.0.10
sm: 255.255.0.0
octets with 255: 192.168 => network id
octets with 0: 0.10 => host id
host id => 2 octets => 16 bits => 2^16 - 2 = 65536-2 => 65534
if the host id has all zero's => network id
if the host id has all one's => broadcast id