Graphic Web Design, Computer Network, Balinese Culture

Loading...
10 comments
Basic Idea Management Bandwidth Prioritize Online Games Mikrotik
In order to make the Internet Network that is used for the purposes. So inconsiderate and bad for the future if you think should be expel the clients who likes to download files and video streams when you want to prioritize the online games on the internet network that you have for the clients. Bandwidth Management for the Online Games on Mikrotik absolutely necessary, so that all interests can be run in proportion and balanced.


The internet purposes for the online games has become a very sensitive thing before browsing for the client. Without ignoring the interests of others, we just need to control downloads and video streams are hugely wasteful of the bandwidth, giving breath to browsing, and giving priority and make safe to online games. So that the Internet network that we build can be used for various purposes, and the services that we provided to the client to be open to a wider variety of interests.

Our focus now is how do we allocate bandwidth for the online games among with various other interests. The most appropriate way to capture the packets of online games is using TCP and UDP destination ports of online games. Actually, when a running online games, it doesn't use a lot of bandwidth, something taht we have to do is giving bandwidth that more stable by adjusting with highest priority to the others. TCP and UDP ports of online games usually are at a recommendation and referenced by online games itself, if not, it would be very difficult to know the destination ports that are really relevant.

TCP and UDP destination port of online games are usually very privacy. Many free tools there is not too much to help us in order to find the destination port of an online game. Have you try to use Wireshark or Curr Port to find the ports destination of the online games? which can only detect packets that pass through connections of local port only, which will be always changing as far as my experience in an effort to determine the TCP and UDP ports of an online game. How about you?

1. Here is references of some TCP and UDP ports commonly used for the online games, I have included in the mangle scripts for the mark connection of online games:
/ip firewall mangle
add action=mark-connection chain=prerouting comment="POINT BLANK KONEKSI TCP" disabled=no src-address=192.168.1.0/24 dst-port=39190 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="POINT BLANK UDP" disabled=no src-address=192.168.1.0/24 dst-port=40000-40010 new-connection-mark="GAME-conn" passthrough=no protocol=udp
add action=mark-connection chain=prerouting comment="POKER TCP" disabled=no src-address=192.168.1.0/24 dst-port=9339,843 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="AYODANCE TCP" disabled=no src-address=192.168.1.0/24 dst-port=18901,18902,18903,18904,18905,18906,18907,18908,18909 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="LOST SAGA TCP" disabled=no src-address=192.168.1.0/24 dst-port=14009-14010 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="LOST SAGA UDP" disabled=no src-address=192.168.1.0/24 dst-port=14009-14010 new-connection-mark="GAME-conn" passthrough=no protocol=udp
add action=mark-connection chain=prerouting comment="SEAL ONLINE TCP" disabled=no src-address=192.168.1.0/24 dst-port=1818 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="LINE AGE2 TCP" disabled=no src-address=192.168.1.0/24 dst-port=7777 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="RF-ELVENT TCP" disabled=no src-address=192.168.1.0/24 dst-port=27780 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="RF KONEKSI UDP" disabled=no src-address=192.168.1.0/24 dst-port=10001,10002,10003,10004,10005,10006,10007 new-connection-mark="GAME-conn" passthrough=no protocol=udp
add action=mark-connection chain=prerouting comment="PERFECT WORLD TCP" disabled=no src-address=192.168.1.0/24 dst-port=29000 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="ROHAN TCP" disabled=no src-address=192.168.1.0/24 dst-port=22100 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="ZEUS RO TCP" disabled=no src-address=192.168.1.0/24 dst-port=5121 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="DOTTA TCP" disabled=no src-address=192.168.1.0/24 dst-port=6000-6152 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="GHOST ONLINE TCP" disabled=no src-address=192.168.1.0/24 dst-port=19101 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="WOW AMPM TCP" disabled=no src-address=192.168.1.0/24 dst-port=8085 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="DRIFT CITY TCP" disabled=no src-address=192.168.1.0/24 dst-port=11011-11041 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="GET AMPED TCP" disabled=no src-address=192.168.1.0/24 dst-port=13413 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="YULLGANG TCP" disabled=no src-address=192.168.1.0/24 dst-port=19000 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="IDOL STREET TCP" disabled=no src-address=192.168.1.0/24 dst-port=2001 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="CRAZY KART TCP" disabled=no src-address=192.168.1.0/24 dst-port=9601-9602 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="RAN ONLINE TCP" disabled=no src-address=192.168.1.0/24 dst-port=5105 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="CROSS FIRE KONEKSI TCP" disabled=no src-address=192.168.1.0/24 dst-port=10009 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="CROSS FIRE KONEKSI UDP" disabled=no src-address=192.168.1.0/24 dst-port=40000-40010 new-connection-mark="GAME-conn" passthrough=no protocol=udp
add action=mark-connection chain=prerouting comment="RETURN OF WARRIOR TCP" disabled=no src-address=192.168.1.0/24 dst-port=10402 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="CRAZY KART 2 TCP" disabled=no src-address=192.168.1.0/24 dst-port=9600 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="LUNA ONLINE TCP" disabled=no src-address=192.168.1.0/24 dst-port=15002 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="RUNES OF MAGIC TCP" disabled=no src-address=192.168.1.0/24 dst-port=16402-16502 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="FRESH RO TCP" disabled=no src-address=192.168.1.0/24 dst-port=5126 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="WAR ROCK TCP" disabled=no src-address=192.168.1.0/24 dst-port=5340-5352 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="FASTBLACK TCP" disabled=no src-address=192.168.1.0/24 dst-port=6000-6001 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="ROSE ONLINE TCP" disabled=no src-address=192.168.1.0/24 dst-port=29200 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="X-SHOT TCP" disabled=no src-address=192.168.1.0/24 dst-port=7341,7451 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="X-SHOT UDP" disabled=no src-address=192.168.1.0/24 dst-port=7808,30000 new-connection-mark="GAME-conn" passthrough=no protocol=udp
add action=mark-connection chain=prerouting comment="TANTRA ONLINE TCP" disabled=no src-address=192.168.1.0/24 dst-port=3010 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="COUNTER STRIKE TCP" disabled=no src-address=192.168.1.0/24 dst-port=36567,8001 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="COUNTER STRIKE UDP" disabled=no src-address=192.168.1.0/24 dst-port=11100-11125,8001 new-connection-mark="GAME-conn" passthrough=no protocol=udp
add action=mark-connection chain=prerouting comment="3 KINGDOMS UDP" disabled=no src-address=192.168.1.0/24 dst-port=42051-42052 new-connection-mark="GAME-conn" passthrough=no protocol=udp
add action=mark-connection chain=prerouting comment="Carom3D TCP" disabled=no src-address=192.168.1.0/24 dst-port=42051-42052 new-connection-mark="GAME-conn" passthrough=yes protocol=tcp

Copy the above Mangle scripts, select that only you use and paste to the new terminal window of mikrotik winbox, to capture the connection for the variety of online games! The results are as shown below!

description :
  • comment = "xxx" is the name of an online game that we want to capture the connection
  • src-address = 192.168.1.0/24 is range of the clients IP addresses that you have, to separate the online games on each clients
  • dst-port = xxxx-xxxx is the ports of TCP or UDP of the online games
2. After making the mark connection for all online games that used, the next is making mark packets for every clients.

If you want to make the mark packet online games into one to all clients, you do not need src-address = 192.168.1.11/24 on mark connetion on mangle rule, remove src-address of the mark connection above, then make the packet into single packet the online game as the script below!

/ip firewall mangle
add action=mark-packet chain=prerouting comment="GAME ALL CLIENTS" connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-pkt passthrough=no
/queue tree
add name="GAME ALL CLIENTS" parent=global-out packet-mark=GAME-pkt limit-at=220k queue=default priority=7 max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s


But here I have separated the packets of online game for every clients, the scripts for the packets as shown below!

/ip firewall mangle
add action=mark-packet chain=forward comment="BILLING-GAME" src-address=192.168.1.11 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-BILL-pkt passthrough=no
add action=mark-packet chain=forward comment="CLIENT1-GAME" src-address=192.168.1.17 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-CLIENT1-pkt passthrough=no
add action=mark-packet chain=forward comment="CLIENT2-GAME" src-address=192.168.1.16 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-CLIENT2-pkt passthrough=no
add action=mark-packet chain=forward comment="CLIENT3-GAME" src-address=192.168.1.15 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-CLIENT3-pkt passthrough=no
add action=mark-packet chain=forward comment="CLIENT4-GAME" src-address=192.168.1.14 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-CLIENT4-pkt passthrough=no
add action=mark-packet chain=forward comment="CLIENT5-GAME" src-address=192.168.1.20 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-CLIENT5-pkt passthrough=no
add action=mark-packet chain=forward comment="CLIENT6-GAME" src-address=192.168.1.21 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-CLIENT6-pkt passthrough=no
add action=mark-packet chain=forward comment="MASTER-GAME" src-address=192.168.1.12 connection-mark="GAME-conn" disabled=no new-packet-mark=GAME-MASTER-pkt passthrough=no

Adjust src-address ip address on the mark packets above according with computer clients that you have, then paste to the new terminal window on mikrotik winbox, the result is shown as below!


3. The next we'll make queue tree based on connection packet of mangle rule of the online games per clients and we can limit and give with the highest priority. Changes the simple queue as maximum bandwidth per clients with the priority = 2. After that we make queue tree for online games with the priority = 1 this is for the online games is not lose with the browsing. The script for the online games queue tree per clients like below!

/queue tree
add name=BillingGame parent=global-out packet-mark=GAME-BILL-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=Client1Game parent=global-out packet-mark=GAME-CLIENT1-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=Client2Game parent=global-out packet-mark=GAME-CLIENT2-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=Client3Game parent=global-out packet-mark=GAME-CLIENT3-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=Client4Game parent=global-out packet-mark=GAME-CLIENT4-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=Client5Game parent=global-out packet-mark=GAME-CLIENT5-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=Client6Game parent=global-out packet-mark=GAME-CLIENT6-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s
add name=MasterGame parent=global-out packet-mark=GAME-MASTER-pkt limit-at=200k queue=default priority=1 max-limit=200k burst-limit=256k burst-threshold=150k burst-time=2s

As usually for more quickly just copy the online games queue tree above to the new terminal window mikrotik winbox, the result like the picture below!


Note. If you want to limit and prioritize the online games that no TCP and UDP ports that are not referenced by the online games itself, it would be difficult part to find a relevant ports by self, even you have such a wireshark tool or using torch on mikrotik. Make sure the ports that was captured is really working all times. There are some kind of the online games has dynamic IP, TCP and UDP that makes so difficult to captured the ports, in this case I just used the content site to capture it.
For more clearly I have made the scripts above using mikrotik winbox and to prove the scripts above works, let’s watch the article video above! for the newest method, don't to see the Perfection II of the Bandwidth Mangement!
Share This Article :
Related Articles

10 comments :

  1. malam mas ketut, untuk settingan queue tree dan mangle per pc di atas bukankah bisa disederhanakan menjadi 1 mangle dan 1 queue tree secara global, seperti contoh script pada ( Combining Simple Queue Tree for Traffic Congestion ),

    mohon petunjuknya..

    ReplyDelete
    Replies
    1. Bisa saja mas Husnul, ada kelebihan dan kekurangannya, jika digabung bisa terjadi perebutan bandwidth jika client banyak dengan bandwidth yang terbatas, saya belum melihat dengan jelas, seberapa jauh setting bursts bisa mengendalikan perebutan tersebut. Efektivitas dari setiap metode bergantung juga pada prioritas layanan internet dan keadaan dilapangan. Harus dicoba yang mana yang lebih efektif dan efisien.

      Delete
  2. This site is very important to gamers. Do you play more attactive game playstation5. Please go to www.ps5info.de/ and play ps5 and I think it is more enjoyable to you.

    GERMAN:Diese Seite ist für Spieler sehr wichtig. Sie spielen attraktiver Spiel playstation5. Bitte gehen Sie auf www.ps5info.de/

    und spielen ps5 und ich denke, es ist mehr Spaß für Sie.

    ReplyDelete
  3. mas, klo game online luar negri kan ga ada mangle port gamenya, apa leg kalau ga ada portnya??

    ReplyDelete
  4. mas ini kenaapa
    input does not match any value of parent
    pas copy pate /queue tree

    ip WAN 192.168.1.3/24 Network 192.268.1.0
    LAN 192.168.2.1/24 Network 192.268.2.0
    Mohon Bantuannya. THX

    ReplyDelete
    Replies
    1. Kalau ada script awalnya Bos.
      ip WAN 192.168.1.3/24 Network 192.268.1.0
      LAN 192.168.2.1/24 Network 192.268.2.0
      atau secenario speedy tanpa Bridge ( PPOE )
      Baru belajar jaringan

      Delete
    2. Sir,
      do you have a script for this:

      2mangle

      - 1 mangle for ISP1 to catch all udp/tcp connection (browsing)
      - 1 mangle for ISP2 to catch all tcp/udp connection (gaming)


      2 masquerade
      2 routes

      thanks in advance.

      Delete
  5. mas saya mau nanya ini script yg punya bagus yg mana dipakek untuk game online dan browsing
    http://agratitudesign.blogspot.com/2013/12/complete-queue-tree-without-queue_25.html

    ReplyDelete
  6. Malam Mas Ketut,

    Tutor yg Mas Ketut terapkan diatas utk Speedy 1 Line, nah gimana dengan Speedy yang dua Line, misalkan Speedy Line 1 (browsing) dan Speedy Line 2 (Game) gimana cara pemisahan jalur nya (dalam artian bukan Load Balance) tapi pisah jalur,
    adakah scriptnya Mas ?. Demikian Terima kasih

    ReplyDelete
  7. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work lets play

    ReplyDelete