This was tested in Ubuntu 12.04.4 LTS.
Open interfaces file.
sudo vim /etc/network/interfaces
Add following entries(Assuming eth0 as the physical interface)
auto eth0
iface eth0 inet static
address 172.16.0.172
network 172.16.0.0
netmask 255.255.0.0
broadcast 172.16.0.255
gateway 172.16.0.4
dns-nameservers 172.16.0.5
Change the ip addresses as per your environment.