Since you're trying to learn I'll give you a hint about the solution that will point you in the right direction for further research. I find this is a much better way to get the information to stick if you have to discover it yourself.
And the hint is: DHCP or sniffing, and then based on the results from that - host scanning.



