[LEDE-DEV] Routing two interfaces on same subnet

Baptiste Clenet bapclenet at gmail.com
Tue Jul 5 08:13:54 PDT 2016


Thanks Ben for your answer.
How to use arp-flter?
Could you suggest a configuration which solve the problem?

Cheers,

2016-07-05 0:57 GMT+02:00 Ben Greear <greearb at candelatech.com>:
> On 07/04/2016 02:53 PM, Baptiste Jonglez wrote:
>>
>> On Mon, Jul 04, 2016 at 10:54:27PM +0200, Baptiste Clenet wrote:
>>>
>>> Hi Wang,
>>> Thank for your answer. May you explain how to do that?
>>> I think this should work.
>>
>>
>> The general idea would be:
>>
>>    default via 192.168.0.1 dev wlan0  src 192.168.0.12  metric 300
>>    default via 192.168.1.1 dev eth0   src 192.168.1.42  metric 200
>>
>> where the route with the lowest metric is used.  If it disappears, the
>> remaining route is used instead.
>>
>> You should be able to do that on LEDE/OpenWRT, see the metric option here:
>>
>>    https://wiki.openwrt.org/doc/uci/network#ipv4_routes
>>
>> The problem is that, in your case, it probably won't work, because:
>>
>> 1) you mentioned that the route doesn't go away when the interface goes
>>     down (which might or might not be a bug)
>>
>> 2) if both gateways are in the same subnet, chances are you're screwed up
>>     anyway, because the kernel will only do ARP on one of your interface,
>>     for both routes.  I'd be interested to know if this is not the case.
>
>
> arp-filter can fix #2.
>
> Thanks,
> Ben
>
> --
> Ben Greear <greearb at candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com
>



-- 
Baptiste



More information about the Lede-dev mailing list