Basically it's all spelled out in the Ubuntu doc for 12.04:

https://help.ubuntu.com/12.04/serverguide/network-configuration.html