Differences
This shows you the differences between two versions of the page.
network:firmware:openwrt-wan-network [2024/02/17 14:34] – created system | network: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 | + | * If central management |
- | * OpenWrt uses config | + | * OpenWrt uses configuration |
* 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 | + | * Since we can include the MESHdesk package on virtually |
- | * Some devices | + | * For example, some devices only have one Ethernet |
- | * Others | + | * Others |
- | * For this we create the **/ | + | * For this we create the file **/ |
- | * This file needs to be unique | + | * This file must be unique |
- | * This file will be used during startup to replace the **/ | + | * This file is used during startup to replace the **/ |
- | * This config | + | * This configuration |
- | * The unique part of the wan_network file involves | + | * The unique part of the wan_network file concerns |
- | - 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 | + | - Devices with a single eth0 port in combination |
- | - New DSA style config using names like wan, lan1, lan2 lan3 etc for the ports.// (This is typically | + | - New DSA-like configuration with names like wan, lan1, lan2, lan3, etc. for the ports. //(This is typical for newer Mediatek devices)// |
- | Next we will unpack | + | Next we will unpack |
- | + | ||
- | <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. | + | |
- | </ | + | |
+ | <alert type=" | ||
+ | * When looking at these sample files, remember that we want to use the //device section// called **br-lan** as a bridge. | ||
+ | * Traditionally, | ||
+ | * However, we are now configuring it so that the WAN port becomes part of the device instead of the LAN ports. | ||
+ | </ | ||
===== Devices with standard eth0 and or eth1 ports ===== | ===== Devices with standard eth0 and or eth1 ports ===== | ||
- | * These include | + | * This includes |
- | * 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: | ||
| | ||
</ | </ | ||
- | * 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 |
- | * Here's a snippet | + | * Here is an excerpt |
<file bash network> | <file bash network> | ||
Line 85: | Line 84: | ||
- | + | ===== Devices which use swconfig ===== | |
- | + | * These are usually | |
- | + | * Let us take a look at the files from a Xiaomi 4A 110M | |
- | ===== Devices which uses swconfig ===== | + | * Look at the default / |
- | * This is typically | + | |
- | * Lets look and the files from a Xiaomi 4A 110M | + | |
- | * Refer to the default | + | |
<file bash network> | <file bash network> | ||
config interface ' | config interface ' | ||
Line 181: | Line 177: | ||
</ | </ | ||
- | * We took the **switch** config | + | * We have taken the sections |
* 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 | + | * The br-lan section |
===== DSA enabled devices ===== | ===== DSA enabled devices ===== | ||
- | * These include | + | * This includes |
* 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: | ||
| | ||
</ | </ | ||
- | * 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' | + | * Here is a snippet from the original / |
<file bash network> | <file bash network> | ||
Line 241: | Line 237: | ||
* This brings us to the end of the detailed discussion of the **/ | * This brings us to the end of the detailed discussion of the **/ | ||
- | * 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 ====== |