trouble with nexthop when I try to load balance

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have two internet lines and I want to do equal cost loadbalancing on the two
uplinks to the internet. This is what I do:

ip route add 200.200.200.0/24 dev eth2 table 200
ip route add default via 200.200.200.254 dev eth2 table 200

ip route add 100.100.100.0/24 dev eth1 table 100
ip route add default via 100.100.100.254 dev eth1 table 100

ip route add 200.200.200.0/24 src 200.200.200.1 dev eth2
ip route add 100.100.100.0/24 src 100.100.100.1 dev eth1

ip route add default scope global nexthop via 100.100.100.254 \
                                  nexthop via 200.200.200.254

The last command fails with the message:"RTNETLINK answers: Invalid argument".
I found a posts that says to fix the iproute2/ip/iproute.c:parse_nexthops()
with change like this:
        rtnh->rtnh_ifindex = 0;
+       rtnh->rtnh_flags = 0;
+	rtnh->rtnh_hops = 0;
 	rta->rta_len += rtnh->rtnh_len;

I fixed the file, but get the same error "Invalid argument".
I don't know why it fails. I have a 2.4.20 kernel with Julian Anastasov's
patches. iproute2 version ss010824.
I really need the solution to this issue. Please help me :(
Thanks in advance
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux