2

Error/stdout

 /etc/init.d/networking restart
 * Reconfiguring network interfaces...
SIOCADDRT: File exists
Failed to bring up eth0.
   ...done.
netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.0.1.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
0.0.0.0         10.0.1.1        0.0.0.0         UG        0 0          0 eth0
0.0.0.0         10.0.1.1        0.0.0.0         UG        0 0          0 eth0


ip route list
10.0.1.0/24 dev eth0  proto kernel  scope link  src 10.0.1.14  metric 1 
default via 10.0.1.1 dev eth0  proto static 
default via 10.0.1.1 dev eth0  metric 100 


/etc/network# more interfaces 
auto eth0
iface eth0 inet static
    address 10.0.1.14
    netmask 255.255.255.0
    network 10.0.1.0
    broadcast 10.0.1.255
    gateway 10.0.1.1
more hosts
127.0.0.1   jenkins-server-1.bts.md  jenkins-server-1
10.0.1.14   jenkins-server-1.bts.md jenkins-server-1 # Added by NetworkManager
#127.0.0.1  localhost.localdomain   localhost
127.0.0.1   jenkins-server-1.bts.md  jenkins-server-1
#127.0.0.1  jenkins-server-1.bts.md  jenkins-server-1
::1 jenkins-server-1    localhost6.localdomain6 localhost6
#127.0.0.1  jenkins-server-1.bts.md jenkins-server-1
#::1    jenkins-server-1    localhost6.localdomain6 localhost6
#127.0.1.1  jenkins-server-1.bts.md
# The following lines are desirable for IPv6 capable hosts
#::1     localhost ip6-localhost ip6-loopback
::1     jenkins-server-1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
3

If you are changing the network configuration, it is normal to get such type of errors when restarting the network. If you are not accessing the machine remotely, you can first stop the network and then start it. If your configuration is fine, the interface(s) should be up again.

If you are still getting errors, you can try using ifconfig directly.

5

As background information: In the context of network configuration, the File Exists error message is a bit misleading. What it means is that the network element you're trying to add (usually a network route) conflicts with an existing one or has already been added.

For example, you'll get this error if you try to add a "default" route if it has already been set.

0

In my case, the gateway had a problem. When I restarted gateway computer, and rerun the statement:

/etc/init.d/networking restart

The error message gone and worked properly.

  • 1
    The accepted answer already covered this. – chutz Oct 19 '12 at 22:58
  • @chutz my answer mentions the gateway restart – Ebru Yener Jul 20 '15 at 7:55
0

This is really silly but my network cable was unplugged... Layer 1 problems!

So check your network cable too!

  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question. - From Review – chicks Feb 22 '18 at 17:43
  • @chicks This was the answer that I came upon while troubleshooting - my response would have saved about 20 minutes of additional work. The error message does not make it obvious that a cable could be missing. No one notes that in any answer here. It's another possible solution and it's worth mentioning! – Shrout1 Feb 22 '18 at 17:47

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.