In this article, we will discuss how to set up a Mikrotik router to act as a switch while keeping its WiFi capabilities enabled. This configuration is useful when you need to connect multiple Mikrotik routers and want to extend your network coverage.
Prerequisites
Before we begin, make sure you have the following:
- Two Mikrotik routers
- An Ethernet cable to connect the routers
- Access to the Mikrotik routers’ web interfaces
Connecting the Mikrotik Routers
Follow these steps to connect the Mikrotik routers:
- Connect the first Mikrotik router to your modem or internet source using an Ethernet cable.
- Connect the second Mikrotik router to the first router’s LAN port using another Ethernet cable.
Setting up the Mikrotik Router as a Switch
After connecting the Mikrotik routers, you need to configure the second router to act as a switch. Here’s how:
- Log in to the second Mikrotik router’s web interface.
- Go to the
IPmenu and click onAddresses. - In the
IP Addresseswindow, add a new address with the same subnet as the first router’s LAN. For example, if the first router’s LAN IP is192.168.88.1/24, set the second router’s LAN IP to192.168.88.2/24. - Go to the
IPmenu and click onFirewall. - In the
Firewallwindow, click on theNATtab and add a new NAT rule. Set theChaintosrcnat, theOutgoing Interfaceto the WAN interface, and theSource Addressto the LAN subnet. - Go to the
IPmenu and click onFirewallagain. This time, click on theMangletab and add a new marking rule. Set theChaintoprerouting, theProtocoltotcp, and theSource Portto80,443(for HTTP and HTTPS). Set theNew Actiontomarkand thePacket Markto a unique value, such asweb-traffic. - Go to the
IPmenu and click onFirewallfor the third time. Click on theRulestab and add a new forwarding rule. Set theChaintoforward, theProtocoltotcp, theSource Portto80,443, and theDestination Addressto the first router’s LAN IP. Set theIncoming Interfaceto the LAN interface and theOutgoing Interfaceto the WAN interface. Finally, set theConnection Markto the same value used in step 6 (e.g.,web-traffic).
Enabling WiFi on the Mikrotik Router
After setting up the Mikrotik router as a switch, you can enable its WiFi capabilities. Here’s how:
- Go to the
Wirelessmenu and click onWireless Interfaces. - Enable the wireless interface and configure its settings, such as the SSID, security, and wireless mode.
In this article, we discussed how to set up a Mikrotik router as a switch while keeping its WiFi capabilities enabled. We covered the following:
- Connecting the Mikrotik routers
- Setting up the Mikrotik router as a switch
- Enabling WiFi on the Mikrotik router