A subnet mask divides an IP address into network address and host address.
Correct. Apply the mask and you can see which part belongs to the network, and the reminder is the host address.
e.g. mask 255.255.255.0 and 188.8.131.52 would yield
IP: 00000001.00000010.00000011.0000100 (184.108.40.206. in binary)
Mask: 11111111.11111111.11111111.0000000 (mask in binary)
Net: 00000001.00000010.00000011.0 (220.127.116.11)
A network address always ends with a series of 0's like (mostly for
all subnets) such as 18.104.22.168, 22.214.171.124 and 126.96.36.199.
It often does, but part of that is habitual. I could use a netmask of 255.255.255.128 (Binary 11111111.11111111.11111111.1000000) to get smaller subnets. And 10.20.30.128 would be a network address, with 10.20.30.129 the first possible IP on it, 10.20.30.130 the second possible etc etc.
And for 10.20.30.0 to 10.20.30.127 the broadcast IP would be 10.20.30.127.
Routers act as intermediate stations to transfer data to the correct
Correct. They look at their routing table. If know have a specific route then they apply it. If not they forward it to their standard place. This is where the default gateway comes in.
Now, I have the following questions- What actually is network address ?
Does it identify any real world host or Router?
i.e. are addresses like 188.8.131.52, 184.108.40.206 or 220.127.116.11 actually
assigned to any routers or hosts.
No. Network address are usually not assigned. They could be but then things would break down in most cases because the network address used to be used as the broadcast address before this got changed to the highest address in the network. Different implementations of IP stack would make using the network adress fun.
You might get away with it in very specific circumstances. E.g. on a specifc OS and with specific routers. But once you start to mix things, upgrade drivers or send things outside of your control (e.g. onto the Internet) you are going to have job security while debugging...
If they are assigned to routers then why is my local lan router
identified as 192.168.0.1 which is not a network address
That is merely a normal IP. 192.168.0.0/16 is usually used as a /24, with usuable IPs from 192.168.0.1 though 192.168.255.254 (65536-2 IPs). With the first IP usually reserved and the last IP reserved (as broadcast address).
Most SoHo setups take the RFC1918 range of 192.168.0.0/16, split in into 256 smaller subnets (/24) and assign the router the first or the last usable IP.
This makes a lot of sense when you design a network. One of the first things you need to plan the a way off the local network, and giving that the first IP got to be custom. But that is pure custom. Giving the router and IP of 192.168.1.42 is equally valid.
Suppose a request for 18.104.22.168 comes to a router, the router applies the subnet mask to it and suppose comes out with the network address as 22.214.171.124, so now it will check it's routing table for network address as 126.96.36.199 and refer to the corresponding routing table entry that is capable of handle this request and that router further handles the requests.
Are my following assumptions true?
A router finds the network address from the IP address and checks its
The routing table contains entries in the form of network address vs Router address and then a matched router address is picked up for forwarding the request.
Not sure about the versus. It contains network addresses. Briefly it does this:
- If the routers was the destination then the packet is handled up.
- If the router was not the destination then a router will check if it has a specific entry for a that host. Of it has it will forward it based on that.
- If the router was not the destination then a router will check if it has a specific entry for a network. If it has then it will forward it based on that.
- If the router was not the destination and it has neither of those then it will forward it to the default gateway as set on that router
All request's for IP address in the range 188.8.131.52 to 184.108.40.206
will be mapped to network address 220.127.116.11 and will be sent to the same
router for further routing.
Only for a /16. There are 30 possible network masks (excluding 0.0.0.0 and host-to-host specific ones) and only 3 of those end on the common round .0's