Obsidean_VM/01-Documentation/Routers/Mikrotik - Network Redes/Mikrotik - Setup Commands f...

8.2 KiB

/interface bridge port set [find] horizon=none
/interface wireless set wlan1 default-forwarding=yes
/interface wireless set wlan1 multicast-helper=full
/interface bridge port set [find interface="wlan1"] hw=no

Command Explanation
1. Create a Bridge Interface
/interface bridge add name=bridge protocol-mode=none Creates a bridge named bridge with protocol mode set to none for transparent bridging.
2. Add Interfaces to the Bridge
/interface bridge port add bridge=bridge interface=ether1 Adds ether1 to the bridge.
/interface bridge port add bridge=bridge interface=ether2 Adds ether2 to the bridge.
/interface bridge port add bridge=bridge interface=wlan1 Adds the Wi-Fi interface wlan1 to the bridge.
3. Configure the Wireless Interface
/interface wireless set wlan1 mode=ap-bridge Sets wlan1 to access point mode to allow multiple clients.
/interface wireless set wlan1 ssid="YourSSID" Sets the Wi-Fi network name (replace "YourSSID" with your desired SSID).
/interface wireless set wlan1 frequency=auto Sets the Wi-Fi frequency to automatic selection.
/interface wireless set wlan1 wireless-protocol=802.11 Ensures the standard Wi-Fi protocol is used.
/interface wireless set wlan1 default-forwarding=yes Allows communication between wireless clients and the LAN.
/interface wireless set wlan1 multicast-helper=full Enables full multicast forwarding for protocols that require it.
4. Assign an IP Address to the Bridge
/ip address add address=192.168.1.1/24 interface=bridge Assigns IP 192.168.1.1 to the bridge interface (adjust as needed).
5. Configure DHCP Server
/ip pool add name=dhcp_pool ranges=192.168.1.100-192.168.1.200 Creates a DHCP pool for clients.
/ip dhcp-server add name=dhcp1 interface=bridge address-pool=dhcp_pool Adds a DHCP server on the bridge interface.
/ip dhcp-server network add address=192.168.1.0/24 gateway=192.168.1.1 dns-server=8.8.8.8 Sets DHCP network parameters (adjust gateway and DNS as needed).
6. Adjust Bridge Settings
/interface bridge set bridge protocol-mode=none Ensures no protocol-specific filtering on the bridge.
7. Disable Hardware Offloading on wlan1
/interface bridge port set [find interface="wlan1"] hw=no Disables hardware offload for wlan1 to improve multicast handling.
8. Ensure ether2 Is Active (Optional)
/interface enable ether2 Enables ether2 if it is disabled.
9. Check and Remove Bridge Filters (If Any)
/interface bridge filter remove [find] Removes any bridge filters to allow all Layer 2 traffic.
10. Review Firewall Settings
/ip firewall filter print Displays current firewall rules.
(If necessary)
/ip firewall filter remove [find] Removes all firewall filter rules (use with caution).
11. Update RouterOS and Wireless Firmware (Recommended)
/system package update check-for-updates Checks for RouterOS updates.
/system package update install Installs available updates.
/interface wireless upgrade Upgrades wireless interface firmware.
12. Reboot the Router
/system reboot Reboots the router to apply changes.
13. Verify Wireless Interface Settings
/interface wireless print detail where name="wlan1" Displays detailed settings of wlan1 for verification.
14. Adjust Wireless Data Rates (Optional)
/interface wireless set wlan1 basic-rates-b=1Mbps basic-rates-a/g=6Mbps Sets basic data rates to improve multicast traffic reliability.