Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set up a static IP address for my new Ubuntu server.

I have been trying to do some research and found information that got me started on this reference page.

One thing that was different for me. When I use the GUI to set up an internet connection. I select eth2 then I was connected to the internet using a DHCP IP.

When I converted the IP now I no longer have access to the internet unless I use the connection established by the GUI.

Here is what I have done
sudo nano /etc/network/interfaces

I changed the existing info to

iface eth2 inet static
address <static ip>
netmask <mask>
gateway <gateway IP>

then I edited this file
sudo vi /etc/resolv.conf

I added both of my DNS Server ips

then after saving the file I have done
sudo /etc/init.d/networking restart

I get the following error RTNETLINK answer: File Exists Field to bring up eth2

I have tried to change the Ethernet card number to eth1 and then to eth0 but still getting the same error.

What can I do to correct this problem?

share|improve this question

migrated from serverfault.com Feb 10 '14 at 15:11

This question came from our site for system and network administrators.

up vote 2 down vote accepted

maybe before restarting your network try sudo ip link set eth2 down also I myself have not had to go any further than putting the proper contents in /etc/network/interfaces to get a static ip address...

share|improve this answer
Thanks Jacob. That did not work. I tried to shutdown all 3 ethernet ports. why it is working only with eth2 for the DHCP? why it chose that one and not eth0? – Mike Feb 10 '14 at 17:24
Actually that did work. I had to turn down all 3 of them then use eth2 in the config file. That worked. thanks a lot :) – Mike Feb 10 '14 at 17:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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