Thank you Nicolas!

I've noticed there's some meshing going on in the lan ports already by default, but if I chain a lan port of the router to the wan of another one, bmx6 seems to figure out something is going on on eth1, but BATMAN keeps all routes to other nodes via WiFi, even to the one that it has an ethernet connection to.

Also, of course, lan ports have the lan interface installed, whereas I'd like to completely disable it from chef, making the LAN of that router only accessible via WiFi.

In other words, I'd like the exact same config to happen on eth1 as eth0. The reason is I want to do ethernet mesh with up to 4 other routers without needing an external switch, connecting to the single wan port, instead using the built in hardware switch in eth1 that is already part of the router, but with the same behavior of the single wan port instead as being a Lan.

Basically on the change network behavior webpage p4u wrote [I think] I've learned that lime-hdw-openwrt-wan is autoinstalled on multiport routers, I've tried replicating it for Linux_name "eth1" and changing the default interface "eth0" I've found inside lime-defaults to "eth1" in /etc/config/lime. But nothing changed at all, even in Network > Interfaces. Also I see that by default there are eth0_13 and eth0_29 but only one of those two in eth1 [can't remember of 13 or 29]. Is the correct way to copy the lime-hdw-openwrt-wan to another one named differently and Linux name set to eth1? Chef says not to alter interface specific configuration inside lime defaults, so where should I do that in chef? Should I add a new file?

Also, I'm looking for the cleanest possible way to do this, to ensure I don't mess up all of the extremely complex interface configuration of LiMe ;]

Thank you

Nk

From: Nicolas Pace <nico@libre.ws>
Sent: May 10, 2017 04:58
To: Nk; libremesh users
Subject: Re: [lime-users] setting one mesh device as gateway? (and nanostation M2 update)

On Tue, 2017-05-09 at 23:42 +0200, Nk via lime-users wrote: > Hi all > > Sorry to resurrect and slightly hijack an old thread but I was > wondering how I could get a multi port router [TL WR 1043 ND] to use > all 5 ports [1 wan + 4 lan] as if they were all wan ports, with both > wan and mesh functionality on each and every one of them. In other > words, I’d like to entirely disable the lan interface on ethernet > [leaving it only on wifi] and instead assign the 4 lan ports to > perform exactly the same function as the wan port out-of-the-box. > I need to use one cable that goes to ISP router and have 4 more ports > available to mesh via ethernet with other routers. this is the default behaviour. > I’ve played around with /etc/config/lime, /etc/config/network and > luci [just to get my hands dirty before asking] but I don’t > understand the cleanest and most effective way to do this. Can you share a little bit more of what you accomplished so far? > Thank you so much in advance and sorry for all of the questions > lately ;] your questions may be everyone's questions, by you asking everyone learns! So, don't hesitate asking, do it!! :} > On Mar 29, 2017, 6:18 PM +0200, Pau , wrote: > > If the name is wan watchping should make the work. > > > > You can check the system log with "logread | grep watchping". You > > can > > see if the daemon is running "ps | grep watchping". And you can > > restart > > it manually "/etc/init.d/watchping restart". If the node has > > Internet > > and watchping detects it, a new "tunIn" rule named inet4 is added > > to > > bmx6 in order to publish the Internet to other nodes (you can check > > it > > with bmx6 -cp). > > > > On 29/03/17 18:13, James Lewis wrote: > > > > If the virtual network device is named "wan", there is a daemon > > > > named > > > > "watchping" which will detect the Internet connection, will > > > > publish it > > > > and set up the proper NAT rules. > > >   > > > My interface was definitely called wan, but this definitely > > > didn't > > > happen until I manually added the iptables rules > > > > > > Anything else to test? Does this daemon need restart or something > > > if > > > interface setup changes? > > > > > > Thanks > > > > > > J > > > > > > > This is the recommended way, but if you do it manually > > > > configuring > > > > network from OpenWRT (instead of using lime-config) then you > > > > must be > > > > sure that you are using "wan" as interface name and not > > > > something like > > > > "wwan" or "wan2". > > > > > > > > > > Thanks again > > > > > > > > > > > > James > > > > > > > > > > > > [1] (obviously with interface names changed) > > > > > > iptables -A FORWARD -i wlan1 -o wlan0 -j ACCEPT > > > > > > iptables -A FORWARD -i wlan0 -o wlan1 -m state --state > > > > > > ESTABLISHED,RELATED \ > > > > > > -j ACCEPT > > > > > > iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE > > > > > > > > > > > > On Tue, Mar 28, 2017 at 8:08 PM, Pau wrote: > > > > > > > On 28/03/17 18:54, Ilario Gelmetti wrote: > > > > > > > > On 03/28/2017 06:41 PM, James Lewis wrote: > > > > > > > > > > > On 28/03/17 16:13, James Lewis wrote: > > > > > > > > > > > > Now the quesiton is: how do we set one of the > > > > > > > > > > > > mesh devices to _take_ > > > > > > > > > > > > DHCP through the LAN port rather than give it, > > > > > > > > > > > > and to be the 'gateway' > > > > > > > > > > > > device on the mesh network, and then what will > > > > > > > > > > > > happen with devices > > > > > > > > > > > > that subsequently connect to the mesh? How will > > > > > > > > > > > > they get their gateway > > > > > > > > > > > > set? > > > > > > > > > >   > > > > > > > > > > There are two ways in your case: > > > > > > > > > > * configuring LibreMesh for using that ethernet > > > > > > > > > > port as WAN (as Pau is > > > > > > > > > > going to write in the web); > > > > > > > > >   > > > > > > > > > Great, this is what we thought and tried, but perhaps > > > > > > > > > got something wrong > > > > > > > > > somewhere as it didn't work. Look forward to Pau's > > > > > > > > > docs. > > > > > > >   > > > > > > > Let's see if it helps you understand how it works. > > > > > > > > > > > > > > http://libremesh.org/docs/changing_network_behavior.html > > > > > > > > > > > > > > Feel free to make comments and/or send modifications via > > > > > > > pull-request. > > > > > > > > > > > > > > We are working on the LiMe Web interface and soon this > > > > > > > kind of > > > > > > > configuration will be available via Web, but for the > > > > > > > moment it is only > > > > > > > possible via shell. > > > > > > > > > > > > > > > Did you modify just the /etc/config/lime* files or also > > > > > > > > the others? > > > > > > > > I have no idea if this can be done also via the web-ui > > > > > > > > (I don't think so). > > > > > > > > > > > > > > > > > > * otherwise just plugging the cable from the > > > > > > > > > > gateway device into the > > > > > > > > > > secondary port of Nanostation M2 (your model has 2 > > > > > > > > > > ethernet ports, > > > > > > > > > > right?) > > > > > > > > >   > > > > > > > > > No, I have the little M2 which only has one ethernet > > > > > > > > > port. > > > > > > > >   > > > > > > > > Ah ok! So it's a Ubiquiti NanoStation M2 LoCo > > > > > > > > > > > > > > > > > I do have eth0 and eth1 interfaces though > > > > > > > >   > > > > > > > > For the LoCo XM model (as well for other models with > > > > > > > > just 1 ethernet > > > > > > > > port) the "bullet" image should be used [1]. For XW > > > > > > > > hardware with one > > > > > > > > ethernet port (also stuff like newest AirGrid models) > > > > > > > > there's a > > > > > > > > "loco-m-xw" image. > > > > > > > > If you see two ethernet could be because you used the > > > > > > > > "nano" image. > > > > > > > > I suppose that there's no problem of having an unused > > > > > > > > eth1...? > > > > > > > > Ciao! > > > > > > > > Ilario > > > > > > > > > > > > > > > > [1] https://wiki.openwrt.org/toh/ubiquiti/airmaxm > > > > > > >   > > > > > > > I think the eth1 controller exist but the physical port > > > > > > > is just not > > > > > > > attached. > > > > >   > > > > > > > > > > > > > > > _______________________________________________ > > > > > lime-users mailing list > > > > > lime-users@lists.libremesh.org > > > > > https://lists.libremesh.org/mailman/listinfo/lime-users > > > > > > > > >   > > > > -- > > > > ./p4u > > > > > > > > > > > > _______________________________________________ > > > > lime-users mailing list > > > > lime-users@lists.libremesh.org > > > > https://lists.libremesh.org/mailman/listinfo/lime-users > > >   > > > > > > > >   > > -- > > ./p4u > > > > > > _______________________________________________ > > lime-users mailing list > > lime-users@lists.libremesh.org > > https://lists.libremesh.org/mailman/listinfo/lime-users > > _______________________________________________ > lime-users mailing list > lime-users@lists.libremesh.org > https://lists.libremesh.org/mailman/listinfo/lime-users