This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| computing:openwrt [2021/04/25 19:28] – oemb1905 | computing:openwrt [2026/08/11 11:49] (current) – oemb1905 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ------------------------------------------- | ------------------------------------------- | ||
| - | * **openwrt** | + | * **openwrt-mt6000** |
| * **Jonathan Haack** | * **Jonathan Haack** | ||
| * **Haack' | * **Haack' | ||
| - | * **netcmnd@jonathanhaack.com** | + | * **webmaster@haacksnetworking.org** |
| ------------------------------------------- | ------------------------------------------- | ||
| - | //openwrt// | + | //openWRT on two GL.Inet MT6000s// |
| ------------------------------------------- | ------------------------------------------- | ||
| + | [[https:// | ||
| + | ------------------------------------------- | ||
| + | |||
| + | ==== Introduction ==== | ||
| + | |||
| + | This tutorial reviews the unique manner in which I was able to get public and private interfaces/ | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Only the router has a dhcp server. The AP is just a radio and serves two different public SSIDs and two different private SSIDs. Each is attached to the matching VLAN as entered on the AP. Alright, so now that I've provided the overview, let's review how to do this step by step. It might help others as its different than the way I'm used to doing this (1) and it will help me document and remember what I did so I can replicate in production for Haack' | ||
| + | |||
| + | ==== Setting up the Router ==== | ||
| + | |||
| + | The first step is to create VLAN filtering on the default br-lan device. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | To get here, go to Interfaces > Devices > Bridge VLAN filtering. Enable the option and add as many VLANs as you desire. In my case, I want the ports tagged as I have above but you will likely need a different arrangement so make sure to alter or adjust these instructions for your use case. | ||
| + | |||
| + | NOTE: You must not Save and Apply the settings above. | ||
| + | |||
| + | Instead, you need to go to Interfaces > Interfaces > lan Edit > Device. Change the device from the default br-lan to the Software VLAN called br-lan.1 that you just created. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Once you've attached the lan interface to the newly created Software VLAN br-lan.1, you can safely Save and Apply the changes and your router will remain reachable. After this, you need to create a public interface, firewall zone, and two separate radios/ | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | As you can see above, you need to change the br-lan’s interface’s underlying Device from br-lan to the new Software bridge br-lan.1. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | As you can see on the Interface overview page, the lan is connected to br-lan.1 and the VLAN is connected to br-lan.192 (for example). These are the two Software VLANs we created off the primary bridge device above. In short, we forked the physical hardware bridge into two separate VLANs and separated subnets. After creating the public interface on the router, make sure to also create an appropriate firewall zone. Yours might look something similar to this: | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | My router has an openvpn server as well, but that's not the focus of this tutorial. If you are interested in that, you can look over my openvpn server on openWRT wiki notes. For now, what's important to note is that you need to click on the pub zone, click Edit, then under "Allow forward to destination zones" make sure to specify the wan zone or your public interface won't be able to route out. More than likely, you will want to set input/ | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | As you can see above, each frequency has both a public and private SSID setup. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Under the private radio/SSID, you can see that it is attached to the lan interface/ | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | As you can see here, the public SSID is attached to the pub interface/ | ||
| + | |||
| + | The most important thing to note in the assets above is that the private SSID is attached to the lan network, while the public SSID is attached to the pub network. This is essential so that the router' | ||
| + | |||
| + | ==== Setting up the AP ==== | ||
| + | |||
| + | Once that's done and once you've tested the radios and vlan/ | ||
| + | |||
| + | * You do not set up dhcp on either lan or pub interfaces on the AP | ||
| + | * Remove the WAN and WAN6 interfaces as this device is in AP-only mode | ||
| + | |||
| + | Other than these key differences, | ||
| + | |||
| + | * Create the two VLAN IDs under VLAN filtering option on br-lan (on the AP) in Interfaces > Devices > br-lan Configure; make sure not to apply changes | ||
| + | * Change the Device in Interfaces > Interfaces > lan Edit to use br-lan.1 instead of br-lan | ||
| + | |||
| + | After this you save and apply the changes, create your public interface, add the associated firewall zone to the public interface and attach the public interface to br-lan.192 (for example), or what would be the other Software VLAN you created for the public network. Here are example assets of those configurations: | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The first thing you should notice is that there are no WAN or WAN6 interfaces present since this is the AP. Each interface on the AP is attached is to the same / matching name Software VLANs as were created on the router. Just like the router, those Software VLANs were created on the AP under Interfaces > Devices > br-lan Configure > Add VLAN Filtering; see the steps above for how to do this. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | If you click Edit on the lan interface and look under the DHCP Server tab, make sure that Ignore interface is selected. The reason this information is populated is because the lan interface comes with DHCP Server enabled by default on the AP; one must disable it by selecting the box above. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | When you create a new interfaces, as you will do on the AP for the public network, openWRT does not automatically create a DHCP Server and so there will be no information populated under the tab. This is what you want, as you don't want the AP doing DHCP, only the router. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The AP's firewall setup is also simpler because there' | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | ==== Final Thoughts ==== | ||
| + | |||
| + | Just as with the router, the SSIDs marked " | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Update: 08-11-26 | ||
| + | |||
| + | When I first wrote this, I had the good fortune of having mainly dual-NIC machines in the shop / home office. For this reason, I simply untagged the main lan on the 2.5Gbps switch and untagged the guest lan on the 1Gbps switch. From there, I could simply run cables to each machine and had dual-connectivity to each vlan/subnet with minimal fuss. However, over time, I expanded this to having an additional subnet/vlan that is not tied to pihole+unbound. The reason for this was to mitigate downtime for others in the house if/when my pihole+unbound vms failed, etc., or a fallback interface / SSID as it were. This meant I either had to expand to get tri-NIC setups or finally setup proper vlan support on my clients. I chose the latter. First, I use managed ifupdown within Network Manager so I need to let it know to manage (not overlook) my interfaces file: | ||
| + | |||
| + | sudo apt install network-manager nm-connection-editor networking bridge-utils | ||
| + | sudo nano / | ||
| + | | ||
| + | Inside there, make sure that your file includes these directives: | ||
| + | |||
| + | < | ||
| + | [main] | ||
| + | plugins=ifupdown, | ||
| + | |||
| + | [ifupdown] | ||
| + | managed=true | ||
| + | </ | ||
| + | |||
| + | Then, after that, install the vlan package and setup your interfaces file to match the '' | ||
| + | |||
| + | sudo apt install vlan | ||
| + | |||
| + | Inside interfaces, I setup the following: | ||
| + | |||
| + | < | ||
| + | # ===== First NIC (enp1s0) – 2.5G ===== | ||
| + | auto enp1s0 | ||
| + | iface enp1s0 inet manual | ||
| + | |||
| + | # Private 10.30.30.0/ | ||
| + | auto br-priv | ||
| + | iface br-priv inet dhcp | ||
| + | bridge_ports enp1s0 | ||
| + | bridge_stp off | ||
| + | bridge_fd 0 | ||
| + | |||
| + | # VLAN 178 (172.60.60.0/ | ||
| + | auto enp1s0.178 | ||
| + | iface enp1s0.178 inet manual | ||
| + | vlan-raw-device enp1s0 | ||
| + | |||
| + | auto br-open | ||
| + | iface br-open inet dhcp | ||
| + | bridge_ports enp1s0.178 | ||
| + | bridge_stp off | ||
| + | bridge_fd 0 | ||
| + | |||
| + | # VLAN 177 (172.38.38.0/ | ||
| + | auto enp1s0.177 | ||
| + | iface enp1s0.177 inet manual | ||
| + | vlan-raw-device enp1s0 | ||
| + | |||
| + | auto br-lock | ||
| + | iface br-lock inet dhcp | ||
| + | bridge_ports enp1s0.177 | ||
| + | bridge_stp off | ||
| + | bridge_fd 0 | ||
| + | |||
| + | # ===== Second NIC (enp2s0) - 1Gbps ===== | ||
| + | #auto enp2s0 | ||
| + | #iface enp2s0 inet dhcp | ||
| + | # this was moved to NM only since they seemed to fight over this one | ||
| + | |||
| + | |||
| + | #If bridge is needed on enp2s0, use the following | ||
| + | # VLAN 177 (172.38.38.0/ | ||
| + | #auto enp2s0 | ||
| + | #iface enp2s0 inet manual | ||
| + | |||
| + | #auto br-lock2 | ||
| + | #iface br-lock2 inet dhcp | ||
| + | # bridge_ports enp2s0 | ||
| + | # bridge_stp off | ||
| + | # bridge_fd 0 | ||
| + | </ | ||
| + | |||
| + | For the second NIC, I found that - if left unbridged - Network Manager would take it over. Of course, you could disable the interface in Network Manager' | ||
| + | |||
| + | systemctl mask ifupdown-pre.service | ||
| + | | ||
| + | After that, I was able to freely reboot without errors. Every once and a while a bridge will take a bit to raise or fail to raise. If that happens, just restart networking and it populates. It takes time for all the negotiations, | ||
| + | |||
| + | -- -- OLD STUFF - EDIT -- -- | ||
| - | For the language and style save page error during upgrades, check the luci configuration file that came in, as it likely | + | This is a general openwrt wiki page, for flashing |
| | | ||
| nano / | nano / | ||
| - | In the file that opens, make sure the configure internal themes parameter has the bootstrap entry below it, which it likely | + | Check the option Bootstrap part - it is likely |
| config internal themes | config internal themes | ||
| option Bootstrap '/ | option Bootstrap '/ | ||
| - | --- //[[jonathan@haacksnetworking.com|oemb1905]] | + | --- //[[alerts@haacksnetworking.org|oemb1905]] |