2

I can't get internet on one of my computers. It says connected. I had this similar problem on my other computer and I used this command to fix it:

ip route add default via defaultgatewayip

It gives me this message:

RTNETLINK answers:file exists. 

And doesn't give me connectivity. What can I do and what does this message mean?

1

You have already a default route for this gateway

Example:

  1. No default route

    % route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    link-local      *               255.255.0.0     U     1000   0        0 eth0
    192.168.2.0     *               255.255.255.0   U     0      0        0 eth0
    
  2. Add a route

    % sudo ip route add default via 192.168.2.1
    
    % route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    default         fritz.box       0.0.0.0         UG    0      0        0 eth0
    link-local      *               255.255.0.0     U     1000   0        0 eth0
    192.168.2.0     *               255.255.255.0   U     0      0        0 eth0
    
  3. Add the route again

    % sudo ip route add default via 192.168.2.1
    RTNETLINK answers: File exists
    

    As you can see, here is your error message.

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.