Multiple routes to same detstination IP in a linux gateway
hi,
i am using linux pc as application gateway/router. I need to add two routes to the same destination IP/subnet in route table, and the packets that are going to these destinsation IP should be load balanced on the outgoing interfaces. That is, in linux route table i can add only single destination path for single destination/Target IP. In linux, it allows only the route additions like
Route Table:
=========
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.6.5.0 10.6.5.1 255.255.0.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.6.0.254 0.0.0.0 UG 0 0 0 eth0
That is there can only one route for 10.6.5.0 subnet through gw 10.6.5.1.
I need to have multiple gw entries in the route table for the same destination IP/subnet like this
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.6.5.0 10.6.5.1 255.255.0.0 U 0 0 0 eth0
10.6.5.0 10.6.5.10 255.255.0.0 U 0 0 0 eth0
10.6.5.200 10.6.5.11 255.255.255.255 U 0 0 0 eth0
10.6.5.200 10.6.5.12 255.255.255.255 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.6.0.254 0.0.0.0 UG 0 0 0 eth0
and the traffic for destination shuold be load balanced throught the gateways.
That is half of the destination traffic to be shared to each gateway for load balancing of gateways.
But linux does not allow this kind of route additions generally.
Is there anyway or tool or utility or routing patch to do this?
or
how do is modify the routing module in linux kernetl itself to support this.
any help is worth commendable.
Suresh Guduru