How do I set up a network with three virtual machines using Virtualbox and Ubuntu 12.04 32-bit so that they all run together?
There are lots of ways to do that.
Usually the virtual machines network card is connected to a pre defined network called NAT. That network does always run a dhcp-server that gives a IPv4 address to the virtual machine. It is usefull because you can reach internet through that and the host machine. But each virtual machine get its own NAT network. So it can't talk to any other machine.
One sollution is to set the network card to use an Internal Network. You can have many of those, all named differently, and all virtual machines that connect to the same Internal Network is connected to each other. The problem is that now there are no dhcp-server or router running in that net. So you have to set uṕ the machines to use static address and without any connection to the world (through NAT or bridgeing).
But you could add a virtual machine with two internet cards that works as a router(with NAT) for your internal network One connection to your Internal network, posisble with a dhcp-server for your net, and one NAT or Bridge to talk to the rest of the world.
Now you have a working Internal Network for your machine and Internet connection through the virtual machine that works as a router.