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

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

Post by joerg sau » Tue, 19 Apr 2005 13:39:48



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
internet.
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!)
eth0:      10.138.233.227
NETMASK:   255.255.255.240
GW:        10.138.233.226

For ISP2
eth1       10.51.238.226
NETMASK:   255.255.255.240
GW:        10.51.238.226

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

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

ip route add 10.51.238.224/28 dev eth1 src 10.51.238.226 table T2
ip route add default via 10.51.238.225 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
    http://www.samag.com/documents/s=1824/sam0201h/0201h.htm

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

Kernel configured with:
    CONFIG_IP_ADVANCED_ROUTER=y
    CONFIG_IP_MULTIPLE_TABLES=y
    CONFIG_IP_ROUTE_MULTIPATH=y

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

Any clues?

Thanks in advance
Joerg

 
 
 

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

Post by Jarek Poplawsk » Tue, 19 Apr 2005 18:20:22



Quote:> 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
> internet.
> 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!)
> eth0:      10.138.233.227
> NETMASK:   255.255.255.240
> GW:        10.138.233.226

> For ISP2
> eth1       10.51.238.226
> NETMASK:   255.255.255.240
> GW:        10.51.238.226

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

> Routing table empty but loopback device when I start:

It is strange.

Maybe first you should try:

ip addr add 10.138.233.227/28 dev eth0 brd +

etc.

Jarek P.

 
 
 

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

Post by Coenraad Loubse » Tue, 19 Apr 2005 22:01:02


Quote:

> It is strange.

> Maybe first you should try:

> ip addr add 10.138.233.227/28 dev eth0 brd +

> etc.

> Jarek P.

Can you briefly explain what it does? Or do we have to read the man? :D
 
 
 

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

Post by joerg sau » Wed, 20 Apr 2005 10:29:54


Hi, and thanks for your reply, but

Quote:

> > It is strange.

Actually I tried allmost everything allready.
I first thought about some wrong configuration therefore I removed
every bit of it and started to configure the system by issueing
commands from the console like
ip addr add 10.138.233.227/28 brd 10.138.233.239 dev eth1
and so on. But always I ended up with the error message when I was
using ip route add with the 'table ' part.

Somebody who has any clues?

Besides I searched google before and found some articles discussing
maybe the same issue but unfortunately in polish language, which I do
not understand :-(

So if somebody polish speaking guy can help out, would be great
(pl.comp.os.linux.networking)

Thanks
Joerg

 
 
 

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

Post by Jarek Poplawsk » Wed, 20 Apr 2005 19:10:49



Quote:

>> It is strange.

>> Maybe first you should try:

>> ip addr add 10.138.233.227/28 dev eth0 brd +

>> etc.

>> Jarek P.

> Can you briefly explain what it does? Or do we have to read the man? :D

Routing table is seldom "empty but loopback device", and if your
network device isn't configured there are messages like this.
But it could be something else too.

Jarek P.

 
 
 

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

Post by Jarek Poplawsk » Wed, 20 Apr 2005 19:27:11



Quote:> Hi, and thanks for your reply, but

>> > It is strange.

> Actually I tried allmost everything allready.
> I first thought about some wrong configuration therefore I removed
> every bit of it and started to configure the system by issueing
> commands from the console like
> ip addr add 10.138.233.227/28 brd 10.138.233.239 dev eth1
> and so on. But always I ended up with the error message when I was
> using ip route add with the 'table ' part.

> Somebody who has any clues?

If you could show what is your ifconfig and route -n?

Quote:

> Besides I searched google before and found some articles discussing
> maybe the same issue but unfortunately in polish language, which I do
> not understand :-(

> So if somebody polish speaking guy can help out, would be great
> (pl.comp.os.linux.networking)

Could you add links or paste some text?

Jarek P.

 
 
 

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

Post by Jarek Poplawsk » Wed, 20 Apr 2005 20:13:03



Quote:> Hi, and thanks for your reply, but

>> > It is strange.

> Actually I tried allmost everything allready.
> I first thought about some wrong configuration therefore I removed
> every bit of it and started to configure the system by issueing
> commands from the console like
> ip addr add 10.138.233.227/28 brd 10.138.233.239 dev eth1

I hope it was eth0?

Jarek P.

 
 
 

1. route add ...-> Network is unreachable ?

Why after running
   route add -n 192.168.89.0
I get: SIOCADDRT: Network is unreachable ?

I have configured my Ethernet card so, that "ifconfig eth0" gives
eth0   Link encap:10Mbps Ethernet  HWaddr 00:20:AF:09:E9:68
       inet addr:192.168.89.100 Bcast:192.168.89.255 Mask:255.255.255.0
       BROADCAST RUNNING MULTICAST  MTU:1500 Metric:1
       ,,,
       Interrupt:11 Base address:0x280

I believed, that when kernel knows about the address 192.168.89.100 then
it accepts the network "192.168.89.0" as reachable ?

I know, something is wrong in my configuration. When I try to run
"ifconfig eth0 up" I "get SIOCSIFFLAGS: Try again" error.

If addition, when I type "nslookup omega" the nslookup hangs without reply.
I believed, that having the "/etc/resolv.conf" file like
  search fortuna.org
  nameserver 127.0.0.1

and "/etc/hosts" like that:
  127.0.0.1             localhost
  192.168.89.100        omega.fortuna.org       omega
  192.168.89.101        xx.fortuna.org          xx

will give the resolver the answer to "nslookup omega" from the /etc/hosts file.

How to correct the fault ?
TIA,
        Zenon

2. Program help!

3. Q: 0.99pl12 route add problem, SIOCADDRT: network is unreachable

4. Dallas one-wire driver for Linux serial port available

5. RTNETLINK answers: Invalid argument when adding route... help!

6. Question about nn

7. IPv6 and fec0::/64 network route - why did I have to manually add this route?

8. Large SCSI HDD problems ???

9. Add route using route(4)

10. Routing over multiple uplinks

11. Multiple uplinks/routes to Internet with one ethernet - MAC problem

12. Routing for multiple uplinks/providers

13. IP Route RTNETLINK Error: File Exists