Advertisement
rootplg3544

PRIORITAS TRAFIC ICMP PUNYAKU

Oct 30th, 2018
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. We want to restrict client with 128 kbps. BUT also want to prioritize it based on traffic type.
  2. Example …
  3. Client-A IP = 101.11.14.1 (zaib-desktop)
  4. Bandwidth Allowed = 128k Total
  5. Priority 1 = ICMP Traffic
  6. Priority 2 = HTTPS Traffic
  7. Priority 3 = HTTP Traffic
  8. Priority 4 = All Other Traffic
  9.  
  10. Marking traffic from Client-A in MANGLE
  11. /ip firewall mangle
  12.  
  13. # Mark HTTP 80Traffic Connections/Packets
  14. add action=mark-connection chain=forward comment="Zaib-Desktop - Mark HTTP Port 80" dst-port=80 new-connection-mark=Zaib_Desktop_http_80_Conn protocol=tcp src-address=101.11.14.1
  15. add action=mark-packet chain=forward connection-mark=Zaib_Desktop_http_80_Conn new-packet-mark=Zaib_Desktop_http_80_pkts passthrough=no
  16.  
  17. # Mark HTTPS 443 Traffic Connections/Packets
  18. add action=mark-connection chain=forward comment="Zaib-Desktop - Mark HTTPS Port 443" dst-port=443 new-connection-mark=Zaib_Desktop_https_443_Conn protocol=tcp src-address=101.11.14.1
  19. add action=mark-packet chain=forward connection-mark=Zaib_Desktop_https_443_Conn new-packet-mark=Zaib_Desktop_httsp_443_pkts passthrough=no add action=mark-connection chain=forward comment="Zaib Desktop - ICMP" new-connection-mark=Zaib_Desktop_ICMP_Conn protocol=icmp src-address=101.11.14.1
  20.  
  21. # Mark ICMP TRAFFIC Connections/Packets
  22. add action=mark-connection chain=forward comment="Zaib Desktop - ICMP" new-connection-mark=Zaib_Desktop_ICMP_Conn protocol=icmp src-address=101.11.14.1
  23. add action=mark-packet chain=forward connection-mark=Zaib_Desktop_ICMP_Conn new-packet-mark=Zaib_Desktop_ICMP_Pkts passthrough=no
  24.  
  25. # Mark ALL OTHER Traffic Connections/Packets
  26. add action=mark-connection chain=forward comment="Zaib Desktop - All Other Traffic" connection-mark=no-mark new-connection-mark=Zaib_Desktop_All_Other_Traffic src-address=101.11.14.1
  27. add action=mark-packet chain=forward connection-mark=Zaib_Desktop_All_Other_Traffic new-packet-mark=Zaib_Desktop_All_Other_Pkts passthrough=no
  28.  
  29. # Mark QUEUE TREE
  30. /queue tree
  31. add limit-at=128k max-limit=128k name="Zaib Dekstop - 128k" parent=global queue=default
  32.  
  33. # 1st Priority to ICMP Traffic from above 128k Parent Queue
  34. add name="PRIO 1 - ICMP" packet-mark=Zaib_Desktop_ICMP_Pkts parent="Zaib Dekstop - 128k" queue=default priority=1
  35.  
  36. # 2nd Priority to HTTPS 443 Traffic from 128k Parent Queue
  37. add name="PRIO 2 - HTTPS" packet-mark=Zaib_Desktop_httsp_443_pkts parent="Zaib Dekstop - 128k" queue=default priority=2
  38.  
  39. # 3rd Priority to HTTP Port 80 Traffic from 128k Parent Queue
  40. add name="PRIO 3 - HTTP" packet-mark=Zaib_Desktop_http_80_pkts parent="Zaib Dekstop - 128k" queue=default priority=3
  41.  
  42. # 4th Priority to All Other Traffic from 128k Parent Queue
  43. add name="PRIO 4 - All Other Traffic" packet-mark=Zaib_Desktop_All_Other_Pkts parent="Zaib Dekstop - 128k" queue=default priority=8
  44.  
  45.  
  46. bisa di modif sesuai kalian
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement