First, it's worth knowing that a default Ubuntu Desktop installation uses a piece of software named NetworkManager to manage the network.
The advantage of that is that it's very useful on laptops where you move around among different networks a lot, since it makes it very easy to find and connect to wireless networks.
The drawback is that it seems you must be logged in to get a network connection, and that's obviously less than optimal for a server.
Instead of running NetworkManager, the way to go is to configure your network settings in the file /etc/network/interfaces, a file which will be read at startup. I'm a bit uncertain on how to disable networkmanager, but I think it will detect that an interface has already been configured and stay away from it when you login.
Anyway, assuming that your network card is named ath0, you need to add something like the example below to /etc/network/interfaces:
iface ath0 inet static
It's been a while since I tested doing this, so the above is untested. The following manpages should be of help: