- A device in a network can connect to any other device in the same network.
- Router is a device which can forward the packets from one network to other.
- We can use
ipconfig on windows and
ip addr on linux machines to get ip address
- ip address is 4 octect number represented in the format of
- Ip address is used to uniquely identify a device in a network.
- Ip address => Combination of network id + host id
- Subnet mask helps in identifying the network id => host id
255 octets: 192.168 => Network Id
0 octects: 0.10 => Host Id
- Lets look at one more example
- Each network reserves two ip address one for network id and one for broadcast => 2^n-2 (n=> number of bits in host id)
- Every router will have route tables which are rules to forward the packets.