I would very frequently use an unplugged cable as an interview test, but never had an automated one.
Just a couple of ideas, presuming your wires can be short (a metre or two)
- Use a switch as in that video -- any switch which interrupts both wires of a pair will cause faults. Endless variety on ebay ("dpdt toggle switch latching screw terminal"), just chop a patch cable and wire it up.
- Use a network controlled relay for scripted control. I see 16-relay units on ebay ("ethernet relay") for about £25 with screw-terminals, wire same as switch. You normally control it with web fetches, manually or by
curl
or similar.
Alternatively you have an old hub you can power that up and down, perhaps with a remote controlled power strip (eg from APC). Hubs won't be visible in CDP or similar.
I'd do it with the relay as you'll be able to generate interesting faults.
EDIT: Per comments to question, this kind of mechanical contactor is pretty much guaranteed to fail CAT5 tests. It will, nevertheless, work with short cables and I'd not expect it to generate errors detectable from the diagnostics available in a typical router. Given this is for generating problems for training courses, I'd regard it as acceptable. Indeed, now I'm thinking about how to automate a known-defective cable.