Understanding Networking
- 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
ipconfigon windows andifconfigorip addron linux machines to get ip address - ip address is 4 octect number represented in the format of
x.x.x.x=>0.0.0.0to255.255.255.255 - 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
ip: 192.168.0.10
sm: 255.255.0.0
255 octets: 192.168 => Network Id
0 octects: 0.10 => Host Id
- Lets look at one more example
ip: 10.10.11.90
sm: 255.255.255.0
nid: 10.10.11
hid: 90
- 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.
