SIOCADDRT: File exists

SIOCADDRT: File exists error pops up in Linux while configuring network interfaces.

We should first understand what exactly SIOCADDRT mean before checking the message.

SIOC: Serial Input Output Controller
ADD: ADD
RT: RouTe

File Exists: Route is already configured in the Network interfaces.

After doing a basic internet search, I could realize that somewhere the eth0 interface was not properly set along with the gateway. I had to set the eth0 interface again by deleting the old IP and then it started to work.

Below message pops up id you try to restart the network having the wrong IP. Update the interface with proper IP and then restart the network.

SIOCADDRT: File exists

/etc/sysconfig/network-scripts/ifcfg-eth0 –> File where I have edited the correct IP and then it started working.

While checking on internet, I could also see customers posting questions related to below values and almost most of the solutions are related to change in IPs,

SIOCADDRT: No such process

SIOCADDRT: Network is unreachable

SIOCADDRT: No such device