You want to go through this tutorial to get more or less complete overview of how to configure VLANs properly.