I hope everyone is doing well this evening. Regarding the subject of subnetting in a LAN, please bear with me as I try to quantify the question in which I have. While the question did spawn from a homework assignment that I am attempting to complete for a project, it's not really the project per se but more of a query which spawned from the creation of a small network LAN diagram that I created which consists of a router, two switches, and two work stations for the assignment.
Assuming that the subnet on the router is 255.255.255.0, that will allow for 254 devices and the IP address of the router, or default gateway, is 192.168.1.1.
Now lets assume there are three switches and each switch needs 30 IP addresses. The subnet mask on each of these switches can be configured to a mask of 255.255.255.224.
My question is: how are the IP addresses split up?
Obviously, since the mask on the router only allows for 254 devices, we can't have more than that in total on the LAN. If we are giving 31 IP addresses to switch one, 31 IP addresses to switch two, and 31 IP addresses to switch three, do the need to be divided up in a certain way?
Switch 1: contains 192.168.1.2 through 192.168.1.33
Switch 2: contains 192.168.1.34 through 192.168.1.65
Switch 3: contains 192.168.1.66 through 192.168.1.97
Do the IP addresses need to be configured in a specific way such as the example above? If not, what's the best practice when configuring a network in this fashion?