One way to have students work with routers/switches online is to use a lab program such as LabSim. Basically they are able to walk through the commands that will be used in setting those devices up. LabSim does a great job of working to show how to identify and work with various hardware components too.
In more advanced networking courses I have used the Cisco online live labs. Those are much more involved than the LabSims and the student is essentially working on live networking equipment.
David