Edit the file /etc/network/interfaces to contain the following entries:
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.20
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
Reconfigure the network interfaces with the following command:
user@ubuntu:~$ sudo /etc/init.d/networking restart