This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
technical:openwrt-wan-network [2022/09/17 22:08] admin [Background] |
technical:openwrt-wan-network [2022/09/25 20:19] (current) admin [Xiaomi 4A 100M] |
||
|---|---|---|---|
| Line 4: | Line 4: | ||
| * OpenWrt uses config files located under the **/ | * OpenWrt uses config files located under the **/ | ||
| * 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 run 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 |
| * Some devices for instance might only have one ethernet port. | * Some devices for instance might 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 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. | ||
| Line 10: | Line 10: | ||
| * This file needs to be unique to the specific device on which the MESHdesk package is included on. | * This file needs to be unique to the specific device on which the MESHdesk package is included on. | ||
| * This file will be used during startup to replace the **/ | * This file will be used during startup to replace the **/ | ||
| - | * The file 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't be reached) | + | * This config |
| - | * The unique part of the configuration of wan_network involves the Ethernet port configuration | + | * The unique part of the wan_network |
| - | - 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 combined with swconfig to create VLANs to split the physical ports on the device up. // (This is typically older Mediatek based hardware)// | ||
| - | - New DSA style config using names like wan, lan1, lan2 lan3 etc.// (This it typically newer Mediatek devices)// | + | - New DSA style config using names like wan, lan1, lan2 lan3 etc for the ports.// (This is typically newer Mediatek devices)// |
| Next we will unpack samples of each of these types. | Next we will unpack samples of each of these types. | ||
| <WRAP center round tip 100%> | <WRAP center round tip 100%> | ||
| - | When looking at these sample files keep in mind that our aim is to use the device called **br-lan** as a bridge | + | * When looking at these sample files keep in mind that our aim is to use the //device |
| + | * Traditionally | ||
| + | | ||
| </ | </ | ||
| Line 51: | Line 53: | ||
| </ | </ | ||
| * We swapped **eth0** and **eth1** as ports of **br-lan**. Plain and simple. | * We swapped **eth0** and **eth1** as ports of **br-lan**. Plain and simple. | ||
| + | * 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 will not need any swapping since there are only one port available. | ||
| + | * Here's a snippet from the original **/ | ||
| + | |||
| + | <file bash network> | ||
| + | .... | ||
| + | config device | ||
| + | option name ' | ||
| + | option type ' | ||
| + | list ports ' | ||
| + | |||
| + | config interface ' | ||
| + | option device ' | ||
| + | option proto ' | ||
| + | option ipaddr ' | ||
| + | option netmask ' | ||
| + | option ip6assign ' | ||
| + | |||
| + | config interface ' | ||
| + | option device ' | ||
| + | option proto ' | ||
| + | .... | ||
| + | </ | ||
| + | |||
| + | |||
| Line 182: | Line 208: | ||
| </ | </ | ||
| * 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 there is no **switch** sections and we added the **wan** port to **br-lan** (While removing the various lan ports). Plain and simple. | ||
| + | * Here's a snippet from the original / | ||
| + | |||
| + | <file bash network> | ||
| + | .... | ||
| + | config device | ||
| + | option name ' | ||
| + | option type ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | |||
| + | config interface ' | ||
| + | option device ' | ||
| + | option proto ' | ||
| + | option ipaddr ' | ||
| + | option netmask ' | ||
| + | option ip6assign ' | ||
| + | |||
| + | config interface ' | ||
| + | option device ' | ||
| + | option proto ' | ||
| + | .... | ||
| + | </ | ||
| + | |||
| + | * 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. | ||
| + | |||
| + | ====== Some Hardware Info ====== | ||
| + | ===== Xiaomi 4C ===== | ||
| + | * wan_network | ||
| + | <file bash wan_network> | ||
| + | config interface ' | ||
| + | option device ' | ||
| + | option proto ' | ||
| + | option ipaddr ' | ||
| + | option netmask ' | ||
| + | |||
| + | config device | ||
| + | option name ' | ||
| + | option type ' | ||
| + | list ports ' | ||
| + | |||
| + | config interface ' | ||
| + | option device ' | ||
| + | option proto ' | ||
| + | |||
| + | config interface ' | ||
| + | option proto ' | ||
| + | |||
| + | config interface ' | ||
| + | option proto ' | ||
| + | |||
| + | config switch | ||
| + | option name ' | ||
| + | option reset ' | ||
| + | option enable_vlan ' | ||
| + | |||
| + | config switch_vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | option ports '4 2 6t' | ||
| + | |||
| + | config switch_vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | option ports '1 6t' | ||
| + | |||
| + | </ | ||
| + | * hardware section | ||
| + | <file bash meshdesk> | ||
| + | config hardware ' | ||
| + | option morse_led '/ | ||
| + | option internet_led '/ | ||
| + | option wifi_led ' | ||
| + | </ | ||
| + | |||
| + | ===== Xiaomi 4A 100M ===== | ||
| + | * wan_network | ||
| + | <file bash wan_network> | ||
| + | config interface ' | ||
| + | option device ' | ||
| + | option proto ' | ||
| + | option ipaddr ' | ||
| + | option netmask ' | ||
| + | | ||
| + | config device | ||
| + | option name ' | ||
| + | option type ' | ||
| + | list ports ' | ||
| + | |||
| + | config interface ' | ||
| + | option device ' | ||
| + | option proto ' | ||
| + | |||
| + | config interface ' | ||
| + | option proto ' | ||
| + | |||
| + | config interface ' | ||
| + | option proto ' | ||
| + | |||
| + | config switch | ||
| + | option name ' | ||
| + | option reset ' | ||
| + | option enable_vlan ' | ||
| + | |||
| + | config switch_vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | option ports '0 6t' | ||
| + | |||
| + | config switch_vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | option ports '4 2 6t' | ||
| + | </ | ||
| + | * hardware section | ||
| + | <file bash meshdesk> | ||
| + | config hardware ' | ||
| + | option morse_led '/ | ||
| + | option internet_led '/ | ||
| + | option wifi_led ' | ||
| + | </ | ||
| + | |||
| + | ===== Totolink X500R (WiFi6) ===== | ||
| + | * wan_network | ||
| + | <file bash wan_network> | ||
| + | config interface ' | ||
| + | option device ' | ||
| + | option proto ' | ||
| + | option ipaddr ' | ||
| + | option netmask ' | ||
| + | |||
| + | config device | ||
| + | option name ' | ||
| + | option type ' | ||
| + | list ports ' | ||
| + | |||
| + | config interface ' | ||
| + | option device ' | ||
| + | option proto ' | ||
| + | |||
| + | config interface ' | ||
| + | option proto ' | ||
| + | |||
| + | config interface ' | ||
| + | option proto ' | ||
| + | </ | ||
| + | * hardware section | ||
| + | <file bash meshdesk> | ||
| + | config hardware ' | ||
| + | option morse_led '/ | ||
| + | option internet_led '/ | ||
| + | option wifi_led ' | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||