Network interface specific options
Configure an ethernet port
Create a section named port2 for the network device lan2
Do not put any . in the section name.
config net port2
option linux_name 'eth0.2'
...Available protocols: apbb, batadv, babeld, bgp, bmx7, client, lan, manual, olsr, olsr2, olsr6, static, wan
manual
If you use the protocol manual do not specify other protocols, may result in an unpredictable behavior/configuration (likely you loose connection to the node)
Examples
WAN port
Configure a network ethernet port as WAN using the protocol wan or static.
LibreMesh in the default flavor configure a DHCPv4 client in the default openwrt WAN interface. The section lm_hwd_openwrt_wan gets created in lime-autogen by lime-hwd-openwrt-wan package in case an ethernet WAN port is detected.
TIP
Modify lm_hwd_openwrt_wan to assign to the WAN network interface a different ethernet network device like a lan port, and/or to set a static ip.
Doing so, rather than disabling it, ensure that Babeld shares the default route from this interface via the package babeld-auto-gw-mode.
Modify lm_hwd_openwrt_wan
Configure the ethernet port eth1.5 as WAN with static ipv4 and ipv6 addresses
config net lm_hwd_openwrt_wan
option autogenerated 'false'
option linux_name 'eth1.5'
# list protocols 'wan'
list protocols 'static'
option static_ipv4 '192.168.1.2/24'
option static_gateway_ipv4 '192.168.1.1'
option static_ipv6 '2a00:1508:0a00::1234/64'
option static_gateway_ipv6 'fe80::1'autogenerated 'false'- This tells lime-hwd-openwrt-wan to not destroy and rewrite this sectionlinux_name 'eth1.5'- Assign to the WAN network interface a different ethernet network device.protocols 'wan'- Use 'wan' instead of 'static' to get Internet connectivity via DHCP.
If a VLAN is needed on the WAN interface for connecting to the gateway, it can be specified withwan:ID, likewan:20orwan:20:8021q
wan (DHCP Client)
Use wan protocol to get Internet connectivity via DHCP
config net lm_hwd_openwrt_wan
option autogenerated 'false'
config net port1_wan
option linux_name 'lan1'
list protocols 'wan'autogenerated 'false'- Specify that the configuration of the WAN ethernet port has been manually edited, creating an empty configuration for it and practically disabling it
static (ipv4/ipv6)
Use static protocols and specify the router 'IPv4/subnet' and the gateway IPv4, and/or 'IPv6/subnet' and the gateway IPv6.
config net lm_hwd_openwrt_wan
option autogenerated 'false'
config net port1_wan
option linux_name 'lan1'
list protocols 'static'
option static_ipv4 '192.168.1.2/24'
option static_gateway_ipv4 '192.168.1.1'
option static_ipv6 '2a00:1508:0a00::1234/64'
option static_gateway_ipv6 'fe80::1'autogenerated 'false'- Specify that the configuration of the WAN ethernet port has been manually edited, creating an empty configuration for it and practically disabling it
LAN only port
Configure lan1 for users to connect to, not for connection to other nodes.
config net port1
option linux_name 'lan1'
list protocols 'lan'Mesh only port
The protocol batadv:%N1 needs to be specified if the other node is in the same mesh cloud i.e. same ap_ssid.
config net port1
option linux_name 'lan1'
list protocols 'batadv:%N1'
list protocols 'babeld:17'