In this tutorial, I show how to configure a Cisco router (model is unimportant as long as it has to FastEthernet/Ethernet interfaces1) to act as an edge router, connecting multiple VLANs to the Internet via a Cable or DSL modem.
In order for this to work, you must receive your IP address via DHCP. If you use PPPoE or some other mechanism to connect to your ISP, then this tutorial can be a place for your to start, but that is outside of the scope of this article.
I am also assuming that you will have a 24-port Cisco switch. A fewer number of ports is fine, so long as you change any references of interface F0/24 to whatever your highest numbered port is. NOTE: This probably works with other managed switches that support VLANs via 802.1q, but I have not tested this and cannot be sure.