The Configuration file

The configuration file placed on /etc/config/lime is one of the key points for LibreMesh. It contains a set of basic options which are used by LibreMesh backend to perform its magic. This file is part of the UCI database which unifies also most of the OpenWrt configuration files.

The executable lime-config reads such file and writes all the resulting complex configuration in many other configuration files. In order to apply modifications to the configuration file, it has to be executed running lime-config in the node’s root console and the router has to be rebooted with the reboot command.

Note that there is no need to manual configure any of the config file options unless you know what are you doing. In most of the scenarios the default options should work fine.

Fallback options file

The default options which are used as fallback (in case an option is missing in the /etc/config/lime file) are read from /etc/config/lime-defaults.

lime config file

The idea behind this structure is that the user only modifies /etc/config/lime but /etc/config/lime-defaults always keeps the original configuration.

Parametrizable options

Some options are parametrizable with a set of special characters which will be substituted for some specific node data.

  1. MAC bytes [%Mn] refers to the MAC address of the primary interface. Example from CA:FF:EE:BA:BB:EE %M1=CA and %M4=BA

  2. Network Identifier [%Nn] refers to the cloud identifier byte which is a hash of the AP SSID (taken from option ap_ssid ... content).

  3. Hostname [%H] Refers to the hostname of the node

List of sections and options

For detailed information on each of the options, check the /docs/lime-example file.

System options
config lime system
	option hostname 'LiMe-%M4%M5%M6'
	option domain 'lan'
	option keep_on_upgrade 'libremesh base-files-essential /etc/sysupgrade.conf'

We warmly suggest to change the domain from lan to a new subdomain of your community’s website, for example option domain mesh.altermundi.net. Beware that this domain (mesh.altermundi.net) should not already exist out of the network (i.e. is bad idea to use altermundi.net). All the clients which get their IP by DHCP and all the nodes will get a fully qualified domain name like lime-ddeeff.mesh.altermundi.net.

Network general options
config lime network
	option primary_interface 'eth0'
	option main_ipv4_address '10.%N1.0.0/16'
	option anygw_dhcp_start '2'
	option anygw_dhcp_limit '0'
	option main_ipv6_address '2a00:1508:0a%N1:%N200::/64'
	list protocols ieee80211s
	list protocols lan
	list protocols anygw
	list protocols batadv:%N1
	list protocols bmx6:13
	list protocols olsr:14
	list protocols olsr6:15
	list protocols olsr2:16
	list protocols babeld:17
	list protocols bmx7:18
	list resolvers 4.2.2.2   # b.resolvers.Level3.net
	list resolvers 141.1.1.1 # cns1.cw.net
	list resolvers 2001:470:20::2 # ordns.he.net
	option bmx6_mtu '1500'
	option bmx6_publish_ownip false
	option bmx6_over_batman false
	option bmx6_pref_gw none
	option bmx6_wifi_rate_max 54000000
	option bmx7_mtu '1500'
	option bmx7_publish_ownip false
	option bmx7_over_batman false
	option bmx7_pref_gw none
	option bmx7_wifi_rate_max 'auto'
	option anygw_mac "aa:aa:aa:%N1:%N2:aa"
	option use_odhcpd false
main_ipv4_address

Here you have 4 possibilities:

  1. set a static IP and the subnet, like 192.0.2.1/16

  2. parametrize with %Mn and %Nn, and set the subnet, like 192.%N1.%M5.%M6/16;

  3. set a whole network address (so not a specific IP) for getting the IP autocompleted in that network with bits from MAC address, this works also with netmasks other than /24 or /16, like 192.0.128.0/17

  4. set two different parameters, the first for subnet and the second for the node IP parametrization, like 192.0.128.0/16/17, this results in /16 subnet broadcast domain (192.0.0.0/16) but the node IP will be calculated in a /17 range (from 192.0.128.0 to 192.0.255.254).

main_ipv6_address

Parametrizable in the same way as main_ipv4_address. If used, the IP autocompletion will fill at maximum the last 24 bits, so specifying an IP autocompletion range bigger than /104 is not useful.

list protocols

List of protocols configured by LibreMesh, some of these require the relative package lime-proto-.... Note that if you set here some protocols, you overwrite the whole list of protocols set in /etc/config/lime-defaults. Don’t worry if all protocols are defined here: just the actually installed ones will be active.

WiFi general options
config lime wifi
	option channel_2ghz '11'
	list channel_5ghz '157'
	list channel_5ghz '48'
	option htmode_5ghz 'HT40'
	option distance_2ghz '100'
	option distance_5ghz '1000'
	list modes 'ap'
	list modes 'apname'
	list modes 'ieee80211s'
	option ap_ssid 'LibreMesh.org'
	option apname_ssid 'LibreMesh.org/%H'
	option adhoc_ssid 'LiMe'
	option adhoc_bssid 'ca:fe:00:c0:ff:ee'
	option adhoc_mcast_rate_2ghz '24000'
	option adhoc_mcast_rate_5ghz '6000'
	option ieee80211s_mesh_fwding '0'
	option ieee80211s_mesh_id 'LiMe'
country code

The country code is not specified by default (so that the default is US), but we strongly recommend to specify it, for example in Spain setting option country ES you can access the channel 13 which otherwise is restricted.

distance

Distance parameter indicates the maximum distance of the wireless connected devices. A much too large value would decrease the performances but even a slightly too small value can result in a non-working connection.

wifi options

Any option with name <mode>_<option> will be directly copied to /etc/config/wireless (without the <mode>_ prefix)

wifi WPA2 encryption

In order to have WPA2-PSK encryption on the AP and APname interfaces, add a _key somePassword and a _encryption psk2 options for each, for having an example see /docs/lime-example.

wifi 80211s

Mode ieee80211s refers to 802.11s standard (known as mesh). When option ieee80211s_mesh_fwding 0 is present, the routing layer is disabled and it can be used only as a link-layer protocol such as adhoc. Be aware that it cannot be used together with adhoc on the same interface.

Specific interface configuration

Changing the aforementioned options allows us to have a system-wide configuration.

In cases where different network interfaces should have different configurations, see Change ethernet behavior and Change wireless behavior page and /docs/lime-example.