Skip to contentSkip to conversation

Multipath Routing in same subnet - Please take a look

LARTC Christian Schmid 4 participants 4 messages May 6, 2005 – May 9, 2005

lore
Share & tools
lore
#0 lore raw

Hello.

I have the problem that I have two gateways on the same subnet, 80.237.244.1 and 80.237.244.33. Both gateways are 100 MBit cards, so I have 2 times 100 MBit to the Internet. The NIC in the server is a gigabit-card, so this card is easy able to use both gateways for outgoing traffic.

Now I just want to use both gateways for my outgoing traffic but no matter what I do, it doesnt work. I tried "ip route replace default scope global nexthop via 80.237.244.1 dev eth1 weight 100 nexthop via 80.237.244.33 dev eth1 weight 100" but it only either sends all traffic to .1 or all to .33. I have many downloaders so it shouldnt be a problem, should it? Its a 2.6.12rc3 kernel with advanced router enabled and all multipath-options enabled as well. "ip" doesnt give an error and "ip route ls" shows the following:

80.237.244.0/26 dev eth1 proto kernel scope link src 80.237.244.52 default

         nexthop via 80.237.244.1  dev eth1 weight 100
         nexthop via 80.237.244.33  dev eth1 weight 100

I have read postings on the net but all of them are using huge scripts because they are on different networks. My problem seems to be a much easier problem but I just cant get this to work..... :(

Please help.

Best regards,
Chris
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#1 lore raw
Quoted 7 lines · Christian Schmid

Hello.

80.237.244.0/26 dev eth1 proto kernel scope link src 80.237.244.52 default

         nexthop via 80.237.244.1  dev eth1 weight 100
         nexthop via 80.237.244.33  dev eth1 weight 100

Do not use weight parameters exceeding a single digit!

Quoted 7 lines

I have read postings on the net but all of them are using huge scripts because they are on different networks. My problem seems to be a much easier problem but I just cant get this to work..... :(

Please help.

Best regards,
Chris

I'm no expert, but my suggestion is to use 2 NICs and connect one to each uplink or at least add 2 entries into /etc/iproute2/rt_tables. I think you'll find a similar situation answered in the ML within the last 10 days or so, but I can't recall the subject of the thread. Nor can I find anything specifying exactly what rt_tables needs to contain :/

You can review what I've gleaned from this ML at
http://yesican.chsoft.biz/lartc

The most urgent things for you to know:
1) The LARTC HOWTO is wrong
2) You must apply Julian's patch
3) You _really_ need to read nano.txt
4) All of the intelligible success stories WRT multipath are either on yesican or are linked to from there.

--gypsy
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#2 lore raw
In reply to Christian Schmid
Quoted 28 lines · gypsy
Quoted 7 lines · Christian Schmid

Hello.

80.237.244.0/26 dev eth1 proto kernel scope link src 80.237.244.52 default

         nexthop via 80.237.244.1  dev eth1 weight 100
         nexthop via 80.237.244.33  dev eth1 weight 100

Do not use weight parameters exceeding a single digit!

Quoted 7 lines

I have read postings on the net but all of them are using huge scripts because they are on different networks. My problem seems to be a much easier problem but I just cant get this to work..... :(

Please help.

Best regards,
Chris

I'm no expert, but my suggestion is to use 2 NICs and connect one to each uplink or at least add 2 entries into /etc/iproute2/rt_tables. I think you'll find a similar situation answered in the ML within the last 10 days or so, but I can't recall the subject of the thread. Nor can I find anything specifying exactly what rt_tables needs to contain :/

You can review what I've gleaned from this ML at
http://yesican.chsoft.biz/lartc

Quoted 6 lines

The most urgent things for you to know:
1) The LARTC HOWTO is wrong
2) You must apply Julian's patch
3) You _really_ need to read nano.txt
4) All of the intelligible success stories WRT multipath are either on yesican or are linked to from there.

here is my setup (firewall with 2 default routes) eth0 = cable, ppp0 adsl. I changed the dhcpd client to add the default route for each in on a different metric, that way if the one of the lines is out the other default route will still work!

from ip r (whith some stuff removed - but the essential stuff is here)

default metric 5

        nexthop via 141.168.16.1  dev eth0 weight 4
        nexthop via 202.7.162.89  dev ppp0 weight 2

default via 141.168.16.1 dev eth0 metric 10
default via 202.7.162.89 dev ppp0 metric 20

from ip ru

0:      from all lookup local 
200:    from 141.168.16.16 lookup cable 
201:    from 60.240.81.237 lookup adsl 
32766:  from all lookup main 
32767:  from all lookup default 

the important ones are 200, 201 these setup up the routing for each of the different legs - cause they will be different! so 141.168.16.16 is on eth0 and 60.240.81.237 is on ppp0 (they are the actual address on the interfaces)

cat /etc/iproute2/rt_tables (these are where the names come from above!) #

# reserved values
#
255     local
254     main
253     default
0       unspec
#
# local
#
#1      inr.ruhep

200 cable
201 adsl

These are the routing tables for 200 and 201, the 192.168 address are the local address. The routing engine workes from the lowest numbered ru (from ip ru ) and works to the larger numbered ones until it finds a rule that matches!

# ip r sh tab 200
192.168.11.0/24 dev br0  scope link 
192.168.10.0/24 dev eth3  scope link 
192.168.9.0/24 dev eth4  scope link 
default via 141.168.16.1 dev eth0 
default via 141.168.16.1 dev eth0  metric 10 
# ip r sh tab 201
192.168.11.0/24 dev br0  scope link 
192.168.10.0/24 dev eth3  scope link 
192.168.9.0/24 dev eth4  scope link 
default via 202.7.162.89 dev ppp0 

Hope that helps

Quoted 7 lines

--gypsy
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#3 lore raw
In reply to Christian Schmid
Quoted 7 lines · Christian Schmid
        nexthop via 80.237.244.1  dev eth1 weight 100
        nexthop via 80.237.244.33  dev eth1 weight 100

I have read postings on the net but all of them are using huge scripts because they are on different networks. My problem seems to be a much easier problem but I just cant get this to work..... :(

Saw this on netdev, solution disable IP_ROUTE_MULTIPATH_CACHED

http://news.gmane.org/find-root.php?group=gmane.linux.network&article%774

Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc