SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
M ik r o Tik R o u t e r O S W o r k s h o p
Q o S B e s t P r a c t ic e
Chicago,IL
MUM USA 2008

© MikroTik 2008
Plan
Discuss best QoS practice for
Large scale user speed limitations
Prioritization of traffic based on traffic type
Implement best practice
You will be able to follow the progress – just
connect to SSID “QoS” and open up the Winbox
to address 10.1.1.254 (default user name and
password)
© MikroTik 2008

2
User Limitation
T3/E3 line
~40 Mbps

You have more than 400 clients

●

Task:

●

Divide clients into 3 groups
●
Business (4Mbps/1Mbps)
connection
●
Standard (750kbps/250kbps)
connection
●
Basic (375kbps/125kbps)
connection

●

© MikroTik 2008

3
Simple Queue For Each Client
Each simple queue creates 3 separate queues:
One in global-in (“direct” part)
One in Global-out (“reverse” part)
One in Global-total (“total” part)

Simple queues are ordered - similar to firewall
rules
further down = longer packet processing
further down = smaller chance to get traffic

(necessary to reduce number of queues)
© MikroTik 2008

4
Possible Solutions
RouterOS have 4 queue types:
FIFO – First In First Out (for Bytes or for Packets)
RED – Random Early Detect (or Drop)
SFQ – Stochastic Fairness Queuing
PCQ – Per Connection Queuing (MikroTik Proprietary)

Firewall Mangle and Address-lists
Queue Tree

© MikroTik 2008

5
Default Queue Types

© MikroTik 2008

6
© MikroTik 2008

7
© MikroTik 2008

8
SFQ
Behaviour:
Based on
hash value from source and
destination address SFQ divides traffic into
1024 sub-streams
Then
Round
Robin
algorithm will distribute
equal amount of traffic
to each sub-stream

© MikroTik 2008

9
© MikroTik 2008

10
PCQ
Behaviour:
Based on classifier PCQ divides traffic into substreams. Each sub-stream can be considered
as FIFO queue with queue size specified by
“limit” option
After this PCQ can be
considered as FIFO
queue where queue
size is specified by
“total-limit” option.
© MikroTik 2008

11
© MikroTik 2008

12
© MikroTik 2008

13
© MikroTik 2008

14
Plan
Create an address list for client classes
Use “connection-mark” (mangle) feature to
classify all connections based on client class
Use “packet-mark” (mangle) feature to classify
all traffic based on client class
Create a PCQ queue for each client class with
rate option specified
...what about user-user communications???
...what about unmarked traffic ?

© MikroTik 2008

15
Address Lists

© MikroTik 2008

16
Where?
There are 5 places to mangle
There are 4 places to limit

© MikroTik 2008

17
Connection-mark rule

© MikroTik 2008

18
Packet-mark rule

© MikroTik 2008

19
Working Mangle- Winbox view

© MikroTik 2008

20
Working Mangle- Export view

© MikroTik 2008

21
Queuing Placement
Limitation for in mangle chain “forward” marked
traffic can be placed in the “global-out” or
interface queue
If queues will be placed in the interface queues
queues on the public interface will capture only
client upload
queues on the local interface will capture only
client's download

If queues will be placed in global-out download
and upload will be limited together (separate marks
needed)

© MikroTik 2008

22
PCQ Types – Winbox View

© MikroTik 2008

23
Queue Tree – Winbox View

© MikroTik 2008

24
Queue Tree – Export View

© MikroTik 2008

25
PCQ Queue Size
It can take only 40
users to fill the queue
(because total_limit/limit = 2000/50 = 40)

Total_limit = X can take up to
X*(2000 bytes + 200 bytes) of RAM
2000 bytes – buffer for 1 packet
200 bytes – service data for 1 packet
total_limit = 2000 =< 4,2MB RAM
total_limit = 5000 =< 10,5MB RAM

It is necessary to
increase “total_limit”
or (and) decrease the
“limit” value
There must be at
least 10-20 packet
places in queue
available per user

© MikroTik 2008

26
PCQ Adjustments
There are ~340 Basic class clients so:
pcq_limit = 40
pcq_total_limit = 7000 ( ~20*340) (~15MB)

There are ~40 Standard class clients so:
pcq_limit = 30
pcq_total_limit = 1000 ( ~20*40) (~2MB)

There are ~20 Business class clients so:
pcq_limit = 20 (!!!)
pcq_total_limit = 500 ( ~20*20) (~1MB)

© MikroTik 2008

27
Traffic Prioritization
T3/E3 line
~40 Mbps
~5Mbps abroad

Business Class Clients

You have problems with on-line
communications (video, audio, VOIP,
games)
Basic Class Clients

Task:
Make necessary traffic
prioritization

Standard Class Clients

© MikroTik 2008

28
Prioritization plan

© MikroTik 2008

29
Where?
There are 5 places to mangle
There are 4 places to limit

© MikroTik 2008

30
How?

© MikroTik 2008

31
Priorities
Create packet marks in the mangle chain
“Prerouting” for traffic prioritization in the globalin queue
Ensign_services (Priority=1)
User_requests (Priority=3)
Communication_services (Priority=5)
Download_services (Priority=7)
P2P_services (Priority=8)

© MikroTik 2008

32

Weitere ähnliche Inhalte

Was ist angesagt?

CISCO Virtual Private LAN Service (VPLS) Technical Deployment Overview
CISCO Virtual Private LAN Service (VPLS) Technical Deployment OverviewCISCO Virtual Private LAN Service (VPLS) Technical Deployment Overview
CISCO Virtual Private LAN Service (VPLS) Technical Deployment Overview
Ameen Wayok
 

Was ist angesagt? (20)

Subscriber Traffic & Policy Management (BNG) on the ASR9000 & ASR1000
Subscriber Traffic & Policy Management (BNG) on the ASR9000 & ASR1000Subscriber Traffic & Policy Management (BNG) on the ASR9000 & ASR1000
Subscriber Traffic & Policy Management (BNG) on the ASR9000 & ASR1000
 
BGP Services IP Transit vs IP Peering
BGP Services  IP Transit vs IP PeeringBGP Services  IP Transit vs IP Peering
BGP Services IP Transit vs IP Peering
 
Tunnel vs VPN on Mikrotik
Tunnel vs VPN on MikrotikTunnel vs VPN on Mikrotik
Tunnel vs VPN on Mikrotik
 
Introduction to Segment Routing
Introduction to Segment RoutingIntroduction to Segment Routing
Introduction to Segment Routing
 
Mikrotik basic configuration
Mikrotik basic configurationMikrotik basic configuration
Mikrotik basic configuration
 
Mpls
MplsMpls
Mpls
 
CISCO Virtual Private LAN Service (VPLS) Technical Deployment Overview
CISCO Virtual Private LAN Service (VPLS) Technical Deployment OverviewCISCO Virtual Private LAN Service (VPLS) Technical Deployment Overview
CISCO Virtual Private LAN Service (VPLS) Technical Deployment Overview
 
HOTSPOT on MikroTik Router
HOTSPOT on MikroTik RouterHOTSPOT on MikroTik Router
HOTSPOT on MikroTik Router
 
Network Address Translation (NAT)
Network Address Translation (NAT)Network Address Translation (NAT)
Network Address Translation (NAT)
 
Creating a DMZ - pfSense Hangout January 2016
Creating a DMZ - pfSense Hangout January 2016Creating a DMZ - pfSense Hangout January 2016
Creating a DMZ - pfSense Hangout January 2016
 
BGP on RouterOS7 -Part 1
BGP on RouterOS7 -Part 1BGP on RouterOS7 -Part 1
BGP on RouterOS7 -Part 1
 
EVPN Introduction
EVPN IntroductionEVPN Introduction
EVPN Introduction
 
Vxlan deep dive session rev0.5 final
Vxlan deep dive session rev0.5   finalVxlan deep dive session rev0.5   final
Vxlan deep dive session rev0.5 final
 
ACL on Linux - Part 1
ACL on Linux - Part 1ACL on Linux - Part 1
ACL on Linux - Part 1
 
Dhcp
DhcpDhcp
Dhcp
 
PLNOG16: IP/MPLS for Fixed and Mobile Convergence, Kevin Wang
PLNOG16: IP/MPLS for Fixed and Mobile Convergence, Kevin WangPLNOG16: IP/MPLS for Fixed and Mobile Convergence, Kevin Wang
PLNOG16: IP/MPLS for Fixed and Mobile Convergence, Kevin Wang
 
VXLAN Practice Guide
VXLAN Practice GuideVXLAN Practice Guide
VXLAN Practice Guide
 
Cisco IPv6 Tutorial
Cisco IPv6 TutorialCisco IPv6 Tutorial
Cisco IPv6 Tutorial
 
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
 
Using mikrotik with radius
Using mikrotik with radiusUsing mikrotik with radius
Using mikrotik with radius
 

Andere mochten auch

OpenWRT Case Study
OpenWRT Case StudyOpenWRT Case Study
OpenWRT Case Study
Bob Chao
 

Andere mochten auch (19)

Qo s of service with winbox
Qo s of service with winboxQo s of service with winbox
Qo s of service with winbox
 
Mikrotik firewall filter
Mikrotik firewall filterMikrotik firewall filter
Mikrotik firewall filter
 
MikroTik Firewall : Securing your Router with Port Knocking
MikroTik Firewall : Securing your Router with Port KnockingMikroTik Firewall : Securing your Router with Port Knocking
MikroTik Firewall : Securing your Router with Port Knocking
 
Limiting bandwidth of specific destination based on address list
Limiting bandwidth of specific destination based on address listLimiting bandwidth of specific destination based on address list
Limiting bandwidth of specific destination based on address list
 
OpenWRT Case Study
OpenWRT Case StudyOpenWRT Case Study
OpenWRT Case Study
 
Technology Overview: Policer Implementation on MX Series, M120, and M320 Routers
Technology Overview: Policer Implementation on MX Series, M120, and M320 RoutersTechnology Overview: Policer Implementation on MX Series, M120, and M320 Routers
Technology Overview: Policer Implementation on MX Series, M120, and M320 Routers
 
Choosing MikroTik for Your Network
Choosing MikroTik for Your NetworkChoosing MikroTik for Your Network
Choosing MikroTik for Your Network
 
Class 6
Class 6Class 6
Class 6
 
Class 4
Class 4Class 4
Class 4
 
Class 5
Class 5Class 5
Class 5
 
Class 2
Class 2Class 2
Class 2
 
Mikrotik Hotspot With Queue Tree BW Management
Mikrotik Hotspot With Queue Tree BW ManagementMikrotik Hotspot With Queue Tree BW Management
Mikrotik Hotspot With Queue Tree BW Management
 
Class 3
Class 3Class 3
Class 3
 
Class 7
Class 7Class 7
Class 7
 
Class 1
Class 1Class 1
Class 1
 
MTCWE
MTCWEMTCWE
MTCWE
 
VLAN on mikrotik
VLAN on mikrotikVLAN on mikrotik
VLAN on mikrotik
 
MikroTik Multicast Routing [www.imxpert.co]
MikroTik Multicast Routing [www.imxpert.co]MikroTik Multicast Routing [www.imxpert.co]
MikroTik Multicast Routing [www.imxpert.co]
 
Leaky bucket algorithm
Leaky bucket algorithmLeaky bucket algorithm
Leaky bucket algorithm
 

Ähnlich wie Mikrotik router os qos best practice

Tutorial mikrotik step by step anung muhandanu
Tutorial mikrotik step by step  anung muhandanu Tutorial mikrotik step by step  anung muhandanu
Tutorial mikrotik step by step anung muhandanu
Alessandro De Suoodh
 
Tutorial mikrotik step by step anung muhandanu
Tutorial mikrotik step by step  anung muhandanu Tutorial mikrotik step by step  anung muhandanu
Tutorial mikrotik step by step anung muhandanu
theviper0308
 
Multi fabric sales motions jg v3
Multi fabric sales motions jg v3Multi fabric sales motions jg v3
Multi fabric sales motions jg v3
Jeff Green
 
GPON technology equipment fiberhoe technologies indo
GPON technology equipment fiberhoe technologies indoGPON technology equipment fiberhoe technologies indo
GPON technology equipment fiberhoe technologies indo
rizkiutomo1992
 

Ähnlich wie Mikrotik router os qos best practice (20)

Lets talk about QoS by Megis.pdf
Lets talk about QoS by Megis.pdfLets talk about QoS by Megis.pdf
Lets talk about QoS by Megis.pdf
 
Tutorial mikrotik step by step anung muhandanu
Tutorial mikrotik step by step  anung muhandanu Tutorial mikrotik step by step  anung muhandanu
Tutorial mikrotik step by step anung muhandanu
 
Intelligent Network Services through Active Flow Manipulation
Intelligent Network Services through Active Flow ManipulationIntelligent Network Services through Active Flow Manipulation
Intelligent Network Services through Active Flow Manipulation
 
Tutorial mikrotik step by step anung muhandanu
Tutorial mikrotik step by step  anung muhandanu Tutorial mikrotik step by step  anung muhandanu
Tutorial mikrotik step by step anung muhandanu
 
cisco-cbs350-24fp-4x-datasheet.pdf
cisco-cbs350-24fp-4x-datasheet.pdfcisco-cbs350-24fp-4x-datasheet.pdf
cisco-cbs350-24fp-4x-datasheet.pdf
 
Flexing Network Muscle with IBM Flex System Fabric Technology
Flexing Network Muscle with IBM Flex System Fabric TechnologyFlexing Network Muscle with IBM Flex System Fabric Technology
Flexing Network Muscle with IBM Flex System Fabric Technology
 
IAB-5039 : MQTT: A Protocol for the Internet of Things (InterConnect 2015)
IAB-5039 : MQTT: A Protocol for the Internet of Things (InterConnect 2015)IAB-5039 : MQTT: A Protocol for the Internet of Things (InterConnect 2015)
IAB-5039 : MQTT: A Protocol for the Internet of Things (InterConnect 2015)
 
cisco-cbs350-24t-4x-datasheet.pdf
cisco-cbs350-24t-4x-datasheet.pdfcisco-cbs350-24t-4x-datasheet.pdf
cisco-cbs350-24t-4x-datasheet.pdf
 
Chapter04
Chapter04Chapter04
Chapter04
 
Presentation 3 for Students of professordkinney.com
Presentation 3 for Students of professordkinney.comPresentation 3 for Students of professordkinney.com
Presentation 3 for Students of professordkinney.com
 
Cma5000a gige
Cma5000a   gigeCma5000a   gige
Cma5000a gige
 
cisco-cbs350-48p-4x-datasheet.pdf
cisco-cbs350-48p-4x-datasheet.pdfcisco-cbs350-48p-4x-datasheet.pdf
cisco-cbs350-48p-4x-datasheet.pdf
 
cisco-cbs350-48t-4x-datasheet.pdf
cisco-cbs350-48t-4x-datasheet.pdfcisco-cbs350-48t-4x-datasheet.pdf
cisco-cbs350-48t-4x-datasheet.pdf
 
cisco-cbs350-24fp-4g-datasheet.pdf
cisco-cbs350-24fp-4g-datasheet.pdfcisco-cbs350-24fp-4g-datasheet.pdf
cisco-cbs350-24fp-4g-datasheet.pdf
 
cisco-cbs350-24p-4g-datasheet.pdf
cisco-cbs350-24p-4g-datasheet.pdfcisco-cbs350-24p-4g-datasheet.pdf
cisco-cbs350-24p-4g-datasheet.pdf
 
Multi fabric sales motions jg v3
Multi fabric sales motions jg v3Multi fabric sales motions jg v3
Multi fabric sales motions jg v3
 
CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9
CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9
CCNA (R & S) Module 01 - Introduction to Networks - Chapter 9
 
Introducing the Future of Data Center Interconnect Networks
Introducing the Future of Data Center Interconnect NetworksIntroducing the Future of Data Center Interconnect Networks
Introducing the Future of Data Center Interconnect Networks
 
GPON technology equipment fiberhoe technologies indo
GPON technology equipment fiberhoe technologies indoGPON technology equipment fiberhoe technologies indo
GPON technology equipment fiberhoe technologies indo
 
SCTP Tutorial
SCTP TutorialSCTP Tutorial
SCTP Tutorial
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Mikrotik router os qos best practice

  • 1. M ik r o Tik R o u t e r O S W o r k s h o p Q o S B e s t P r a c t ic e Chicago,IL MUM USA 2008 © MikroTik 2008
  • 2. Plan Discuss best QoS practice for Large scale user speed limitations Prioritization of traffic based on traffic type Implement best practice You will be able to follow the progress – just connect to SSID “QoS” and open up the Winbox to address 10.1.1.254 (default user name and password) © MikroTik 2008 2
  • 3. User Limitation T3/E3 line ~40 Mbps You have more than 400 clients ● Task: ● Divide clients into 3 groups ● Business (4Mbps/1Mbps) connection ● Standard (750kbps/250kbps) connection ● Basic (375kbps/125kbps) connection ● © MikroTik 2008 3
  • 4. Simple Queue For Each Client Each simple queue creates 3 separate queues: One in global-in (“direct” part) One in Global-out (“reverse” part) One in Global-total (“total” part) Simple queues are ordered - similar to firewall rules further down = longer packet processing further down = smaller chance to get traffic (necessary to reduce number of queues) © MikroTik 2008 4
  • 5. Possible Solutions RouterOS have 4 queue types: FIFO – First In First Out (for Bytes or for Packets) RED – Random Early Detect (or Drop) SFQ – Stochastic Fairness Queuing PCQ – Per Connection Queuing (MikroTik Proprietary) Firewall Mangle and Address-lists Queue Tree © MikroTik 2008 5
  • 6. Default Queue Types © MikroTik 2008 6
  • 9. SFQ Behaviour: Based on hash value from source and destination address SFQ divides traffic into 1024 sub-streams Then Round Robin algorithm will distribute equal amount of traffic to each sub-stream © MikroTik 2008 9
  • 11. PCQ Behaviour: Based on classifier PCQ divides traffic into substreams. Each sub-stream can be considered as FIFO queue with queue size specified by “limit” option After this PCQ can be considered as FIFO queue where queue size is specified by “total-limit” option. © MikroTik 2008 11
  • 15. Plan Create an address list for client classes Use “connection-mark” (mangle) feature to classify all connections based on client class Use “packet-mark” (mangle) feature to classify all traffic based on client class Create a PCQ queue for each client class with rate option specified ...what about user-user communications??? ...what about unmarked traffic ? © MikroTik 2008 15
  • 17. Where? There are 5 places to mangle There are 4 places to limit © MikroTik 2008 17
  • 20. Working Mangle- Winbox view © MikroTik 2008 20
  • 21. Working Mangle- Export view © MikroTik 2008 21
  • 22. Queuing Placement Limitation for in mangle chain “forward” marked traffic can be placed in the “global-out” or interface queue If queues will be placed in the interface queues queues on the public interface will capture only client upload queues on the local interface will capture only client's download If queues will be placed in global-out download and upload will be limited together (separate marks needed) © MikroTik 2008 22
  • 23. PCQ Types – Winbox View © MikroTik 2008 23
  • 24. Queue Tree – Winbox View © MikroTik 2008 24
  • 25. Queue Tree – Export View © MikroTik 2008 25
  • 26. PCQ Queue Size It can take only 40 users to fill the queue (because total_limit/limit = 2000/50 = 40) Total_limit = X can take up to X*(2000 bytes + 200 bytes) of RAM 2000 bytes – buffer for 1 packet 200 bytes – service data for 1 packet total_limit = 2000 =< 4,2MB RAM total_limit = 5000 =< 10,5MB RAM It is necessary to increase “total_limit” or (and) decrease the “limit” value There must be at least 10-20 packet places in queue available per user © MikroTik 2008 26
  • 27. PCQ Adjustments There are ~340 Basic class clients so: pcq_limit = 40 pcq_total_limit = 7000 ( ~20*340) (~15MB) There are ~40 Standard class clients so: pcq_limit = 30 pcq_total_limit = 1000 ( ~20*40) (~2MB) There are ~20 Business class clients so: pcq_limit = 20 (!!!) pcq_total_limit = 500 ( ~20*20) (~1MB) © MikroTik 2008 27
  • 28. Traffic Prioritization T3/E3 line ~40 Mbps ~5Mbps abroad Business Class Clients You have problems with on-line communications (video, audio, VOIP, games) Basic Class Clients Task: Make necessary traffic prioritization Standard Class Clients © MikroTik 2008 28
  • 30. Where? There are 5 places to mangle There are 4 places to limit © MikroTik 2008 30
  • 32. Priorities Create packet marks in the mangle chain “Prerouting” for traffic prioritization in the globalin queue Ensign_services (Priority=1) User_requests (Priority=3) Communication_services (Priority=5) Download_services (Priority=7) P2P_services (Priority=8) © MikroTik 2008 32