Quản lý băng thông Ưu tiên Trò chơi trực tuyến trên Mikrotik

Để làm cho Mạng Internet được sử dụng cho các mục đích. Vì vậy, không quan tâm và xấu cho tương lai nếu bạn nghĩ rằng nên được trục xuất các khách hàng thích tải các tập tin và dòng video khi bạn muốn ưu tiên các trò chơi trực tuyến trên mạng internet mà bạn có cho khách hàng. Quản lý băng thông cho các trò chơi trực tuyến trên Mikrotik hoàn toàn cần thiết, để tất cả các lợi ích có thể được chạy theo tỷ lệ và cân bằng.



Các mục đích internet cho các trò chơi trực tuyến đã trở thành một điều rất nhạy cảm trước khi duyệt cho khách hàng. Không bỏ qua lợi ích của người khác, chúng tôi chỉ cần kiểm soát tải xuống và luồng videocực kỳ lãng phí băng thông, cho phép duyệt web và ưu tiên và an toàn cho trò chơi trực tuyến. Vì vậy, mạng Internet mà chúng tôi xây dựng có thể được sử dụng cho các mục đích khác nhau và các dịch vụ mà chúng tôi cung cấp cho khách hàng sẽ mở ra cho nhiều sở thích khác nhau.

Trọng tâm của chúng tôi bây giờ là làm cách nào để chúng tôi phân bổ băng thông cho các trò chơi trực tuyến với nhiều sở thích khác nhau. Cách thích hợp nhất để nắm bắt các gói trò chơi trực tuyến là sử dụng các cổng đích TCP và UDP của trò chơi trực tuyến. Trên thực tế, khi một trò chơi trực tuyến đang chạy, nó không sử dụng nhiều băng thông, điều mà chúng tôi phải làm là tạo băng thông ổn định hơn bằng cách điều chỉnh mức độ ưu tiên cao nhất cho những người khác. Các cổng TCP và UDP của trò chơi trực tuyến thường được đề xuất và được tham chiếu bởi các trò chơi trực tuyến, nếu không, sẽ rất khó để biết các cổng đích thực sự có liên quan.

Cổng đích TCP và UDP của trò chơi trực tuyến thường rất riêng tư. Nhiều công cụ miễn phí không có quá nhiều thứ để giúp chúng tôi tìm được cổng đích của trò chơi trực tuyến. Bạn đã cố gắng sử dụng Wireshark hoặc Curr Port để tìm ra đích đến của các trò chơi trực tuyến? chỉ có thể phát hiện các gói đi qua các kết nối của cổng cục bộ, điều này sẽ luôn thay đổi theo kinh nghiệm của tôi trong nỗ lực xác định các cổng TCP và UDP của trò chơi trực tuyến. CÒn bạn thì sao?

1. Đây là tài liệu tham khảo của một số cổng TCP và UDP thường được sử dụng cho các trò chơi trực tuyến, tôi đã bao gồm trong các kịch bản mangle cho các kết nối đánh dấu của trò chơi trực tuyến :
?
1
2
3
4
5
6
7
số 8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/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

Sao chép các kịch bản Mangle ở ​​trên, chọn chỉ bạn sử dụng và dán vào cửa sổ terminal mới của winbox mikrotik, để nắm bắt kết nối cho nhiều trò chơi trực tuyến! Các kết quả được hiển thị dưới đây!
mangle + kết nối + trò chơi

sự miêu tả : 
  • comment = "xxx" là tên của trò chơi trực tuyến mà chúng tôi muốn nắm bắt kết nối
  • src-address = 192.168.1.0/24 là phạm vi của các địa chỉ IP của máy khách mà bạn có, để tách các trò chơi trực tuyến trên mỗi máy khách
  • dst-port = xxxx-xxxx là các cổng của TCP hoặc UDP của các trò chơi trực tuyến
2. Sau khi thực hiện các kết nối đánh dấu cho tất cả các trò chơi trực tuyến được sử dụng, tiếp theo là làm cho các gói tin đánh dấu cho mỗi khách hàng .

Nếu bạn muốn làm cho các gói trò chơi trực tuyến đánh dấu thành một cho tất cả các máy khách, bạn không cần src-address = 192.168.1.11/24 trên kết nối đánh dấu trên quy tắc mangle, loại bỏ địa chỉ src của kết nối đánh dấu ở trên, sau đó tạo gói vào một gói trò chơi trực tuyến như kịch bản dưới đây!

?
1
2
3
4
/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


Nhưng ở đây tôi đã tách các gói của trò chơi trực tuyến cho mọi khách hàng, các kịch bản cho các gói như hình dưới đây!

?
1
2
3
4
5
6
7
số 8
9
/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

Điều chỉnh địa chỉ ip src-địa chỉ trên các gói đánh dấu ở trên theo khách hàng máy tính mà bạn có, sau đó dán vào cửa sổ thiết bị đầu cuối mới trên winbox mikrotik, kết quả được hiển thị như dưới đây!

gói + trò chơi

3. Tiếp theo, chúng tôi sẽ làm cho hàng đợi cây dựa trên gói kết nối của quy tắc mangle của các trò chơi trực tuyến cho mỗi khách hàng và chúng tôi có thể giới hạn và đưa ra ưu tiên cao nhất. Thay đổi hàng đợi đơn giản là băng thông tối đa cho mỗi khách hàng với mức độ ưu tiên = 2. Sau đó, chúng tôi tạo cây xếp hàng cho trò chơi trực tuyến với mức độ ưu tiên = 1 điều này là dành cho các trò chơi trực tuyến không bị mất khi duyệt. Các kịch bản cho trò chơi trực tuyến xếp hàng cây mỗi khách hàng như dưới đây!

?
1
2
3
4
5
6
7
số 8
9
/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



Như thường cho nhanh hơn chỉ cần sao chép cây hàng đợi trò chơi trực tuyến ở trên để cửa sổ thiết bị đầu cuối mới mikrotik winbox, kết quả như hình dưới đây!

hàng đợi + cây + trò chơi

Lưu ý . Nếu bạn muốn giới hạn và ưu tiên các trò chơi trực tuyến mà không có cổng TCP và UDP nào không được tham chiếu bởi chính trò chơi trực tuyến, sẽ khó để tìm một cổng có liên quan theo cách tự, thậm chí bạn có công cụ Wireshark hoặc sử dụng đèn pin mikrotik. Đảm bảo rằng các cổng đã được chụp thực sự hoạt động mọi lúc. Có một số loại trò chơi trực tuyến có IP động, TCP và UDP khiến việc chụp các cổng trở nên khó khăn, trong trường hợp này tôi chỉ sử dụng trang nội dung để nắm bắt nó.
Để rõ ràng hơn, tôi đã thực hiện các kịch bản trên bằng cách sử dụng winbox mikrotik và để chứng minh các kịch bản ở trên hoạt động, hãy xem video bài viết ở trên! cho phương pháp mới nhất, không nhìn thấy sự hoàn hảo IIcủa băng thông mangement!