voodish logo
tweet rss book of faces Linked In

SIOCADDRT: File exists [FIXED] Linux Network IP

This error can normally show up when adding or modifying an IP address. The fix is relatively simple, but not always particularly obvious with the lack of documentation, so here’s a fix for those in need.

The Problem

After a service network restart, this error can present itself.

Breakdown of message: SIOCADDRT: File exists

SIOC - Serial Input Output Controller
ADD - Add
RT - Route
File exists - Route already configured

The Solution

Quite simple, you will need to check and edit each IP address in the corresponding ifcg file.

Example

1. Open ifcfg file vi /etc/sysconfig/network-scripts/ifcfg-eth0:7
2. NETWORK=217.174.242.0 Make sure this address is unique to each ifcfg file; if you use the same address in another ifcfg file you will receive the aforementioned error.
3. Edit if required by pressing i to begin insert mode, make the changes, then pressing Esc to return to view mode.
3. Save the document by using a SHIFT ZZ combination.
4. Restart the network: service network restart

That’s it, said it was easy, that should have fixed the error message, let us know how you get on with a comment below.

Related Articles

Comments RSS Feed

1 Trackbacks/Pingbacks

  1. Pingback: Basic Network Problem .. cant ping, cant access internet.. on July 23, 2011

8 Comments

  1. brian May 10, 2009

    I have this error but do not have that directory in sidux. Do you know where this file might be for sidux?

  2. Go to Top of the page

  3. admin May 10, 2009

    Hi Brian, I’m not familiar with Sidux, have you tried:

    /etc/network/interfaces

    http://manual.sidux.com/en/internet-connecting-wpa-en.htm#wpa7
    Section 5

  4. Go to Top of the page

  5. corne May 29, 2009

    well i think your right as far as i can find sidux looks very debian based. so /etc/network/interfaces will do.

    but i have a problem i have one ip on a ubuntu server.

    i have search a couple off websites and nothing will do. the network interface is perfectly programmed and the server shows in mii-diag that the server have link but the server is not comming online already flushed the iptables and there is no firewall on it.

    and still when i put eth0 up : SIOCADDRT: File exists.

    well i don’t know what it is but when i find out i will let you know.

  6. Go to Top of the page

  7. ed August 11, 2009

    This does not help for dhcp setups

  8. Go to Top of the page

  9. Trouble August 18, 2009

    Many thanks, I would have been in for a long haul trying to guess that one, without your info.

  10. Go to Top of the page

  11. Syntax3rror September 13, 2011

    Perfect!!!

    THis blog really solved my problem.

    Thanks.

  12. Go to Top of the page

  13. G-Men November 6, 2012

    I had the same problem in fedora. The location of the file is /etc/sysconfig/network-scripts/
    The solution for my dilemma was that I had configured two eth(0 &1) and they both were submitting for a default gateway. I removed the gateway from one of them and restarted the services. This resolve my issue. You can check the default gateway using the command route with no options

  14. Go to Top of the page

  15. admin November 6, 2012

    Nice, thanks for sharing :)

  16. Go to Top of the page

Leave a comment