Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-19 Thread Baptiste Clenet
I think, most simple would be to detect a link up/down with Hotplug and then run ifup/down on ethernet so route is automatically removed. I tried to add my hotplug script: root@:/# cat /etc/hotplug.d/iface/40-eth # enable access from client network #[ "$INTERFACE" = lan ] || exit 0 #[ "$ACTION" =

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-12 Thread David Lang
If the network interface goes through the switch in the AP, then you will not see the interface on the CPU go up/down. At best you could poll the switch info (if it gives you link state) David Lang On Tue, 12 Jul 2016, Baptiste Clenet wrote: Ok thanks Tobias. How can I detect that ethernet i

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-12 Thread Baptiste Clenet
#x27;t know if e.g. mwan3 package can do that. > > > ---- Original Message > Subject: Re: [LEDE-DEV] Routing two interfaces on same subnet > From: Baptiste Clenet > To: Tobias Welz > Cc: lede-dev@lists.infradead.org > Date: 6.7.2016 11:19:44 >> >>

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-06 Thread Tobias Welz
if e.g. mwan3 package can do that. Original Message -------- Subject: Re: [LEDE-DEV] Routing two interfaces on same subnet From: Baptiste Clenet To: Tobias Welz Cc: lede-dev@lists.infradead.org Date: 6.7.2016 11:19:44 Thing is I don't want to relay traffic from ethernet to wifi S

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-06 Thread Tobias Welz
If both are in the same network it should be fine. If both are in different networks, then you cause trouble. Original Message Subject: Re: [LEDE-DEV] Routing two interfaces on same subnet From: Baptiste Clenet To: Tobias Welz Cc: lede-dev@lists.infradead.org Date: 6.7.2016

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-06 Thread Baptiste Clenet
t;>>> >>>> I think we need to know more about your setup, and what you want to >>>> achieve. >>>> Let's say we have LAN and WAN interfaces as ethernet ports, and also >>>> WIFI. >>>> >>>> Should the WIFI be in AP

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-06 Thread Baptiste Clenet
ore about your setup, and what you want to >>> achieve. >>> Let's say we have LAN and WAN interfaces as ethernet ports, and also >>> WIFI. >>> >>> Should the WIFI be in AP or in STA mode? >>> Shall wifi be bridged to LAN or to the WAN interf

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-05 Thread Tobias Welz
Should the WIFI be in AP or in STA mode? Shall wifi be bridged to LAN or to the WAN interface? Original Message ---- Subject: Re: [LEDE-DEV] Routing two interfaces on same subnet From: Baptiste Clenet To: Tobias Welz Cc: lede-dev@lists.infradead.org Date: 5.7.2016 19:33:02 W

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-05 Thread Baptiste Clenet
gt; Let's say we have LAN and WAN interfaces as ethernet ports, and also WIFI. > > Should the WIFI be in AP or in STA mode? > Shall wifi be bridged to LAN or to the WAN interface? > > > -------- Original Message ---- > Subject: Re: [LEDE-DEV] Routing two interfac

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-05 Thread Tobias Welz
- Original Message Subject: Re: [LEDE-DEV] Routing two interfaces on same subnet From: Baptiste Clenet To: Tobias Welz Cc: lede-dev@lists.infradead.org Date: 5.7.2016 19:15:42 Hi Tobias, I see, I tried to bridge them, but I got a problem, I'll try again. Isn't it a problem if

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-05 Thread Aaron Z
On Tue, Jul 5, 2016 at 1:33 PM, Baptiste Clenet wrote: > Wifi and ethernet are in client mode. > pseudo bridge with relayd? Can you describe a bit? Here is how I do it on a Nanostation M2Loco: #/etc/config/network config interface 'lan' option type 'bridge' option stp '1' o

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-05 Thread Baptiste Clenet
st bridge LAN and WIFI together, which is > the default anyway. A factory default will bring you to this setting, turn > on wifi and you are done. > Regards Tobias > > Original Message ---- > Subject: Re: [LEDE-DEV] Routing two interfaces on same subnet > From: Baptiste

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-05 Thread Tobias Welz
gards Tobias Original Message Subject: Re: [LEDE-DEV] Routing two interfaces on same subnet From: Baptiste Clenet To: Tobias Welz Cc: lede-dev@lists.infradead.org Date: 5.7.2016 19:15:42 Hi Tobias, I see, I tried to bridge them, but I got a problem, I'll try again. Isn't

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-05 Thread Baptiste Clenet
Hi Tobias, I see, I tried to bridge them, but I got a problem, I'll try again. Isn't it a problem if both interfaces are connected to same network in a bridge? 2016-07-05 19:04 GMT+02:00 Tobias Welz : > Hello, > for me it looks a bit strange, why not put both interfaces together on Layer > 2 - so

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-05 Thread Tobias Welz
Hello, for me it looks a bit strange, why not put both interfaces together on Layer 2 - so bridge them together - which is the default anyway? It looks very strange to me, to split that stuff on layer 3 with the same subnet, which now need a lot of hacking to bring it to work again, which i pe

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-05 Thread Baptiste Clenet
Hi Baptiste, I didn't see your mail, it was on SPAM, don't know why. My use case: I won't be able to control the router and people who will use it should be able to connect either by ethernet or by wifi to another product. So one solution could be to allow only one interface at a time. How can I d

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-05 Thread Ben Greear
On 07/05/2016 08:13 AM, Baptiste Clenet wrote: Thanks Ben for your answer. How to use arp-flter? Could you suggest a configuration which solve the problem? I don't have time to dig into your specific issue, but google for arp_filter and you should find some useful information. Thanks, Ben --

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-05 Thread Baptiste Clenet
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 : > 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, >>>

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-04 Thread Ben Greear
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

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-04 Thread Baptiste Jonglez
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 19

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-04 Thread Baptiste Clenet
Hi Wang, Thank for your answer. May you explain how to do that? I think this should work. 2016-07-04 12:16 GMT+02:00 Wang Linetkux : > Hi, > I think you can setup two default route with different/proper metric > value. Which means you use one of them as the backup line, and the > other as the ma

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-04 Thread Wang Linetkux
Hi, I think you can setup two default route with different/proper metric value. Which means you use one of them as the backup line, and the other as the main line. Thanks, Rujun 2016-07-04 16:14 GMT+08:00 Baptiste Clenet : > Hi, > > On my board, I've got a wifi and an ethernet interfaces on t

Re: [LEDE-DEV] Routing two interfaces on same subnet

2016-07-04 Thread Baptiste Jonglez
On Mon, Jul 04, 2016 at 10:14:26AM +0200, Baptiste Clenet wrote: > Hi, > > On my board, I've got a wifi and an ethernet interfaces on the same > subnet (192.168.0.0/24). Problem is if ethernet cable is unplugged I > can't use wifi anymore, see > > root@eisox:/# ip route > default via 192.168.0.50