IP Route RTNETLINK Error: File Exists

IP Route RTNETLINK Error: File Exists

Post by Scott Wayt » Wed, 31 May 2000 04:00:00

Here's the setup:

The Linux Box has 2 NIC's eth0:External and eth1:Internal, it also has an
aliased IP on eth0:1

I am attempting to use NAT to forward the IP on eth0:1 to an internal IP
address using the following:

ip route add nat 24.x.x.x via 192.168.1.x

Every time I try this I get the following:

RTNETLINK error: file exists

I have also tried forwarding the IP on eth0 and got the same error.

Any help would be greatly appreciated.

What I am trying to do is forward one of our external IP's to an internal
Web box.
It already works if I use IPMasq forwarding for the http port, but
unfortunately we also want to be able to get to this site from inside as
well, thus the NAT solution.



1. rtnetlink: network unreachable for Routing for multiple uplinks using ip route add

Dear all,
after playing around and having the same problems on all linux
versions I have at hand and not finding a solution in the net I ask
for your help.

Problem: Want to set up a router with multiple uplinks to the
Checked documentation at several places, but all examples given will
not work!
Always get rtnetlink: network is unreachable.

Have tried this with IPCop 1.4.5, SUSE Prof. 9.1 same effect.

OK now the details:

For ISP 1 (all IP addresses not the real ones!)

For ISP2

/etc/rt_tables: (added at end)
200 T1
201 T2

Routing table empty but loopback device when I start:
ip route add dev eth0 src table T1
ip route add default via table T1
Error Message: rtnetlink: network is unreachable

ip route add dev eth1 src table T2
ip route add default via table T2
Error Message: rtnetlink: network is unreachable

If I use the commands without the table T1/T2 I am able to set the
route. But later it doesn't work.
I took the commands from
   Linux Advanced Routing & Traffic Control HOWTO
   Chapter 4.2
And crosschecked with
    Redundant Internet Connections Using Linux from

Same effect.
Kernel on Suse9.1:  2.6.4-52
Kernel on IPCop:    2.4.29

Kernel configured with:

ip version:
    Suse:  iproute2-ss020116
    ipcop: iproute2-ss010824

Any clues?

Thanks in advance

2. MOST desirable FEATURES in a OS for U.S.A

3. iproute2: RTNETLINK answers: File exists

4. man pages text only question.

5. IPv6-over-IPv4: "RTNETLINK answers: No route to host"-Error

6. Port / Source based routing

7. problem setting gateway with route, error SIOCADDRT:File Exists

8. Solaris 2.6: Can't login

9. "ip rule list" causes RTNETLINK error: Invalid argument

10. Routing table woes, or what does "file exists" mean to route?

11. Apache 1.3.9: File does not exist: path-to-existing-file

12. "No such file or directory" error when file exists

13. Routing and rtnetlink