How to configure your server to use DHCP

The Tilaa platform supports DHCP for configuring the public network interface of your server. This has many benefits over manual configuration, since you will automatically receive the correct settings should the gateway or DNS resolver addresses ever be changed. Next to that, it will make cloning a VPS a lot easier when we enable this functionality in the near future.

To set your VPS up for using DHCP, there are a few configuration changes which vary per operating system.

For CentOS/Fedora/Scientific Linux, modify /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

The IPADDR and NETMASK lines should be removed. Also, don't forget to remove the GATEWAY line from /etc/sysconfig/network

 

After this, make sure you have the DHCP client installed: yum -y install dhclient and restart the networking service: service network restart

 

For Ubuntu/Debian, modify /etc/network/interfaces

auto eth0
iface eth0 inet dhcp

The address and netmask lines should be removed.  

After this, make sure you have the DHCP client installed: apt-get -y install isc-dhcp-client and restart the networking service: service networking restart

 

For FreeBSD, modify /etc/rc.conf

ifconfig_em0="DHCP"

After this, restart the networking service: /etc/init.d/netif restart

 

For Windows, open the Ethernet Properties, then Internet Protocol Version 4 Properties and set it to Obtain an IP address automatically and Obtain DNS server address automatically

Schermafbeelding_2014-04-22_om_13.26.10.png

Have more questions? Submit a request

0 Comments

Article is closed for comments.