You'd want a switch, not a router, and consumer gear isn't going to cut it. You'd need a managed switch that supports port security, like most Cisco or HP enterprise switches. In lieu of hardware, a simulator like Packet Tracer should also work. I believe that you'd have to be enrolled in Cisco's Netacademy to get a legit copy of Packet Tracer, but there may be other open source programs that you could find.
I have to mention that you should at least have a basic understanding of switching if you're going to learn about port-security, otherwise I don't think that you'll understand it on the level that you should.