when i was installing Ubuntu 14.04 Server Install Image, i got a DHCP error. I said continue without configuring DHCP. I completed my installation and the server is up and running.

The server is physically connected to the network. Now what should i do to access internet from the server.

I am a beginner. It will be great if someone can take me to the right step by step process to setup the network on the server.

  • Do you have a DHCP server running on your network? – muru Oct 15 '14 at 23:23
  • Typically consumer grade routers and wireless access points are running DHCP servers. – David Foerster Oct 16 '14 at 0:33

This is a server. Use a static IP.

To do this, open up /etc/network/interfaces and add this:

iface eth0 inet static

Of course, set the IPs to the proper values.

address --> IP Address you want the server to have
netmask --> Your system's NetMask (usually
gateway --> Your router's IP address

Remove this line if it exists:

iface eth0 inet dynamic

Now, you have IP addresses assigned. You need a DNS server to use hostnames on the Internet. Do this by opening /etc/resolv.conf and removing all nameserver lines. Then, add these:


Replace above IPs with whatever nameserver/DNS server you want to use.

Finally, reboot (Will almost always work) or run the below command to apply the changes.

sudo ifdown eth0 && sudo ifup eth0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.