Sei sulla pagina 1di 18

Check

Presented by
Ahmed M. Al-Badree
Satellite & IT Engineer. (iTQAN)

MikroTik INC.
MUM USA, Chicago, IL 2008

Arabic Version
- ISPs are constantly seeking ways to improve web http service delivery to end users.

- To achieve Quality of Service, ISPs deploy Bandwidth Managers to shape customer traffic
based on several policies.

- To accelerate http delivery, ISPs deploy web caches to cache frequently accessed web sites.

- Though bandwidth is saved using a web cache and bandwidth manager, the accelerated.

- This book will show you how to use the TOS (RouterOS v2.9) or DSCP (RouterOS v3.0) man-
gle.

- Feature on your RouterOS bandwidth manager together with a squid-2.6 external cache to
manage the delivery of cache contents with or without penalty to your end users, making them
experience the true performance of caching.

MikroTik Router OS Workshop
QoS Best Practice Part 1
THE SECRETS OF
MIKROTIK
ENHANCED
QUALITY OF
SERVICE

iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 2




QoS
Quality of Service



DSL LAN
WAN LAN

DNS


iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 3
User Limitation
(40Mbps)

Business (4Mbps/1Mbps) connection
Standard (750kbps/250kbps) connection
Basic (375kbps/125kbps) connection
Simple Queue Tree Queue
Simple Queue
1- FIFO First In First Out (for Bytes or for Packets
2- RED Random Early Detect (or Drop
3- SFQ Stochastic Fairness Queuing
4- PCQ Per Connection Queuing (MikroTik Proprietary

iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 4


iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 5

SFQ













SFQ Hashing
source and destination address
SFQ
Round Robin

iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 6

PCQ












FIFO
PCQ FIFO


iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 7

PCQ Queue Size
PCQ










PCQ


iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 8
PCQ Queue Size







PCQ
PCQ
Total Limit Limit
2000/50 =40 User
Total Limit Limit
Total limit = X X*(2000 bytes + 200 bytes) of RAM
buffer for 1 packet
Total Limit
2000*(2000+200)=4400000
4400000/1024=4.2MB of RAM
Total limit
5000*(2000+200)=11000000bytes
11000000/1024=10.7MB of RAM

iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 9


(Business Standard - Basic)
connection-mark

packet-mark

PCQ Queue









1
2
3
4
5
Business_class_client


Address Lists

iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 10










iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 11
Mangle
Forward Chain
Advanced Src. Address List
Address lists
Basic_class_client
Action mark connection
New basic_client_conn
Passthrough OK
business standard
Basic



iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 12
forward Chain
Connection Mark basic
Action mark packet
New basic_client_traffic
OK
business Standard







iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 13
Working Mangle - Winbox view







/ ip firewall mangle
add chain=forward src-address-list=Basic_class_client action=mark-connection new-connection-
mark=basic_client_conn passthrough=yes comment="mark basic client traffic" disabled=no
add chain=forward connection-mark=basic_client_conn action=mark-packet new-packet-
mark=basic_client_traffic passthrough=no comment="" disabled=no
add chain=forward src-address-list=Standard_class_client action=mark-connection new-connection-
mark=standard_client_conn passthrough=yes comment="mark standard client traffic" disabled=no
add chain=forward connection-mark=standard_client_conn action=mark-packet new-packet-
mark=standard_client_traffic passthrough=no comment="" disabled=no
add chain=forward src-address-list=Business_class_client action=mark-connection new-connection-
mark=business_client_conn passthrough=yes comment="mark business client traffic" disabled=no
add chain=forward connection-mark=business_client_conn action=mark-packet new-packet-
mark=business_client_traffic passthrough=no comment="" disabled=no
add chain=forward action=log log-prefix="" comment="Check for unmarked traffic" disabled=no

iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 14
Queuing Placement

Queues Tree (global-out)
(interface-queue) (interface-queue)
wan
LAN
(global-out)
1
2
3
4
5
6
7
8
9
10

iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 15
/ queue tree
add name="Total_download" parent=LAN packet-mark="" limit-at=0 queue=default priority=1
max-limit=0 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name="basic_client_download" parent=Total_download packet-mark=basic_client_traffic
limit-at=0 queue=PCQ_down_375k priority=8 max-limit=0 \
burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="standard_client_download" parent=Total_download packet-
mark=standard_client_traffic limit-at=0 queue=PCQ_down_750k priority=4 \
max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="business_client_download" parent=Total_download packet-
mark=business_client_traffic limit-at=0 queue=PCQ_down_4M priority=1 \
max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="Total_upload" parent=WAN packet-mark="" limit-at=0 queue=default priority=8
max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s \
disabled=no
add name="basic_client_upload" parent=Total_upload packet-mark=basic_client_traffic limit-
at=0 queue=PCQ_up_125k priority=8 max-limit=0 \
burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="standard_client_upload" parent=Total_upload packet-mark=standard_client_traffic
limit-at=0 queue=PCQ_up_250k priority=4 max-limit=0 \
burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="business_client_upload" parent=Total_upload packet-mark=business_client_traffic

iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 16
Queue Queue type PCQ
Settings
rate 4M limit
Total limit 40
4M
Dst. Address ok
PCQ
Src. Address

PCQ





















iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 17

How to access a network from the WAN side
WAN
LAN
1
2
3-1
3-2
/ip firewall nat
add action=src-nat chain=srcnat comment="" disabled=no src-address=\
192.168.0.254 to-addresses=192.168.50.1

iTQAN
Overview: Bandwidth and QoS

POWERED BY iTQAN - WWW.MICROSOFT-AC.COM - WWW.SHBAKAAT.COM Page 18

.
( )

Potrebbero piacerti anche