Hello Kingsly
Hmm, this looks suspiciously like a homework question
Here goes…
For convenience, we’ll express the first two octets of the IP address in decimal format and the next two in binary, since most of the calculations will occur on those two octets. So, in that form, 192.168.0.1 looks like this: 192.168.00000000.00000001
.
We are told that the address has 20 bits for the host portion which means a subnet mask with 20 ones and 12 zeros. In binary, that is 11111111.11111111.11110000.00000000
. In dot decimal, that is 255.255.240.0. In our hybrid notation, we’ll use the following: 255.255.11110000.00000000
.
We can find the separation of the parts of the address that belong to the host portion and those that belong to the network portion using the subnet mask. Wherever there is a 0, that digit is in the host portion. So the separation occurs here:
255.255.1111|0000.00000000
192.168.0000|0000.00000001
Now to find the Network address, make all of the host portion zeros. So the network address is:
192.168.0000|0000.00000000
or 192.168.0.0
To find the Broadcast address, make all the host portion ones. So the broadcast address is:
192.168.0000|1111.11111111
or 192.168.15.255
The first host address is the Network address plus 1. So, the first host address is:
192.168.0000|0000.00000001
or 192.168.0.1
The last host address is the Broadcast address minus 1. So, the last host address is:
192.168.0000|1111.11111110
or 192.168.15.254
Concerning the second question, a /30 subnet will give you only two usable host addresses. What kind of network would need only two addresses? A point to point network. Such a network can be used to connect two routers together, since no other devices would exist on such a network.
I hope that this is an opportunity for you to learn using these answers and not just to get your homework done
Both are important of course, but learning is what this site is all about!
I hope this has been helpful!
Laz