If your running a server, you should have a static IP, yes this could be accomplished with DHCP, but what happens when the DHCP server goes down? That’s why I like to setup static IPs, especially on my servers!
Run the following command to open the interface config file:
# sudo vi /etc/network/interfaces
Replace this:
iface eth0 inet dhcp
With the following:
iface eth0 inet static
address 192.168.2.55
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
gateway 192.168.2.1
Then you have to restart your network adapter for the changes to take affect:
# sudo /etc/init.d/networking restart
