Change Ethernet config
WAN port configuration
The recommended lime-hwd-openwrt-wan
package detects the WAN port and configures it for getting connectivity to the internet.
Connecting via SSH also from the WAN port
If the OpenWrt’s firewall is present, it will block incoming connections on the WAN port, for security reasons.
If you need to connect via SSH from the WAN port (likely from the internet), you can allow the incoming connection to the port 22 (the default port for SSH) adding these lines in /etc/config/firewall
and rebooting your router:
config rule option name 'Allow-SSH' option src 'wan' option proto 'tcp' option dest_port '22' option target 'ACCEPT'
Using the WAN port for connecting with another cloud
When two neighboring LibreMesh networks want to interconnect without flooding each other with local broadcast traffic, they use two different WiFi access point names ap_name
. But if they want to do the same via cable, they can do so with a WAN-WAN connection, connecting two border nodes via their WAN ports. This is absolutely not the intended use for a WAN port but works.
Important: if you have the OpenWrt firewall installed, you will need to allow all the incoming connections on the WAN port of both border routers. For doing this, edit the /etc/config/firewall
file like this and reboot your routers:
config zone option name wan list network 'wan' list network 'wan6' option input REJECT --> change to ACCEPT option output ACCEPT option forward REJECT --> change to ACCEPT option masq 1 option mtu_fix 1
LibreMesh interface-specific network configuration
If no interface-specific network configuration is present, the general network configuration section is used for all the interfaces.
For more information about the general LibreMesh config file options see The config file page.
For more examples and offline documentation check out /docs/lime-example.txt
or http://thisnode.info/docs/lime-example.txt on the router or lime-example file online.
Specific ethernet interface configuration
If we want to change the default behavior of just one network interface of the many that are present in a router, we can define a specific configuration.
Please make sure to check out how OpenWrt names the physical ports of your router model, for this read the router page accessible from OpenWrt table of hardware.
config net port5 option linux_name 'eth1.5' list protocols 'wan'
In this case the eth1.5 interface will be used as WAN (so the DHCP client will be enabled).
config net
Do not put any "." in the section name (e.g. port5). As Some of the available protocols require the relative package, for example |
Network interface specific options
Available protocols: bmx6, bmx7, batadv, olsr, olsr6, olsr2, bgp, wan, lan, manual, static, babeld, apbb, client Note that some of these protocols will require the relative proto:vlan_number works too (something like bmx6:13 is supported). If VLAN is 0, no VLAN will be used. VLAN type defaults to 802.1ad, but it can be set to 80.1q adding another option If you use manual do not specify other protocols, may result in an unpredictable behavior/configuration. |
WAN autoconfiguration
If the LibreMesh package In this case you will find a new specific configuration section like this one: config net 'lm_hwd_openwrt_wan' option autogenerated 'true' ... If we want to change the behavior of this specific network interface and stop the automatic rewrite of its configuration, we must set the |
Ground routing configuration
For more information on ground routing concept, check out these resources.
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
|
One section for each ground routing link. |
BGP configuration
config bgp_peer peer1 option remoteIP '192.0.2.6' option remoteAS '65550' config bgp_peer peer2 option remoteIP '2001:db8::c001' option remoteAS '65549'
For documentation on BGP configuration see this thesis.