MikroTik Routers (SFQ)

I recommend following this tutorial now that fq_codel is available: https://www.stoplagging.com/mikrotik-routers-fq_codel/
When you only need 4 Ethernet ports.
When you need more than 4 Ethernet Ports.

After your MikroTik hEx box comes in, you need to hook it up. Set it up like one of the setups listed above.  It is important that Ethernet Port 1 (Internet / Port In) goes to your modem and the rest of the ports goes to your computers, additional switches, or access points.

If you don’t need more than the 4 Ethernet ports provided by the MikroTik… you can skip putting in the gigabit switch.
If you need more Ethernet ports then you should add a switch to one of the other ports of the MikroTik hEx.

*Note: if you have an all in one Comcast modem, router, and wireless combo box you have to figure out how to put it in “bridged mode”. That means you  make it function as a modem only. Try googling for your all in one modem’s model number and bridge mode to figure out how to do so.

After every Ethernet cable is hooked up start here…

  1. Turn off your modem.
  2. Power on the hEx box by plugging in the power and let it boot up (Takes less than 30 seconds)
  3. Turn on your modem and let it fully boot (may take a while depending on your Internet Provider)
  4. Using one of the computers connected to the hEx box via ethernet cable… Open a browser.
  5. Navigate to 192.168.88.1 (this is the default router IP for the hEx) in the browser.
  6. A login page will appear so log in with the following credentials…
    1. Admin
    2. (there’s no password initially just login as Admin)
  7. You should be in the quick-set page and should be able to see your public IP address after the router finishes communicating with your modem.
  8. During this time you can set up a login password in the same page, apply configurations and logout.
  9. Download WinBox to access your router without the browser.
  10. After downloading run WinBox.exe and login with admin and your new password (that you did in step 8).
  11. Now a new winbox Window should appear…
  12. Navigate to System > Packages
    1. Click check for updates and update everything
    2. Your Mikrotik will restart after updates
    3. When its done restarting go back into WinBox and login again

Now we will configure the router to prevent Lag

Part I: Firewall Rules

  1. Navigate to IP > Firewall
    1. Go to Filter Rules Tab
    2. Select fasttrack and disable the rule (this is important otherwise the bandwidth management won’t work)

      Disabling Fasttrack

Part II: Terminal Entries

In winbox, navigate to “New Terminal”. After the Terminal window opens type in

/queue type

press enter then type in….

add kind=sfq name=sfq-default sfq-perturb=10

then press enter again.

Now type in

/queue simple

press enter then type in….

add max-limit=100M/100M name=sfq-default queue=sfq-default/sfq-default target=192.168.88.0/24

then press enter.

Part III: Calibrating your Max Download and Max Upload Speeds

  1. Make sure nothing is using the network and perform a speedtest from http://www.dslreports.com/speedtest
  2. Take note of your results and calculate 80% to 90% of your bandwidth as the result. (SQM will not work if this percentage is not lower than your top speed!!!)
  3. Navigate to Queues and double-click sfq-default (which was created in terminal)
  4. For your limits enter in 80-90% of your full bandwidth otherwise you will lag! The router needs some extra bandwidth to work with!
  5. Upload is on the left side. Download is on the right side. In my example my full DL speed was 50Mbps and Full Upload speed was 3 Mbps so I entered in less.
  6. Then press Apply and OK.

Congrats you are Done!

Calibration and Testing

Run “ping www.google.com -t” in command prompt and then run the speedtest.

If you still have an A rating, with low pings during the speedtest. You can incrementally increase your total bandwidth above the 85% you initially set until pings start to spike higher than desired.

Otherwise if your rating is not good or you are getting bad pings try reducing the max bandwidth limits. (Ex. If 85% is still lagging try 80%.)

Doing this allows you find the sweet spot between getting max bandwidth vs experiencing high pings.

If it looks like this you won’t lag in game when someone is torrenting…