UPDATE. So I mispoke...
The first thing I should ask is: HOW are you having students disconnect from the router?
Two things to know:
1) In the simulator you are assigned one hostname per page load. Reloading the page does assign a new hostname, as would closing the window / tab and going back to the simulator.
2) Connecting to / disconnecting from routers does not change your hostname....provided you hit the disconnect button in the simulator, as opposed to refreshing the page, or closing the window.
This means that once a hostname is learned it should remain the same for the duration of the window being open. Any chance you were having students close the window, or refresh, rather than hitting the disconnect button?