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. The special program lime-config reads such file and applies the configuration to the operating system. The default options (those which are not defined by the user in the config file) are read from /etc/config/lime-defaults, however it should not be modified in runtime.

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.

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

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 defined in lime-defaults should work fine.

List of sections and options

For updated information check the lime-example file.

System options
config lime system
	option hostname 'LiMeNode-%M4%M5%M6'
	option keep_on_upgrade 'libremesh base-files-essential /etc/sysupgrade.conf'
Network general options
config lime network
	option primary_interface eth0
	option bmx6_over_batman
	option main_ipv4_address ''
	option main_ipv6_address '2001:db8::%M5:%M6/64'
	option bmx6_mtu '1398'
	list protocols adhoc
	list protocols lan
	list protocols anygw
	list protocols batadv:%N1
	list protocols bmx6:13
#	list protocols static:
#	list protocols olsr:14
#	list protocols olsr6:15
#	list protocols olsr2:16
#	list resolvers
#	list resolvers 2001:4860:4860::8844

Here you have 4 possibilities:

  1. set a static IP and the subnet, like

  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

  4. set two different parameters, the first for subnet and the second for IP parametrization, like, this results in /16 subnet but IP parametrized in a /17 range.


Parametrizable in the same way as main_ipv4_address. If used, the IP autocompletion will fill 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.

WiFi general options
config lime wifi
	option country 'ES'
	option channel_2ghz '11'
	option channel_5ghz '48'
	option htmode_2ghz 'HT20'
	option htmode_5ghz 'HT40'
	list modes 'ap'
	list modes 'apname'
	list modes 'adhoc'
#	list modes 'ieee80211s'
	option ap_ssid ''
	option apname_ssid ''
	option adhoc_ssid '%H'
	option adhoc_bssid 'ca:fe:00:c0:ff:ee'
	option adhoc_mcast_rate_2ghz '24000'
	option adhoc_mcast_rate_5ghz '6000'
#	option mesh_mesh_fwding '0'
#	option mesh_mesh_id 'LiMe'
wifi options

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

wifi 80211s

Mode ieee80211s refers to 802.11s standard (known as mesh). When mesh_mesh_fwding=0, 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.

WiFi interface specific options (override general option), multiple allowed
config wifi radio1
	list modes 'adhoc'
	list modes 'ap'
	option channel_2ghz '1'
	option channel_5ghz '48'
  	option ap_ssid 'My_private_SSID'
	option ap_encryption 'psk2'
	option ap_key 'My_PSK_password'
	option adhoc_mcast_rate '6000'
	option adhoc_ssid 'libremesh'
	option adhoc_bssid 'ca:fe:00:c0:ff:ee'

#config wifi radio2
#	list modes 'manual'
Network interface specific options

Available protocols: bmx6, batadv, olsr, olsr6, wan, lan, manual

proto:vlan_number works too (something like bmx6:13 is supported). If VLAN is 0 no VLAN will be used.

If you use manual do not specify other protocols, may result in an unpredictable behavior/configuration.

Ethernet specific options, multple allowed
#config net eth1wan
#	option linux_name 'eth1'
#	list protocols 'wan'
config net

Do not put any "." in the section name.

Use the actual name of the interface as the system shows (execute ip link to see).

Some of these protocols require the relative package "lime-proto-…​".

Ground routing specific sections
config hwd_gr link1
	option net_dev 'eth0'
	option vlan '5'
	option switch_dev 'switch0'
	option switch_cpu_port '0'
	list switch_ports '4'
config hwd_gr
  • net_dev: Plain ethernet device on top of which 802.1q vlan will be constructed.

  • vlan: Vlan id to use for this ground routing link, use little one because cheap switch doesn’t supports big ids, this will be used also as 802.1q vid.

  • switch_dev: These options regarding switch need to be set only if your ethernet device is connected to a switch chip. If the switch exists you can read its name (like switch0) in /etc/config/network file.

  • switch_cpu_port: Refer to switch port map of your device on to know CPU port index.

  • switch_ports: List switch ports on which you want the vlan being passed, refer to for correspondence with physical ports.

Proto BGP specific sections (one section for each BGP peer)
config bgp_peer peer1
	option remoteIP ''
	option remoteAS '65550'

config bgp_peer peer2
	option remoteIP '2001:db8::c001'
	option remoteAS '65549'

One section for each ground routing link. With ground routing we mean setups having LibreMesh on a router which is connected via cable(s), eventually through a switch, to some wireless routers running the original firmware in WDS (transparent bridge) Ap/Sta mode. Likely you want to configure as many sections of ground routing with different vlan numbers or different switch ports as many connected devices in WDS mode.