Modify

Opened 5 years ago

Closed 3 years ago

Last modified 2 years ago

#13181 closed defect (wontfix)

Multiwan compatibility balancer malfunction if multiple WAN get same gateway.

Reported by: parahexen@… Owned by: developers
Priority: high Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: multiwan Cc:

Description

so here is the problem:

# ip route show table 171
default via 114.222.100.1 dev pppoe-wan2  proto static  src 114.222.102.62 
# ip route show table 172
default via 114.222.100.1 dev pppoe-wan2  proto static  src 114.222.103.117

they both pointed to same outgoing interface.

the problem code is at line 687:

ip route add default via $gateway table $(($i + 170)) src $ipaddr proto static

should add an explicit outgoing interface, to be:

ip route add default via $gateway dev $ifname table $(($i + 170)) src $ipaddr proto static

another problem exist but do not bother usage, but make an inconsistent behavior, and take another more route table querying to forward package, it is at line 682 to 684:

ip route | grep -Ev ^default | while read ROUTE; do
    ip route add table $TABLE to $ROUTE
done

the script will execute commands like this when under the topic environment:

ip route add table 171 to 114.222.100.1 dev pppoe-wan1  proto kernel  scope link src 114.222.102.62
ip route add table 171 to 114.222.100.1 dev pppoe-wan2  proto kernel  scope link src 114.222.103.117

but unfortunately generate a system error: "RTNETLINK answers: File exists"

one of my poor solution is adding metric, so system will consider they are different entries.
modify the code above to like this:

local j=0
ip route | grep -Ev ^default | while read ROUTE; do
    ip route add table $TABLE to $ROUTE metric $j++
done

so problem solved, but a little ugly.

Hope confirm soon. Thanks.

Attachments (0)

Change History (7)

comment:1 Changed 5 years ago by anonymous

sorry, the last modified code exists one error, where:
$j++
should be
$((++j))

whole thing is:

local j=0
ip route | grep -Ev ^default | while read ROUTE; do
    ip route add table $TABLE to $ROUTE metric $((++j))
done

comment:2 Changed 4 years ago by anonymous

i changed aditionally

route add default gw $gateway > /dev/null 2>&1

to

route add default gw $gateway $ifname > /dev/null 2>&1

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:4 Changed 3 years ago by anonymous

Hello:

I modified /usr/bin/multiwan line 687 as mentioned above, and it does fix this frustrating issue.

This is a 5 min fix to commit to the repo...Could someone with commit please commit at least the line 687 fix?

Thanks!

comment:5 Changed 3 years ago by nbd

  • Resolution set to wontfix
  • Status changed from new to closed

multiwan is unmaintained. no changes will be made to it until it is submitted to ​https://github.com/openwrt/packages and maintained from that point on.
also, you should probably use mwan3 instead.

comment:6 Changed 2 years ago by anonymous

Unfortunately, mwan3 does not support multiple links on the same subnet (which one ends up with if they buy multiple cablemodem connections from the same ISP in order to get more speed -- required if the ISP refuses to sell higher speed links!)

I tried mwan3, but it blew up in several places with two WANs on the same ISP (different IPs, same subnet/gateway).

comment:7 Changed 2 years ago by Adze

mwan3 DOES support multiple links on the same subnet. Only ip address has to differ...

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.