Differences

This shows you the differences between two versions of the page.

Link to this comparison view

network:firmware:openwrt-wan-network [2024/02/17 14:34] – created systemnetwork:firmware:openwrt-wan-network [2024/02/17 15:06] (current) system
Line 8: Line 8:
 ====== wan_network file ====== ====== wan_network file ======
 ===== Background ===== ===== Background =====
-  * When central management for the device is enabled, the device will try to reach the controller using various means+  * If central management is activated for the device, the device attempts to reach the controller via various routes
-  * OpenWrt uses config files located under the **/etc/config** directory to configure the device accordingly.+  * OpenWrt uses configuration files located in the **/etc/config** directory to configure the device accordingly.
   * The **network** file is used to define the network configuration of the device.   * The **network** file is used to define the network configuration of the device.
-  * Since we can include the MESHdesk package on basically any device that can run OpenWrt **we need to adopt the means to reach the controller so it will work on the specific device.** +  * Since we can include the MESHdesk package on virtually any device running OpenWrtwe need to customize the means of reaching the controller to make it work on that particular device. 
-  * Some devices for instance might only have one ethernet port. +  * For example, some devices only have one Ethernet port. 
-  * Others might have more Ethernet ports where a certain amount is grouped together and used as the LAN side and typically a single one assigned to the WAN port. +  * Others may have multiple Ethernet portsa certain number of which are grouped together and used as the LAN side and typically a single one is assigned to the WAN port. 
-  * For this we create the **/etc/MESHdesk/configs/wan_network** file+  * For this we create the file **/etc/MESHdesk/configs/wan_network**. 
-  * This file needs to be unique to the specific device on which the MESHdesk package is included on+  * This file must be unique for the specific device on which the MESHdesk package is installed
-  * This file will be used during startup to replace the **/etc/config/network** file in order to enable the device to reach the controller. +  * This file is used during startup to replace the **/etc/config/network** file so that the device can reach the controller. 
-  * This config will also be changed after the device receives its final configuration from the controller (or fallback to last known good configuration if the controller can'be reached) +  * This configuration will also be changed after the device has received its final configuration from the controller (or fall back to the last known good configuration if the controller cannot be reached) 
-  * The unique part of the wan_network file involves the Ethernet port configuration. Devices can be grouped into three types. +  * The unique part of the wan_network file concerns the configuration of the Ethernet ports. Devices can be categorized into three types. 
-         - Devices with standard eth0 and/or eth1 ports. //(This is typically Atheros based hardware)// +         - Devices with standard eth0 and/or eth1 ports. //(This is typically Atheros-based hardware)// 
-         - Devices with a single eth0 port combined with swconfig to create VLANs to split the physical ports on the device up. // (This is typically older Mediatek based hardware)// +         - Devices with a single eth0 port in combination with swconfig to create VLANs to split the physical ports of the device. //(This is typically older Mediatek-based hardware)// 
-         - New DSA style config using names like wan, lan1, lan2 lan3 etc for the ports.// (This is typically newer Mediatek devices)//+         - New DSA-like configuration with names like wan, lan1, lan2lan3etcfor the ports. //(This is typical for newer Mediatek devices)//
  
-Next we will unpack samples of each of these types+Next we will unpack examples of each of these types
- +
-<WRAP center round tip 100%> +
-  * When looking at these sample files keep in mind that our aim is to use the //device section// called **br-lan** as a bridge. +
-  * Traditionally the LAN ports will be part of it. +
-  * We however configure it now in such a way that the WAN port becomes part of it instead of the LAN ports. +
-</WRAP>+
  
 +<alert type="info">
 +  * When looking at these sample files, remember that we want to use the //device section// called **br-lan** as a bridge.
 +  * Traditionally, the LAN ports are a part of it.
 +  * However, we are now configuring it so that the WAN port becomes part of the device instead of the LAN ports.
 +</alert>
  
 ===== Devices with standard eth0 and or eth1 ports ===== ===== Devices with standard eth0 and or eth1 ports =====
-  * These include most Atheros as well as IPQ based devices. +  * This includes most Atheros and IPQ-based devices. 
-  * Lets look at the GL iNet AR300M's wan_network file.+  * Let us have a look at the wan_network file of the GL iNet AR300M.
  
 <file bash wan_network> <file bash wan_network>
Line 59: Line 58:
          
 </file> </file>
-  * We swapped **eth0** and **eth1** as ports of **br-lan**. Plain and simple.+  * We have swapped **eth0** and **eth1** as ports of **br-lan**. Plain and simple.
   * There is no **wan** interface defined.   * There is no **wan** interface defined.
-  * Devices with a single port will not need any swapping since there are only one port available. +  * Devices with a single port do not need to be swapped because only one port is available. 
-  * Here's a snippet from the original **/etc/config/network** file you can compare with.+  * Here is an excerpt from the original /etc/config/network file for you to compare.
  
 <file bash network> <file bash network>
Line 85: Line 84:
  
  
- +===== Devices which use swconfig ===== 
- +  * These are usually older Mediatek-based devices (MT7620 / 7628 etc.
- +  * Let us take a look at the files from a Xiaomi 4A 110M 
-===== Devices which uses swconfig ===== +  * Look at the default /etc/config/network file.
-  * This is typically older Mediatek based devices (MT7620 / 7628 etc) +
-  * Lets look and the files from a Xiaomi 4A 110M +
-  * Refer to the default **/etc/config/network** file.+
 <file bash network> <file bash network>
 config interface 'loopback' config interface 'loopback'
Line 181: Line 177:
 </file> </file>
  
-  * We took the **switch** config sections from  ///etc/config/network// and simply **swapped** vlan nr 1 and vlan nr 2 around.+  * We have taken the sections of the switch configuration from ///etc/config/network// and simply <wrap em>swapped</wrap> vlan nr 1 and vlan nr 2.
   * This means that eth0.1 is now on the **WAN** port.   * This means that eth0.1 is now on the **WAN** port.
   * **client_0** and **client_1** interface sections can always be kept as is.   * **client_0** and **client_1** interface sections can always be kept as is.
-  * Device **br-lan** section is in actuality now the **WAN** port. (This is so that we can support hardware with a single Ethernet port and to do complex bridge configurations should we need to)+  * The br-lan section of the device is now actually the WAN port.  (Switch configuration allows us to support hardware with a single Ethernet port and make complex bridge configurations if required)
  
  
 ===== DSA enabled devices ===== ===== DSA enabled devices =====
-  * These include newer Mediatek based devices like those using the MT7621 chipset.+  * This includes newer Mediatek-based devices such as those using the MT7621 chipset.
   * This time the **Xiaomi 4A Gigabit Edition**. This board does not have any **switch** sections and is much simpler.   * This time the **Xiaomi 4A Gigabit Edition**. This board does not have any **switch** sections and is much simpler.
  
Line 214: Line 210:
          
 </file> </file>
-  * Here you can see there is no **switch** sections and we added the **wan** port to **br-lan** (While removing the various lan ports). Plain and simple. +  * Here you can see that there are no switch sections and we have added the wan port to br-lan (while removing the various lan ports). Plain and simple. 
-  * Here'a snippet from the original /etc/config/network file you can compare with.+  * Here is a snippet from the original /etc/config/network file for you to compare.
  
 <file bash network> <file bash network>
Line 241: Line 237:
  
   * This brings us to the end of the detailed discussion of the **/etc/MESHdesk/configs/wan_network** file.   * This brings us to the end of the detailed discussion of the **/etc/MESHdesk/configs/wan_network** file.
-  * Be sure that this file is tweaked so it will work on your hardware.+  * Make sure that this file is customized to work on your hardware.
  
 ====== Some Hardware Info ====== ====== Some Hardware Info ======
  • network/firmware/openwrt-wan-network.1708173279.txt.gz
  • Last modified: 2024/02/17 14:34
  • by system